Update: CC - SnailRunner - Entity Loaded (78gnds8jrj.js) 346 bytes modified

beta.r3js.org
-=yb4f310 2018-03-09 17:15:23 +01:00
parent 781a71671e
commit 727b598e3c
1 changed files with 8 additions and 0 deletions

View File

@ -38,6 +38,9 @@ this.initialCameraPosition = new THREE.Vector3(0, 1.1, 0);
this.maximumCameraPosition = new THREE.Vector3(0, 2.6, 0);
this.currentCameraPosition = new THREE.Vector3(0, 1.1, 0);
this.initialCameraFOV = new THREE.Vector3(0, 40, 0);
this.maximumCameraFOV = new THREE.Vector3(0, 90, 0);
this.currentCameraFOV = new THREE.Vector3(0, 40, 0);
/**
* Camera, Raycaster, Mouse
@ -177,10 +180,15 @@ GameLib.CustomCode.prototype.adjustSpeed = function(delta) {
this.speedPercentage = this.speed / this.maxSpeed;
this.currentCameraPosition.lerpVectors(this.initialCameraPosition, this.maximumCameraPosition, this.speedPercentage);
this.currentCameraPFOV.lerpVectors(this.initialCameraFOV, this.maximumCameraFOV, this.speedPercentage);
this.camera.position.y = this.currentCameraPosition.y;
this.camera.updateInstance('position');
this.camera.fov = this.currentCameraFOV;
this.camera.updateInstance('fov');
}.bind(this);
GameLib.CustomCode.prototype.adjustSnailPosition = function(delta) {