A very early version of lesson 10…

…is ready to play with. The code is not quite ready for prime time, so please don’t base anything on it :-) It works for me in Chrome, but for some reason with Firefox it works from a local disk but not from the site. Odd. I’ll debug that over the next day or so.

You can leave a response, or trackback from your own site.

2 Responses to “A very early version of lesson 10…”

  1. Peter Strohm says:

    Looks interesting again. Especially the up-and-down effect for the camera when walking.
    For some reason I get the trouble with Minefield the other way around: It works online (did you fix anything, yet?), but does not locally.
    With your example as well as my own experiments Minefield/Javascript tries to interpret the content of the external file when loaded locally:

    —-
    Error: syntax error
    Source File: file:///C:/myfiles/webgl/learningwebgl.com/world.txt
    Line: 2, Column: 1
    Source Code:
    NUMPOLLIES 36
    —-

    Must have something to do with the use of the XMLHttpRequest but I just do not get it.

  2. giles says:

    Hi Peter — I haven’t changed anything since I uploaded it but I’ve now found that it works just fine from the website on my laptop, but not on the desktop. Really weird! Investigation needed.

    I also see the syntax error when I load it locally, though it doesn’t seem to cause any problems with displaying the demo. I think it may be because XMLHttpRequest tries to execute anything it thinks is JavaScript. The hypothesis is that when it loads something from a web server the MIME type is set correctly, so it doesn’t try to interpret it, but when it loads it from a file, there’s no MIME type, it tries to guess, and gets it wrong. It sounds like a plausible explanation, anyway :-)

Leave a Reply

Subscribe to RSS Feed Follow Learning WebGL on Twitter