Skip to content

Commit ce2978a

Browse files
committed
examples: humanoidAnimation, swap order of loading procedure
scene.add should be at after the precompileShaders
1 parent 168fa11 commit ce2978a

File tree

1 file changed

+5
-5
lines changed
  • packages/three-vrm/examples/humanoidAnimation

1 file changed

+5
-5
lines changed

packages/three-vrm/examples/humanoidAnimation/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function loadVRM( modelUrl ) {
4949

5050
loader.register( ( parser ) => {
5151

52-
return new VRMLoaderPlugin( parser, { helperRoot: helperRoot, autoUpdateHumanBones: true } );
52+
return new VRMLoaderPlugin( parser, { autoUpdateHumanBones: true } );
5353

5454
} );
5555

@@ -75,10 +75,6 @@ function loadVRM( modelUrl ) {
7575

7676
}
7777

78-
// put the model to the scene
79-
currentVrm = vrm;
80-
scene.add( vrm.scene );
81-
8278
// Disable frustum culling
8379
vrm.scene.traverse( ( obj ) => {
8480

@@ -93,6 +89,10 @@ function loadVRM( modelUrl ) {
9389

9490
} );
9591

92+
// put the model to the scene
93+
currentVrm = vrm;
94+
scene.add( vrm.scene );
95+
9696
if ( currentAnimationUrl ) {
9797

9898
loadFBX( currentAnimationUrl );

0 commit comments

Comments
 (0)