Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Use consistent type for native arrays #12

Closed
w0rm opened this issue Mar 26, 2017 · 4 comments
Closed

Use consistent type for native arrays #12

w0rm opened this issue Mar 26, 2017 · 4 comments

Comments

@w0rm
Copy link
Member

w0rm commented Mar 26, 2017

I noticed that MJS.js defines var MJS_FLOAT_ARRAY_TYPE = Float64Array; while Vector2.js and Vector4.js use var MJS_FLOAT_ARRAY_TYPE = Float32Array;

I don't know if this was intentional or not, but I think this library should use the same type for all.

cc @felixLam

@fredcy
Copy link
Member

fredcy commented Apr 3, 2017

The change from 32 to 64 in MJS.js broke some WebGL apps (as you know). Is there a similar concern here? How can we test the impact of the change proposed here?

@w0rm
Copy link
Member Author

w0rm commented Apr 3, 2017

@fredcy the fix was applied to the uniforms of all linear algebra types, not just Mat4: elm-community/webgl@e769047

@fredcy
Copy link
Member

fredcy commented May 19, 2017

I will gladly entertain a PR for this issue.

@w0rm
Copy link
Member Author

w0rm commented Dec 16, 2017

I looked into this again, and I think it is better to use Float32Array because in the end this is what is used WebGL. threejs even has a warning for this

@w0rm w0rm closed this as completed Dec 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants