Skip to content
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

Use DOMMatrix for element transforms, map them to THREE.Matrix4, provide a new math library. #269

Open
trusktr opened this issue Jul 2, 2023 · 0 comments

Comments

@trusktr
Copy link
Member

trusktr commented Jul 2, 2023

For consistency with DOM APIs like CSS 3D transforms, and in order to be able to eventually be able to provide alternative Lume renderers that may have different coordinate systems, we need to make a standardize on using DOMMatrix for transforms of the elements, then we'll map these to the underlying renderer (f.e. currently we'll map this to Three.js Matrix4 underneath).

We will then also provide an additional math lib that provides parity with Three.js Matrix4, but for DOMMatrix.

Once these are in place, people will have a standard DOM-based way to modify matrices of the elements, regardless if we (later) swap out Three.js for Babylon, PlayCanvas, Unity for web, Unreal for web, or etc.

Eventually we once can are ready to compile to WebAssembly, we'll need to finish converting our fork of Three.js to TypeScript compatible for Wasm, and then we can replace Matrix4 with DOMMatrix to make the ideal DOM-standard 3D library.

@trusktr trusktr changed the title Standardize on using DOMMatrix for element transforms, along with a new math library. Use DOMMatrix for element transforms, map them to THREE.Matrix4, provide a new math library. Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant