-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parity with gl-matrix? #1
Comments
Thanks for getting gl-mat4 up! Looks good :) Is Aliases are easy to add, and I'm happy for them to be in there :) Tests would be great! Yeah, wondering if we could automate the generation of these modules, and extract the existing tests too. At that point we could even try testing them against the gl-matrix repo tests to see if we're falling behind. |
Shared constants are tricky since anything could change them... But it would still be useful to have the type check in create(), clone() etc so it works the same in older browsers. Not sure how important it is that epsilon/random functions can be changed by the user. |
Ah yep, that makes sense! I'm 👍 for falling back to vanilla arrays on older browsers :) Epsilon might need changing in some places. I've noticed things breaking in the past for being oversensitive. Random's just being used for |
Toji has converted to a more modular format which uses webpack for the workflow. Wouldn't it be best for us to simply use his refactored code driectly? We could more easily keep up with releases. Check out https://github.com/toji/gl-matrix/tree/master/src which has the master gl-matrix simply be several imports of the refactored source. |
Some thoughts on that:
|
@mattdesl those are all great points but I'm curious what @toji's thoughts are. I'm just getting into webgl and it's confusing to have such similar and well maintained / well adopted packages as a newcomer. Plus, if I want to use gl-matrix for the SIMD support then I can't use most of the stackgl packages without having duplicate vec/mat libraries. |
I think @mattdesl points are very valid. It's valuable to adhere to the core goals of the libray: gl-matrix goes out of it's way to avoid introducing explicit classes for the various types, even when that would make some things easier (like SIMD). Similarly this library goes out of it's way to maintain strict modularity. I don't think introducing a formal dependency on my library serves that goal. That said, if there's any sort of code or style tweaks that I could make to gl-matrix that would improve the workflow for migrating new features to this library I'm happy to discuss them! |
@toji for me the restructuring you've done eases any modularity concerns. Between webpack's dead code elimination and the ability to import individual components I don't have any issues there. 👍 for the restructuring though I'm also a big fan of the simplified imports you get by having these components in a single package.
Although they're not identical concerns, they are related. It's also nice to have a single github project to go to for issues related to vec/mat math. Personally I'm just bummed I can't use some of the drop-in stackgl components without adding duplicate code. Especially when the libraries are functionally equivalent. |
I think more documentation in these repos would help, and clearer explanation about the philosophical differences to
Unless I'm mistaken, you will still end up importing the entire
Yes, it's a bummer. But it would be more of a bummer if all the current dependents on One solution would be to refactor
Even SIMD is a lot of extra code for (currently) little gain. Only works in FF nightly, only works on typed arrays, introduces a new avenue for bugs, and the extra performance may be negligible given your use case. Ultimately I think it's OK to keep things separate for now. Once ES6 and tree-shaking becomes common place in Node/npm/browser, maybe it will be easier to merge the projects. |
Hopefully not OT, but have we considered es6 modules, both syntax and I've used es6/JSPM for a recent webgl mooc by Ed Angel and loved it. I used The biggest problem is that there are multiple systems for module loading. |
ES6 would be great for However, Even with all this, there's no point in moving all the |
Thinking about doing the same for gl-mat4. How close are we matching gl-matrix? Couple issues I've noticed:
idt
ormul
Some other questions...
EDIT:
For the most part, the original gl-matrix files can be split pretty easily and automatically with regexes.. maybe worth considering.
The text was updated successfully, but these errors were encountered: