Use threejs for tesseract_viewer_python instead of babylonjs #21
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.
Threejs has improved and babylonjs has made some changes that are not helpful, so the viewer is being updated to use the more common threejs.
The Python module in the viewer has been modified to generate a gltf2 file of the scene instead of a babylonjs json file. Gltf2 was selected as the file format since it is pretty similar to babylonjs and threejs json formats, but can be loaded by any viewer, providing more flexibility. The main difference is that gltf2 stores the raw data in a binary blob rather than in the json text. This provides better numeric precision and is more efficient.
VR support is available, but threejs does not have a good "teleport" control scheme. There are some projects attempting to implement this functionality, but I haven't found them to work very well: https://github.com/Sean-Bradley/TeleportVR
Babylonjs has a really good teleport control scheme, which is implemented here: https://github.com/BabylonJS/Babylon.js/blob/fdbf393d1d7699dc7cc69cec1dca0819ebd2622a/packages/dev/core/src/XR/features/WebXRControllerTeleportation.ts It should be possible to "borrow" the teleport implementation for threejs. For the moment VR teleport functionality is not important, so I haven't implemented it. VR in general does work fine, and is quite impressive on my Oculus Quest.