29 lines
638 B
JavaScript
29 lines
638 B
JavaScript
if (!this.entityLoaded) {
|
|
return;
|
|
}
|
|
|
|
if (!this.initialized) {
|
|
this.snail = this.entityLoaded.snail;
|
|
this.solar = this.entityLoaded.solar;
|
|
this.camera = this.entityLoaded.camera;
|
|
this.beforeRender = this.entityLoaded.beforeRender;
|
|
|
|
this.initialized = true;
|
|
}
|
|
|
|
this.snail.position.z -= data.event.movementX * 0.01 * this.entityLoaded.speed;
|
|
|
|
if (this.snail.position.z < -4.8) {
|
|
this.snail.position.z = -4.8;
|
|
}
|
|
|
|
if (this.snail.position.z > 4.8) {
|
|
this.snail.position.z = 4.8;
|
|
}
|
|
|
|
this.solar.position.z = this.snail.position.z;
|
|
|
|
this.snail.updateInstance('position');
|
|
this.solar.updateInstance('position');
|
|
|
|
//@ sourceURL=mouseMove.js
|