r3-custom-code/wlw063ovw9.js

54 lines
1.3 KiB
JavaScript

if (!this.entityLoaded) {
return;
}
if (!this.initialized) {
/**
* attributeData hols the new attribute data we want to animate to
*/
this.animate = false;
this.attributeData = null;
this.camera = this.entityLoaded.camera;
this.update = [];
this.time = 0;
this.initialized = true;
}
this.time += 0.1 * data.delta;
if (this.animate) {
this.time = 0;
}
if (this.time < 1) {
//start interpolating
this.updateAttributeArrays(this.time);
} else {
if (this.animate) {
//perform the last update
this.updateAttributeArrays(1);
this.animate = false;
}
}
//this.camera.position.x = 10;Math.sin(this.time) * 4;// * (window.innerWidth - (window.innerWidth / 2));
//this.camera.position.y = 10;Math.sin(this.time / 2) * 4;//Math.cos(this.time) * (window.innerHeight - (window.innerHeight / 2));
//this.camera.position.z = 10;-Math.sin(this.time) * 5;//Math.sin(this.camera.position.y) * Math.cos(this.camera.position.x);
//this.camera.updateInstance('position');
//this.camera.lookAt.x = 0;
//this.camera.lookAt.y = 0;
//this.camera.lookAt.z = 0;
//this.camera.updateInstance('lookAt');
// if (this.audioDrone.volume < 0.1) {
// this.audioDrone.volume += 0.001;
// this.audioDrone.updateInstance('volume');
// }
//@ sourceURL=beforeRender.js