Update: CC - Demo New - Before Render (wlw063ovw9.js) 424 bytes modified
parent
896cf4363d
commit
11a726c7df
|
@ -13,6 +13,12 @@ if (!this.initialized) {
|
||||||
|
|
||||||
this.camera = this.entityLoaded.camera;
|
this.camera = this.entityLoaded.camera;
|
||||||
|
|
||||||
|
this.mouseMove = this.entityLoaded.mouseMove;
|
||||||
|
|
||||||
|
this.lookAtTarget = this.entityLoaded.lookAtTarget;
|
||||||
|
|
||||||
|
this.meshImageGrid = this.entityLoaded.meshImageGrid;
|
||||||
|
|
||||||
this.update = [];
|
this.update = [];
|
||||||
|
|
||||||
this.time = 0;
|
this.time = 0;
|
||||||
|
@ -22,6 +28,19 @@ if (!this.initialized) {
|
||||||
|
|
||||||
this.time += 0.1 * data.delta;
|
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) {
|
if (this.startAnimation) {
|
||||||
this.time = 0;
|
this.time = 0;
|
||||||
this.animate = true;
|
this.animate = true;
|
||||||
|
|
Loading…
Reference in New Issue