I have found some discrepancies between a project I have running locally and one on the online [script] editor. I think it may be to do with the version of three.js I am importing locally via a cdn. I was wondering, how would I:
- Verify the version being used on the online editor
- Update the cdn path to import the same version to my local project
Thanks in advance.
Callum
Are you asking about the three.js version in Editor or Studio? In Editor it depends on the project since you have full control over the imports. You can find the three.js version by looking at the head.html for example:
In the editor, not the studio. So I’m assuming the line below is the threejs import at version 123, is that correct?
<meta name="8thwall:renderer" content="threejs:123">
In my local project I have this import line which also looks like it’s importing v123, is this assumption also correct?
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r123/three.min.js"></script>
Okay, do you know why potentially I’m seeing different results in the editor vs my local version? Both are using the same logic to play an GLB’s animation, however if I change all the materials to be a MeshBasicMaterial in the local version the animation breaks. If I change all the materials to be MeshBasicMaterial in the editor it works correctly. Below are code snippets from the two versions.
Local Version
const animationMixer = new THREE.AnimationMixer()
const clip = animationMixer.clipAction(animations[0], scene)
animationMixers.push(animationMixer)
clip.setLoop(THREE.LoopOnce)
clip.reset()
clip.clampWhenFinished = true
clip.play()
Editor Version
mixer = new THREE.AnimationMixer(e.scene)
const animClip = mixer.clipAction(e.animations[0], e.scene)
animClip.setLoop(THREE.LoopOnce)
animClip.reset()
animClip.play()
Can you share a copy of the model file?