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 threejs for tesseract_viewer_python instead of babylonjs #21

Merged
merged 2 commits into from
Apr 2, 2022

Conversation

johnwason
Copy link
Contributor

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.

@johnwason johnwason merged commit 8d9db16 into tesseract-robotics:master Apr 2, 2022
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.

2 participants