Update: CC - Demo New - Entity Loaded (tuby5lj4di.js) 553 bytes modified
parent
0ace6040c8
commit
a0f221e2d5
|
@ -190,13 +190,6 @@ 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);
|
||||
|
||||
/**
|
||||
* Load the next animation
|
||||
*/
|
||||
|
@ -206,7 +199,7 @@ GameLib.CustomCode.prototype.loadNext = function() {
|
|||
|
||||
if (this.currentIndex > this.maxIndex) {
|
||||
this.currentIndex = 0;
|
||||
};
|
||||
}
|
||||
|
||||
var attributeData = this.generateAttributeData(this.currentIndex, 128, 128);
|
||||
|
||||
|
@ -219,6 +212,41 @@ GameLib.CustomCode.prototype.loadNext = function() {
|
|||
|
||||
}.bind(this);
|
||||
|
||||
/**
|
||||
* Performs the actual update to our instanced geometry
|
||||
*/
|
||||
GameLib.CustomCode.prototype.updateAttributeArrays = function(alpha) {
|
||||
|
||||
console.log('animation : ' + alpha);
|
||||
|
||||
var i, offset, scale;
|
||||
|
||||
for (i = 0; i < this.updateInformation.length; i++) {
|
||||
|
||||
offset = this.updateInformation[i].offset;
|
||||
scale = this.updateInformation[i].scale;
|
||||
|
||||
this.offsetAttribute.setXYZ(
|
||||
i,
|
||||
offset.current.lerp(
|
||||
offset.target,
|
||||
alpha
|
||||
)
|
||||
);
|
||||
|
||||
this.scaleAttribute.setXYZ(
|
||||
i,
|
||||
scale.current.lerp(
|
||||
scale.target,
|
||||
alpha
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}.bind(this);
|
||||
|
||||
|
||||
this.buildInstancedGeometry(0);
|
||||
|
||||
this.beforeRender.entityLoaded = this;
|
||||
|
|
Loading…
Reference in New Issue