-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Removing ThreejsRenderer class and Threejs refs #180
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- removing all three.js reference in the code
kalwalt
added
🚀 enhancement
New feature or request
Three.js
WIP
issue or PR Works In Progress
code-design
labels
May 19, 2021
This was referenced May 19, 2021
Closed
kalwalt
changed the title
Removing from ARnft ThreejsRenderer and Threejs
Removing ThreejsRenderer class and Threejs refs
May 19, 2021
- necessary to make sure that canvas and video are properly initiated
- objVisiblity not working ( need to be added inside ARnft-threejs) - updated container example
kalwalt
force-pushed
the
removing-ThreejsRenderer
branch
from
May 22, 2021 20:03
8f58a80
to
24bcdae
Compare
This was referenced May 24, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduction
This PR will remove the ThreejsRenderer class and all the references to Three.js in the code. It's a necessary step to make the library free from any rendering engine and to provide alternative packages for different rendering engines.
Code details and changes
I removed the ThreejsRenderer class, but how a Threejs object is attached to te NFT marker? The most important thing is to pass the MatrixGL_RH coming from the Worker to the Threejs Object3d. To achieve this we use an event listener to pass the matrix data to the Threejs Object3D (the root object). This is done in the ARnftThreejs dev branch package now, that part of the code was originallly in the ThreejsRenderer class.
Possible issues
What happens if we use multi NFT markers in a row? They will pass the right NFT marker matrix? to prevent this issue i propose to add a uuid to the eventListener for every marker so it will get the right matrix data.
Inside Arnft we have:
ARnft/src/utils/Utils.js
Lines 133 to 134 in d4511c0
If we add:
and providing the same uuid to ARnft-Threejs, wouldn't works?