Update: CC - SnailRunner - Entity Loaded (78gnds8jrj.js) 346 bytes modified
parent
781a71671e
commit
727b598e3c
|
@ -38,6 +38,9 @@ this.initialCameraPosition = new THREE.Vector3(0, 1.1, 0);
|
||||||
this.maximumCameraPosition = new THREE.Vector3(0, 2.6, 0);
|
this.maximumCameraPosition = new THREE.Vector3(0, 2.6, 0);
|
||||||
this.currentCameraPosition = new THREE.Vector3(0, 1.1, 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
|
* Camera, Raycaster, Mouse
|
||||||
|
@ -177,10 +180,15 @@ GameLib.CustomCode.prototype.adjustSpeed = function(delta) {
|
||||||
this.speedPercentage = this.speed / this.maxSpeed;
|
this.speedPercentage = this.speed / this.maxSpeed;
|
||||||
|
|
||||||
this.currentCameraPosition.lerpVectors(this.initialCameraPosition, this.maximumCameraPosition, this.speedPercentage);
|
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.position.y = this.currentCameraPosition.y;
|
||||||
this.camera.updateInstance('position');
|
this.camera.updateInstance('position');
|
||||||
|
|
||||||
|
this.camera.fov = this.currentCameraFOV;
|
||||||
|
this.camera.updateInstance('fov');
|
||||||
|
|
||||||
|
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
GameLib.CustomCode.prototype.adjustSnailPosition = function(delta) {
|
GameLib.CustomCode.prototype.adjustSnailPosition = function(delta) {
|
||||||
|
|
Loading…
Reference in New Issue