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

Fix transformations not applied #14

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

aronfiechter
Copy link
Contributor

This PR fixes #12.

It contains also some tests for glb2 files.
I could not test gltf1 files because I don't have a way to create them, but the implementation is the same one, so it should be ok.

@aronfiechter
Copy link
Contributor Author

@flozz will this PR be reviewed? Is this project still being maintained? Otherwise my organization could publish this fixed version on npm as a new package

@@ -63,6 +63,7 @@
},
"dependencies": {
"lodash": "^4.17.5",
"matrixmath": "^2.2.2"
"matrixmath": "^2.2.2",
"three": "^0.103.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late answer !
We don't want to depend on a specific engine like Three, especially as we usually work with Babylonjs. I saw that three was used only in trs-matrix.js to break down matrices. Is it possible to implement functions like multiply, or quaternions in the lib?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see three options:

  • writing a small implementation of affine transformation matrices, but that could be wasted time given that many tested implementations already exist.
  • using a lightweight library that provides affine transformations but does not interfere with babylon, three and others.
  • providing an option to the user to pass his preferred implementation of affine matrices, given a specification of what API is expected; this would most likely require the user to build an adapter class for the library he is using, since they are all different.

Personally I would prefer the second option, but I haven't been able to find a library like that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know https://github.com/toji/gl-matrix develop by Tojiro (but I nevers used it), well know and tested library, feel free to take a look !

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw you were using it and it seemed ok, but the API looked a bit weird to me.
I'll try converting to using that when I have some time.

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

Successfully merging this pull request may close these issues.

Transformations are not applied if they are not in the matrix field
2 participants