-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add initial LOD functionality. #185
Conversation
New Bugs.
So basically, my take away is that in the process of enabling LOD we are somehow no longer pulling rotation, position of scale of objects within said GLB. Now if I rotate the GLB itself from that native that rotation is being respected, but all the internal object transforms are being ignored. To shake things up I added a regular (non-LOD) cube to the glb file and confirmed that it's rotation and position are indeed being honored still. You can see it floating in the sky instead of being pulled to 0,0,0 like the LOD objects. GLB with two sets of LOD objects and a random non-LOD cube for testing. |
…ed as LODs for roots.
Use native `for-of` instead of `Lodash.forEach`.
Use `instanceof` to explicitly check the type of `mesh`, instead of casting it.
Follows the following conventions. See docs too: https://doc.babylonjs.com/features/featuresDeepDive/mesh/LOD
[name]_LOD{ level }_{ mode }_{ override }
Levels are:
e.g.
LODHIDE
Modes are (optional):
Overrides are (optional):
P.S. Need to fix up linting, it gets hecka annoying but it was inactive before.