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

GLTFLoader - unable to access animations #99

Open
alexriva opened this issue Feb 14, 2023 · 1 comment
Open

GLTFLoader - unable to access animations #99

alexriva opened this issue Feb 14, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@alexriva
Copy link

alexriva commented Feb 14, 2023

Please expose the .animations[] array like
drie/src/Loaders/GLTFLoader.vue
162 emit("load" , gltf.scene);

or emit another event ("loadAnimations") ?

@janvorisek janvorisek added the enhancement New feature or request label Feb 14, 2023
@janvorisek janvorisek self-assigned this Feb 14, 2023
@janvorisek
Copy link
Owner

janvorisek commented Feb 21, 2023

I have added a second argument to the load event in @janvorisek/drie@1.0.0-alpha-1.46

Example:

<GLTFLoader
  url="https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Lantern/glTF-Binary/Lantern.glb"
  :position="[2, -4, 0]"
  :scale="[0.1, 0.1, 0.1]"
  :rotation="[Math.PI / 2, Math.PI, 0]"
  @load="loaded"
/>
// m is THREE.Group, a is AnimationClip[]
const loaded = ( m, a) => {
  console.log({ m, a });
};

Please close the issue if resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants