Update: CC - Demo New - Before Render (wlw063ovw9.js) 45 bytes modified

beta.r3js.org
-=yb4f310 2018-02-16 12:22:41 +01:00
parent 0764723877
commit 54f114e64c
1 changed files with 10 additions and 8 deletions

View File

@ -7,6 +7,7 @@ if (!this.initialized) {
/**
* attributeData hols the new attribute data we want to animate to
*/
this.startAnimation = false;
this.animate = false;
this.attributeData = null;
@ -21,21 +22,22 @@ if (!this.initialized) {
this.time += 0.1 * data.delta;
if (this.animate) {
if (this.startAnimation) {
this.time = 0;
this.animation = true;
this.startAnimation = false;
}
if (this.time < 1) {
//start interpolating
this.updateAttributeArrays(this.time);
} else {
if (this.animate) {
//perform the last update
if (this.animate) {
if (this.time < 1) {
this.updateAttributeArrays(this.time);
} else {
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);