File tree 2 files changed +2498
-2029
lines changed
2 files changed +2498
-2029
lines changed Original file line number Diff line number Diff line change 146
146
// copy projection matrix to camera
147
147
camera . projectionMatrix . copy ( arToolkitContext . getProjectionMatrix ( ) ) ;
148
148
} )
149
- console . log ( arToolkitContext ) ;
150
149
151
150
////////////////////////////////////////////////////////////////////////////////
152
151
// Create a ArMarkerControls
174
173
threeGLTFLoader . load ( "./resources/Flamingo.glb" , function ( gltf ) {
175
174
model = gltf . scene . children [ 0 ] ;
176
175
model . name = 'Flamingo' ;
176
+ const clips = gltf . animations ;
177
177
178
178
var animation = gltf . animations [ 0 ] ;
179
- var mixer = new THREE . AnimationMixer ( model ) ;
179
+ var mixer = new THREE . AnimationMixer ( gltf . scene ) ;
180
180
mixers . push ( mixer ) ;
181
- var action = mixer . clipAction ( animation ) ;
181
+ const clip = THREE . AnimationClip . findByName ( clips , 'flamingo_flyA_' ) ;
182
+ var action = mixer . clipAction ( clip ) ;
182
183
action . play ( ) ;
183
184
184
185
root . matrixAutoUpdate = false ;
You can’t perform that action at this time.
0 commit comments