Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created December 16, 2023 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/69172945db2196ddab9d3707508d07de to your computer and use it in GitHub Desktop.
Save flushpot1125/69172945db2196ddab9d3707508d07de to your computer and use it in GitHub Desktop.
BABYLON.SceneLoader.ImportMesh("", "https://assets.babylonjs.com/meshes/", "HVGirl.glb", scene, function (newMeshes, particleSystems, skeletons, animationGroups) {
var hero = newMeshes[0];
//Scale the model down
hero.scaling.scaleInPlace(0.1);
//Lock camera on the character
camera.target = hero;
//Get the Samba animation Group
const sambaAnim = scene.getAnimationGroupByName("Samba");
//Play the Samba animation
sambaAnim.start(true, 1.0, sambaAnim.from, sambaAnim.to, false);
//新しく追加。アバター hero を構成しているメッシュをInspectorツールで調べて、その情報を取得する
for (var i=0;i<11;i++){
character_parts[i] = scene.getMeshByName("HVGirl_primitive"+i);
}
createMirror(character_parts);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment