4

The multiple view is not quite drawn the full size; it is about 10% smaller than the window, with white space at the top and the right. (See image below).

The problem applies to this Three.js example. From what I can tell, it's the combination of:

  • Multiple viewports of the same scene
  • Firefox
  • My WAMP setup

To confirm the above, I've done the following:

  • If I go to the above link, it works fine in both Chrome and Firefox.
  • Point my browser to a copy of that example on my localhost WAMPSERVER setup, it displays correctly in Chrome, but not in Firefox.
  • It also displays correctly if I extract the above example to my hard drive and open it in Firefox or Crhome. (bypassing WAMP).
  • My project displays correctly if I only display one viewport of the scene. (Firefox and Chrome, loaded via WAMP on localhost).

It's (obviously) something to do with my localhost WAMP setup that Firefox doesn't like that interferes with multiple views configuration (since single-view examples work fine). Perhaps the headers or something like that.

Is it a problem with my code? Firefox? Three.JS? Bounty goes to the best workaround. I'd be happy to answer questions about my WAMP configuration or anything else if I can.

Thanks!

Left: Not working. Right: working. enter image description here

Jodes
  • 14,118
  • 26
  • 97
  • 156
  • 1
    any errors/warnings on Firefox's console? any error thrown by Apache? Try with SimpleHTTPServer using Python: python -m SimpleHTTPServer [port] – frank Mar 11 '13 at 08:28
  • Thanks - sadly no errors in Firebug or Apache – Jodes Mar 11 '13 at 09:47
  • I couldn't figure out python (yet) but I just tried serving from Mongoose and it worked. – Jodes Mar 11 '13 at 10:05
  • 1
    The page looks like no css is applied at all, open the console on Firefox and go to resources just to take a look to the CSS on the DOM. Are you cleaning your cache? aren't you zooming in on Firefox? – frank Mar 11 '13 at 12:24
  • It's not zoomed - I also thought it might be. The page doesn't reference any external CSS, but I cleared the cache anyway and the problem persists. The DOM does show the inline CSS. – Jodes Mar 11 '13 at 12:31
  • 1
    if you change the css values on the console.. does the page change? try to put stupid things like black background.. what happens if you create an external css file? as you said.. it could be a problem with headers. – frank Mar 12 '13 at 19:34
  • Have you used Fiddler to look at exactly what your browser is requesting and receiving, to compare Firefox vs. Chrome, or Firefox-WAMP vs. Firefox-github? – Nate Hekman Mar 16 '13 at 03:12
  • 1
    I'm just trying this out now to see if I can reproduce the problem. At this point I'm not going through WAMP yet, just working on an EC2 instance and opening the file from disk. It opens fine in Chrome, but Firefox gives me an error saying my video card doesn't support WebGL. While that's likely true (seeing as I'm on a VM), it does at least point to the fact that Chrome and Firefox are handling the page differently... – Nate Hekman Mar 16 '13 at 04:19
  • 1
    I got past the WebGL problem by configuring Firefox to "force-enable" WebGL. I installed a vanilla WAMP server, and copied over the one .html and three .js files required. Unfortunately I can't reproduce your problem. For me it all works correctly whether accessed through WAMP or directly from disk, for all browsers. I go back to my suggestion that you use Fiddler to see what exactly is different between your requests to WAMP and those to github. – Nate Hekman Mar 16 '13 at 04:42

0 Answers0