Initial Commit: CC - SnailRunner - Mouse Move (jz3qg0174l.js)
parent
3fe08c688f
commit
49a4547c0f
|
@ -0,0 +1,26 @@
|
||||||
|
if (!this.entityLoaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.initialized) {
|
||||||
|
this.snail = this.entityLoaded.snail;
|
||||||
|
this.solar = this.entityLoaded.solar;
|
||||||
|
this.initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.snail.position.z += data.event.movementX * 0.0002;
|
||||||
|
|
||||||
|
if (this.snail.position.z < -0.1) {
|
||||||
|
this.snail.position.z = -0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.snail.position.z > 0.1) {
|
||||||
|
this.snail.position.z = 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.solar.position.z = this.snail.position.z;
|
||||||
|
|
||||||
|
this.snail.updateInstance('position');
|
||||||
|
this.solar.updateInstance('position');
|
||||||
|
|
||||||
|
//@ sourceURL=mouseMove.js
|
Loading…
Reference in New Issue