Update: CC - Demo New - Entity Loaded (tuby5lj4di.js) 131 bytes modified

beta.r3js.org
-=yb4f310 2018-02-16 12:34:49 +01:00
parent 17068a817f
commit 1bb97179ab
1 changed files with 13 additions and 6 deletions

View File

@ -143,11 +143,9 @@ GameLib.CustomCode.prototype.buildInstancedGeometry = function(index) {
}.bind(this);
GameLib.CustomCode.prototype.startAnimation = function(attributeData) {
this.generateAnimationVectors(attributeData);
this.beforeRender.startAnimation = true;
}.bind(this);
/**
* Builds update information holding our current position and scale, and our target position and scale
*/
GameLib.CustomCode.prototype.generateAnimationVectors = function(attributeData) {
if (!attributeData) {
@ -192,6 +190,9 @@ GameLib.CustomCode.prototype.generateAnimationVectors = function(attributeData)
}
}.bind(this);
/**
* Performs the actual update to our instanced geometry
*/
GameLib.CustomCode.prototype.updateAttributeArrays = function(alpha) {
console.log('animation : ' + alpha);
}.bind(this);
@ -209,7 +210,13 @@ GameLib.CustomCode.prototype.loadNext = function() {
var attributeData = this.generateAttributeData(this.currentIndex, 128, 128);
this.startAnimation(attributeData);
this.generateAnimationVectors(attributeData);
/**
* Notify our render component that we are ready to start animating
*/
this.beforeRender.startAnimation = true;
}.bind(this);
this.buildInstancedGeometry(0);