Update: CC - Entity Loaded - Moorcow (hv7vehw7se.js) 679 bytes modified
parent
05e626d91c
commit
14aaf68a63
|
@ -1428,6 +1428,37 @@ burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5;
|
||||||
burningTreeParticleEngine.updateInstance('position');
|
burningTreeParticleEngine.updateInstance('position');
|
||||||
this.treeLarge.burningTreeParticleEngine = burningTreeParticleEngine;
|
this.treeLarge.burningTreeParticleEngine = burningTreeParticleEngine;
|
||||||
|
|
||||||
|
|
||||||
|
for (var x = -200; x < 200; x += 10) {
|
||||||
|
var random = GameLib.Utils.GetRandomIntInclusive(1, 3);
|
||||||
|
|
||||||
|
if (random === 1) {
|
||||||
|
mesh = treeSmall.clone();
|
||||||
|
}
|
||||||
|
if (random === 2) {
|
||||||
|
mesh = treeMedium.clone();
|
||||||
|
}
|
||||||
|
if (random === 3) {
|
||||||
|
mesh = treeLarge.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
material = materialTreesAndRocks.clone();
|
||||||
|
mesh.materials = [material];
|
||||||
|
mesh.position.x = x;
|
||||||
|
mesh.position.z = -185 + Math.random() * 10;
|
||||||
|
mesh.rotation.x = 0;
|
||||||
|
mesh.rotation.y = Math.random() * 3;
|
||||||
|
mesh.rotation.z = 0;
|
||||||
|
mesh.scale.x = 5;
|
||||||
|
mesh.scale.y = 5;
|
||||||
|
mesh.scale.z = 5;
|
||||||
|
mesh.updateInstance('materials');
|
||||||
|
mesh.updateInstance('position');
|
||||||
|
mesh.updateInstance('rotation');
|
||||||
|
mesh.updateInstance('scale');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
this.treeSmall.visible = false;
|
this.treeSmall.visible = false;
|
||||||
this.treeSmall.updateInstance('visible');
|
this.treeSmall.updateInstance('visible');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue