requestAnimationFrame without loss context angualar
this.animateCallback = {
callAnimate: (this.animate).bind(this)
};
this.animateCallback.callAnimate();
4
3
protected animate() {
requestAnimationFrame( this.animateCallback.callAnimate );
this.mesh.rotation.x += 1;
this.mesh.rotation.y += 1;
this.renderer.render( this.scene, this.camera );
}
Thank you!
3
0
Are there any code examples left?
New code examples in category Other