Closed cx20 closed 2 years ago
@cx20 parsingResult内部のanimations配列を利用してください切り替えは可能です。
RedGLTFLoader(
this, assetPath + 'glTF/basic/AnimatedMorphCube/glTF/',
'AnimatedMorphCube.gltf',
function (v) {
console.log(v.parsingResult) // check this!
// v.stopAnimation()
// v.playAnimation(v.parsingResult.animations[0])
tScene.addChild(v['resultMesh'])
}
);
Hmm, I tried to select the Run
animation in Fox.gltf
but it didn't seem to switch.
https://github.com/cx20/gltf-test/blob/master/examples/redgl2/index.js#L89-L90
RedGLTFLoader(
this, // redGL
base, // assetRootPath
file, // fileName
function (v) { // callBack
v['resultMesh'].scaleX = scale;
v['resultMesh'].scaleY = scale;
v['resultMesh'].scaleZ = scale;
if (modelInfo.name == "Fox") {
v.stopAnimation();
v.playAnimation(v.parsingResult.animations[2]); // "Run"
}
tScene.addChild(v['resultMesh']);
},
@cx20 ロードした後プレイ管理側のバグを発見した。 いつがから発生したとみられ、今日夜遅くでも修正しておきました。いつも良いフィードバックありがとうございます。
@redcamel
I'm trying the libraries in the release folder but the situation doesn't seem to change. The modified date of the file is 2020.03.18. Isn't it the latest version? https://github.com/redcamel/RedGL2/blob/dev/release/RedGL.js
Do I need to build the latest version?
I tried to display Fox.gltf using RedGL. Fox.gltf contains three animations (
Survey
,Walk
, andRun
). However, I did not know how to switch it.RedGL + Fox.gltf result: By default, the
Survey
animation is played.I want to play the
Run
animation, but I don't know how. I'm glad if you get some advice.