[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Chromium/Firefox handling of FloatArray


I've got some code which looks like this.

// float [] vertices
function createFloatArray(vertices) {
var f, f$array, f$index, f$max, jan;
jan = [];
for (f$array = vertices , f$index = 0 , f$max = f$array.length; f$index < f$max; ++f$index) {
f = f$array[f$index];
jan[jan.length] = f;
var ab = new $wnd.ArrayBuffer(jan.length * 4);
var fa = new $wnd.FloatArray(ab) ;
return fa;
As a minor point of clarification, its called from GWT, so the vertices object must be converted to a 'pure' JS array or
the 'hosted' mode doesn't seem to work.
(some names changed to protect the innocent.)

This code works fine on Chromium 6.0.408.1.dev (which claims to be up to date) but fails on Firefox 3.7a5pre.
The Error console says: "$wnd.FloatArray is not a constructor."

Since the code is based on the current WebGL spec + the TypedArray spec I assume that Chromium is getting it right? Or
what am I doing wrong?



----------------------------------------------------------- You are currently subscribed to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email: