I want to make an object disappear by an animation like this:
clip.tracks.push(new THREE.NumberKeyframeTrack(`${effectName}.material.opacity`,
[0, 0.33, 3.33, 4],
[1, 0, 0, 1],
), new THREE.BooleanKeyframeTrack(`${effectName}.material.transparent`,
[0, 4],
[true, false],
))
Frames are dropped the first time the animation is played.
Use debug tools, It seems because of the shaders re-compiling.
I try to use renderer.compile(scene, camera)
, but no effects, like this:
effectObject.material.transparent = true
this.renderer.compile(this.scene, this.camera)
effectObject.material.transparent = false
So, how to resolve this question ?