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

feat: VRMUtils.precompileShaders #1554

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
examples: humanoidAnimation, swap order of loading procedure
scene.add should be at after the precompileShaders
  • Loading branch information
0b5vr committed Dec 27, 2024
commit ce2978aaf8378f791eee42056506439128a4bc3e
10 changes: 5 additions & 5 deletions packages/three-vrm/examples/humanoidAnimation/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function loadVRM( modelUrl ) {

loader.register( ( parser ) => {

return new VRMLoaderPlugin( parser, { helperRoot: helperRoot, autoUpdateHumanBones: true } );
return new VRMLoaderPlugin( parser, { autoUpdateHumanBones: true } );

} );

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

}

// put the model to the scene
currentVrm = vrm;
scene.add( vrm.scene );

// Disable frustum culling
vrm.scene.traverse( ( obj ) => {

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

} );

// put the model to the scene
currentVrm = vrm;
scene.add( vrm.scene );

if ( currentAnimationUrl ) {

loadFBX( currentAnimationUrl );
Expand Down
Loading