More API changes

Kevin Theisen, the creator of the WebGL chemistry tool ChemDoodle 3D, dropped me a line to highlight a change that has just hit WebKit and Chromium — they’ve moved entirely over to the new JavaScript Typed Array specification, so classes like WebGLFloatArray and WebGLUnsignedShortArray have been replaced by the new Float32Array and Uint16Array respectively. Yes, that’s right: WebGLFloatArray no longer exists.

This is a big change — I’ve fixed the tutorials on this site, and Kevin has (of course!) updated ChemDoodle, but it looks like almost every other WebGL demo out there needs updating :-( Luckily, it’s just a simple search and replace on the array types.

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

8 Responses to “More API changes”

  1. Paul Brunt says:

    Big thanks for the heads up again, it’s quite hard to keep track of all the changes going on and it’s so useful to have everything concisely summarised in one place.

  2. Peter Strohm says:

    thanks from me too.
    I guess you tested the change in (at least) chrome and firefox. For some reason I do not get neither your nor my webgl-samples running in chrome with the new Float32Array…? I use today’s (16.8.) build of chromium from http://build.chromium.org/buildbot/continuous/win/LATEST/ and it (still) works fine with WebGLFloatArray but doesn’t with Float32Array. Firefox beta 3 works with both types.

  3. giles says:

    @Peter, @Paul — no problem!

    @Peter — that’s strange — you’re right, I tested in the latest Chromium and Firefox builds. I was about to ask whether you were on a Mac, but I see that you give the Windows URL — the very same one I downloaded from — so I guess not. The “About” dialog for my Chromium says “6.0.497.0 (56197)”, what about yours?

  4. Mark Callow says:

    @Giles

    Thanks for modifying the lessons. However the code fragments included in the lesson text (for at least Lesson 4) still use WebGLArray.

    @Peter

    The lessons have not worked for me in the Chromium continuous builds because of use of WebGLArray since at least 8/13. Are you sure you are running the Chromium version you think you are?

  5. Peter Strohm says:

    Chrome / Chromium makes me crazy.
    First, Giles was right; The version that started after the update was 5.0.something, so for some reason the update obviously failed.
    Today I downloaded the most recent version 7(!).0.504.0 (57048) as the about-box tells me, but still no WebGL shaders can be initialised.
    Am I the only one having such trouble ??

  6. giles says:

    @Mark — good point, I’ll fix that. [UPDATE: done]

    @Peter — I hope this isn’t a silly question, but have you also updated your code to allow for the other recent spec change?

  7. Peter Strohm says:

    It works! chrome 6.0… works; chromium 7.0 fails to initialize shaders.

  8. giles says:

    I think Chromium 7 went through a bit of a bad phase a while back — it seems to have recovered now, though.

Leave a Reply

Subscribe to RSS Feed Follow Learning WebGL on Twitter