diff --git a/wlw063ovw9.js b/wlw063ovw9.js index 1c14885..46e4caa 100644 --- a/wlw063ovw9.js +++ b/wlw063ovw9.js @@ -13,6 +13,12 @@ if (!this.initialized) { this.camera = this.entityLoaded.camera; + this.mouseMove = this.entityLoaded.mouseMove; + + this.lookAtTarget = this.entityLoaded.lookAtTarget; + + this.meshImageGrid = this.entityLoaded.meshImageGrid; + this.update = []; this.time = 0; @@ -22,6 +28,19 @@ if (!this.initialized) { this.time += 0.1 * data.delta; +this.lookAtTarget = this.entityLoaded.lookAtTarget; + +if (this.lookAtTarget) { + + var current = this.meshImageGrid.lookAt.instance; + + var newLookAt = current.lerp(this.lookAtTarget, 0.1 * data.delta); + + this.meshImageGrid.instance.lookAt(newLookAt); + +} + + if (this.startAnimation) { this.time = 0; this.animate = true;