-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
KHR animation pointer #12767
KHR animation pointer #12767
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12767/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge#BCU1XR#0 |
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.map.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.map.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.map.ts
Outdated
Show resolved
Hide resolved
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12767/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge#BCU1XR#0 |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12767/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge#BCU1XR#0 |
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts
Outdated
Show resolved
Hide resolved
packages/dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts
Outdated
Show resolved
Hide resolved
One last comment to resolve, then it looks good to me. We should also add tests and add this extension to the inspector. I can take care of this later. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12767/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12767/merge#BCU1XR#0 |
Former-commit-id: 21b271c7ffb657d84726bca28e1bad194145da26
This is the first version of the
KHR_animation_pointer
for the GLTF loader.The basic idea behind the code is to turn every kind of animation into a pointer, in order to keep only one code path for all. This has been tested with success with all the samples provided as part of the Khronos proposal.
Even if functional, the code is still not very clean and many ehancement must be done in order to reach a certain level of quality. However, calendar issue drive us to put this onto PR rapidely.
AnimateAllTheThings.zip
This can be tested with the file above, which encompass all the cases supported by the
KHR_animation_pointer
.The main changes are located into 3 files.
GLTFLoader
has been simplified by moving all the animation related code to theKHR_animation_pointer.ts
where the extension lies.KHR_animation_pointer.map.ts
contains the pointer tree mapping and miscellaneous function to serve the pointer parsing and logic.All the other change are to support indirection between GLTF entities and Babylon ones. This is subject to discussion, because not very "clean".
May close #12544