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

Fix/101: Type 'GLTFActions' constraint to 'AnimationClip' #193

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

rafelis1997
Copy link
Contributor

What kind of problem this solves

  • - Bug Fixes
  • - New Feature
  • - Breaking Change
  • - Documentation Updates

Context

This PR look to solve the problem addressed on the Issue 101:
issue-101

The solution proposed by @Glavin001 seams to be great and solve the issue with good clean types reducing complexity on useAnimation hook.

How to test

  • Run the the gltfjsx.js file
  • Import .glb | .gltf file
  • Look for a typed JSX the follows this standard:
 // ...
 interface GLTFAction extends THREE.AnimationClip {
   name: ActionName;
}
// ...
type GLTFResult = GLTF & {
  nodes: {
// ...
  }
  materials: {
// ...
  }
  animations: GLTFAction[];
}
// ...
const { actions } = useAnimations(animations, group);

Issue

issue-101

@drcmda drcmda merged commit 1990133 into pmndrs:master Dec 21, 2023
3 checks passed
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