diff --git a/examples/js/animation/cameraPathAnimation.js b/examples/js/animation/cameraPathAnimation.js index e663b6348..714d9cb96 100644 --- a/examples/js/animation/cameraPathAnimation.js +++ b/examples/js/animation/cameraPathAnimation.js @@ -179,7 +179,7 @@ xeogl.CameraPathAnimation = class xeoglCameraPathAnimation extends xeogl.Compone this._t += this._playingRate * f; const numFrames = this.cameraPath.frames.length; - if (numFrames === 0 || (this._playingDir < 0 && this._t <= 0) || (this._playingDir > 0 && this._t >= this.cameraPath.frames[numFrames - 1].t)) { + if (numFrames === 0 || (this._playingDir < 0 && this._t <= 0) || (this._playingDir > 0 && this._t >= 1.0)) { this.state = xeogl.CameraPathAnimation.SCRUBBING; this._t = this.cameraPath.frames[numFrames - 1].t; return; @@ -378,4 +378,4 @@ xeogl.CameraPathAnimation = class xeoglCameraPathAnimation extends xeogl.Compone xeogl.CameraPathAnimation.STOPPED = 0; xeogl.CameraPathAnimation.SCRUBBING = 1; xeogl.CameraPathAnimation.PLAYING = 2; -xeogl.CameraPathAnimation.PLAYING_TO = 3; \ No newline at end of file +xeogl.CameraPathAnimation.PLAYING_TO = 3;