remove SkinViewer.animationSpeed

changing SkinViewer.animationSpeed will cause the animation to be
discontinuous, use AnimationHandle.speed instead
This commit is contained in:
yushijinhun 2018-02-02 18:27:09 +08:00
parent eb8723580d
commit cc8ada005d
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
1 changed files with 1 additions and 2 deletions

View File

@ -58,7 +58,6 @@ class SkinViewer {
this.domElement = options.domElement; this.domElement = options.domElement;
this.animation = options.animation || null; this.animation = options.animation || null;
this.animationPaused = false; this.animationPaused = false;
this.animationSpeed = 3;
this.animationTime = 0; this.animationTime = 0;
this.disposed = false; this.disposed = false;
@ -161,7 +160,7 @@ class SkinViewer {
if (!this.animationPaused) { if (!this.animationPaused) {
this.animationTime++; this.animationTime++;
if (this.animation) { if (this.animation) {
invokeAnimation(this.animation, this.playerObject, this.animationTime / 100.0 * this.animationSpeed); invokeAnimation(this.animation, this.playerObject, this.animationTime / 100.0);
} }
} }
this.renderer.render(this.scene, this.camera); this.renderer.render(this.scene, this.camera);