Update: CC - Entity Loaded - Moorcow (hv7vehw7se.js) 44 bytes modified
parent
8a02d88c27
commit
e5183f21a7
|
@ -1429,37 +1429,41 @@ 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) {
|
for (var x = -50; x < 50; x += 10) {
|
||||||
mesh = treeSmall.clone();
|
|
||||||
mesh.position.y = -14.19;
|
|
||||||
}
|
|
||||||
if (random === 2) {
|
|
||||||
mesh = treeMedium.clone();
|
|
||||||
mesh.position.y = -10.26;
|
|
||||||
}
|
|
||||||
if (random === 3) {
|
|
||||||
mesh = treeLarge.clone();
|
|
||||||
mesh.position.y = -4.43;
|
|
||||||
}
|
|
||||||
|
|
||||||
material = materialTreesAndRocks.clone();
|
for (var z = -170; z > -230; z -= 10) {
|
||||||
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');
|
|
||||||
|
|
||||||
|
var random = GameLib.Utils.GetRandomIntInclusive(1, 3);
|
||||||
|
|
||||||
|
if (random === 1) {
|
||||||
|
mesh = treeSmall.clone();
|
||||||
|
mesh.position.y = -14.19;
|
||||||
|
}
|
||||||
|
if (random === 2) {
|
||||||
|
mesh = treeMedium.clone();
|
||||||
|
mesh.position.y = -10.26;
|
||||||
|
}
|
||||||
|
if (random === 3) {
|
||||||
|
mesh = treeLarge.clone();
|
||||||
|
mesh.position.y = -4.43;
|
||||||
|
}
|
||||||
|
|
||||||
|
material = materialTreesAndRocks.clone();
|
||||||
|
mesh.materials = [material];
|
||||||
|
mesh.position.x = x;
|
||||||
|
mesh.position.z = z;
|
||||||
|
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;
|
||||||
|
|
Loading…
Reference in New Issue