Update: CC - Demo New - Entity Loaded (tuby5lj4di.js) 85 bytes modified
parent
0b6f2eabca
commit
722c1a9ae0
|
@ -221,28 +221,34 @@ GameLib.CustomCode.prototype.updateAttributeArrays = function(alpha) {
|
||||||
|
|
||||||
var i, offset, scale;
|
var i, offset, scale;
|
||||||
|
|
||||||
|
var offsets = [];
|
||||||
|
var scales = [];
|
||||||
|
|
||||||
|
var v = new THREE.Vector3();
|
||||||
|
|
||||||
for (i = 0; i < this.updateInformation.length; i++) {
|
for (i = 0; i < this.updateInformation.length; i++) {
|
||||||
|
|
||||||
offset = this.updateInformation[i].offset;
|
offset = this.updateInformation[i].offset;
|
||||||
scale = this.updateInformation[i].scale;
|
scale = this.updateInformation[i].scale;
|
||||||
|
|
||||||
this.offsetAttribute.setXYZ(
|
v = offset.current.lerp(
|
||||||
i*3,
|
|
||||||
offset.current.lerp(
|
|
||||||
offset.target,
|
offset.target,
|
||||||
alpha
|
alpha
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.scaleAttribute.setXYZ(
|
offsets.push(v.x, v.y, v.z);
|
||||||
i*3,
|
|
||||||
scale.current.lerp(
|
v = scale.current.lerp(
|
||||||
scale.target,
|
scale.target,
|
||||||
alpha
|
alpha
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
scales.push(v.x, v.y, v.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.offsetAttribute.setArray(new Float32Array(offsets));
|
||||||
|
this.scaleAttribute.setArray(new Float32Array(scales));
|
||||||
|
|
||||||
this.offsetAttribute.needsUpdate = true;
|
this.offsetAttribute.needsUpdate = true;
|
||||||
this.scaleAttribute.needsUpdate = true;
|
this.scaleAttribute.needsUpdate = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue