Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FloatArray has been renamed to Float32Array in latest TypedArray spec.

  • Loading branch information...
commit 3c9847eded0891eeb091efc28b1442ec9962935f 1 parent d4f6225
@puffnfresh authored
View
8 examples/example-include.js
@@ -6,7 +6,7 @@ function init(canvas, nodejs) {
if(nodejs) {
var webgl = require('../webgl');
ArrayBuffer = require('buffer').Buffer;
- FloatArray = webgl.FloatArray;
+ Float32Array = webgl.Float32Array;
Image = webgl.Image;
}
@@ -60,7 +60,7 @@ function init(canvas, nodejs) {
var textureFloatArray;
try {
textureArray = new ArrayBuffer(2 * 4 * 4);
- textureFloatArray = new FloatArray(textureArray);
+ textureFloatArray = new Float32Array(textureArray);
} catch (x) {
}
var textureCoordAttribute = gl.getAttribLocation(program, "aTextureCoord");
@@ -114,7 +114,7 @@ function init(canvas, nodejs) {
var vertexFloatArray;
try {
vertexArray = new ArrayBuffer(4 * 4 * 3);
- vertexFloatArray = new FloatArray(vertexArray);
+ vertexFloatArray = new Float32Array(vertexArray);
} catch (x) {
}
var vertexPositionAttribute = gl.getAttribLocation(program, "aVertexPosition");
@@ -144,7 +144,7 @@ function init(canvas, nodejs) {
var projectionFloatArray;
try {
projectionArray = new ArrayBuffer(4 * 16);
- projectionFloatArray = new FloatArray(projectionArray);
+ projectionFloatArray = new Float32Array(projectionArray);
} catch (x) {
}
(function() {
View
4 src/glcontext.h
@@ -175,7 +175,7 @@ class GLContext : public ObjectWrap {
BufferData (const Arguments& args) {
HandleScope scope;
- FloatArray *fa = Unwrap<FloatArray>(args[1]->ToObject());
+ Float32Array *fa = Unwrap<Float32Array>(args[1]->ToObject());
GLenum target = args[0]->Uint32Value();
GLsizei size = fa->Length();
@@ -264,7 +264,7 @@ class GLContext : public ObjectWrap {
UniformMatrix4fv (const Arguments &args) {
HandleScope scope;
- FloatArray *fa = Unwrap<FloatArray>(args[2]->ToObject());
+ Float32Array *fa = Unwrap<Float32Array>(args[2]->ToObject());
GLint location = args[0]->IntegerValue();
GLsizei count = fa->Length() / sizeof(float);
View
12 src/typedarray.h
@@ -9,7 +9,7 @@
using namespace v8;
using namespace node;
-class FloatArray : public ObjectWrap {
+class Float32Array : public ObjectWrap {
public:
static void
@@ -18,11 +18,11 @@ class FloatArray : public ObjectWrap {
Local<FunctionTemplate> t = FunctionTemplate::New(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
- t->SetClassName(String::NewSymbol("FloatArray"));
+ t->SetClassName(String::NewSymbol("Float32Array"));
NODE_SET_PROTOTYPE_METHOD(t, "set", Set);
- target->Set(String::NewSymbol("FloatArray"), t->GetFunction());
+ target->Set(String::NewSymbol("Float32Array"), t->GetFunction());
}
void *
@@ -51,7 +51,7 @@ class FloatArray : public ObjectWrap {
Buffer *buf = ObjectWrap::Unwrap<Buffer>(args[0]->ToObject());
- FloatArray *fa = new FloatArray(buf);
+ Float32Array *fa = new Float32Array(buf);
fa->Wrap(args.This());
return args.This();
@@ -61,7 +61,7 @@ class FloatArray : public ObjectWrap {
Set (const Arguments& args) {
HandleScope scope;
- FloatArray *fa = Unwrap<FloatArray>(args.This());
+ Float32Array *fa = Unwrap<Float32Array>(args.This());
Local<Array> a = Local<Array>::Cast(args[0]);
@@ -77,7 +77,7 @@ class FloatArray : public ObjectWrap {
return Undefined();
}
- FloatArray (Buffer *b) : ObjectWrap() {
+ Float32Array (Buffer *b) : ObjectWrap() {
buf = b;
}
View
2  src/webgl.cc
@@ -190,7 +190,7 @@ init (Handle<Object> target) {
HandleScope scope;
GLContext::Initialize(target);
- FloatArray::Initialize(target);
+ Float32Array::Initialize(target);
Image::Initialize(target);
Window::Initialize(target);
}
Please sign in to comment.
Something went wrong with that request. Please try again.