Update: CC - Demo New - Before Render (wlw063ovw9.js) 45 bytes modified
parent
0764723877
commit
54f114e64c
|
@ -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.animate) {
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue