Initial Commit: CC - SnailRunner - Mouse Move (sossh1zbtq.js)

beta.r3js.org
-=yb4f310 2018-03-08 11:44:29 +01:00
parent 46a3b3b7f1
commit 234f426733
1 changed files with 26 additions and 0 deletions

26
sossh1zbtq.js Normal file
View File

@ -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