Update: CC - Entity Loaded - Moorcow (xtihcyhagp.js) 5700 bytes modified
parent
fd4bbfdcfa
commit
e197c0bc4e
452
xtihcyhagp.js
452
xtihcyhagp.js
|
@ -1,7 +1,7 @@
|
|||
if (this.parentEntity === data.entity) {
|
||||
console.log('my entity loaded :)');
|
||||
console.log('my entity loaded :)');
|
||||
} else {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
this.enemies = [];
|
||||
|
@ -15,128 +15,100 @@ GameLib.D3.CustomCode.MAX_SPAWN_TIME = 4;
|
|||
/**
|
||||
* Create references to all our 'in game' objects
|
||||
*/
|
||||
this.fog = GameLib.EntityManager.Instance.findComponentById('79991jn537')
|
||||
this.bull = GameLib.EntityManager.Instance.findComponentById('3ukj1d5uk6');
|
||||
this.star = GameLib.EntityManager.Instance.findComponentById('t7tbkzi878');
|
||||
this.burger = GameLib.EntityManager.Instance.findComponentById('d7umjpq7gx');
|
||||
this.parcel = GameLib.EntityManager.Instance.findComponentById('n1o7m0xbwb');
|
||||
this.santa = GameLib.EntityManager.Instance.findComponentById('jfkekpln3k');
|
||||
this.camera = GameLib.EntityManager.Instance.findComponentById('we15t09ijh');
|
||||
this.scene = GameLib.EntityManager.Instance.findComponentById('ehjmi1wd09');
|
||||
this.cursor = GameLib.EntityManager.Instance.findComponentById('s7qlcgc7ex');
|
||||
this.dom = GameLib.EntityManager.Instance.findComponentById('8wddxgkkyg');
|
||||
this.fog = GameLib.EntityManager.Instance.findComponentById('2wgl4d7uch')
|
||||
this.bull = GameLib.EntityManager.Instance.findComponentById('aqu0o39q3g');
|
||||
this.star = GameLib.EntityManager.Instance.findComponentById('ucaqp8rzty');
|
||||
this.burger = GameLib.EntityManager.Instance.findComponentById('r8ztuba1ni');
|
||||
this.parcel = GameLib.EntityManager.Instance.findComponentById('ai3o44wd0a');
|
||||
this.santa = GameLib.EntityManager.Instance.findComponentById('kcp1y8q5p7');
|
||||
this.camera = GameLib.EntityManager.Instance.findComponentById('48qet53m86');
|
||||
this.scene = GameLib.EntityManager.Instance.findComponentById('3nolkbbc7j');
|
||||
this.cursor = GameLib.EntityManager.Instance.findComponentById('gkkoz2irxe');
|
||||
this.dom = GameLib.EntityManager.Instance.findComponentById('bagyiej8o9');
|
||||
|
||||
this.renderer = GameLib.EntityManager.Instance.findComponentById('e4xb4aw01w');
|
||||
this.thrower = GameLib.EntityManager.Instance.findComponentById('7hfuqjfhmu');
|
||||
this.renderer = GameLib.EntityManager.Instance.findComponentById('e4xb4aw01w');
|
||||
this.treeSmall = GameLib.EntityManager.Instance.findComponentById('obktqebiyq');
|
||||
this.treeMedium = GameLib.EntityManager.Instance.findComponentById('6q5wtr7ysh');
|
||||
this.treeLarge = GameLib.EntityManager.Instance.findComponentById('rhxam27zv7');
|
||||
this.stone1 = GameLib.EntityManager.Instance.findComponentById('qc40ij8rru');
|
||||
this.stone2 = GameLib.EntityManager.Instance.findComponentById('iwhdd7rf1e');
|
||||
this.kanister = GameLib.EntityManager.Instance.findComponentById('kyva0rd3ie');
|
||||
this.renderer = GameLib.EntityManager.Instance.findComponentById('4mkwbx1vku');
|
||||
this.thrower = GameLib.EntityManager.Instance.findComponentById('w176oinkdw');
|
||||
//this.renderer = GameLib.EntityManager.Instance.findComponentById('e4xb4aw01w');
|
||||
this.treeSmall = GameLib.EntityManager.Instance.findComponentById('7tovvhn9qf');
|
||||
this.treeMedium = GameLib.EntityManager.Instance.findComponentById('doum0joyd1');
|
||||
this.treeLarge = GameLib.EntityManager.Instance.findComponentById('uhl0lar6qn');
|
||||
this.stone1 = GameLib.EntityManager.Instance.findComponentById('jnlpuzn81z');
|
||||
this.stone2 = GameLib.EntityManager.Instance.findComponentById('i6ysiguhsh');
|
||||
this.kanister = GameLib.EntityManager.Instance.findComponentById('81wsdpbgut');
|
||||
|
||||
this.leftLight = GameLib.EntityManager.Instance.findComponentById('7lwsmhe3q3');
|
||||
this.rightLight = GameLib.EntityManager.Instance.findComponentById('coo9gj0cut');
|
||||
this.throwerLight = GameLib.EntityManager.Instance.findComponentById('knzoglpa2k');
|
||||
this.leftLight = GameLib.EntityManager.Instance.findComponentById('wn2mdb2orv');
|
||||
this.rightLight = GameLib.EntityManager.Instance.findComponentById('2vhyv0dz59');
|
||||
this.throwerLight = GameLib.EntityManager.Instance.findComponentById('u50c6rjo5o');
|
||||
this.scoreCanvas = GameLib.EntityManager.Instance.findComponentById('2yex7s9vhe');
|
||||
this.scoreTexture = GameLib.EntityManager.Instance.findComponentById('yfu1ilad2y');
|
||||
this.scoreMesh = GameLib.EntityManager.Instance.findComponentById('l050l1fbi9');
|
||||
|
||||
this.throwerParticleEngine = GameLib.EntityManager.Instance.findComponentById('0l920c0939');
|
||||
this.smokeParticleEngine = GameLib.EntityManager.Instance.findComponentById('y6lahld1ep');
|
||||
this.fireParticleEngine = GameLib.EntityManager.Instance.findComponentById('pefp1piy93');
|
||||
this.explodeParticleEngine = GameLib.EntityManager.Instance.findComponentById('gdmepd0a0q');
|
||||
this.materialTreesAndRocks = GameLib.EntityManager.Instance.findComponentById('6st74h9uxh');
|
||||
this.throwerParticleEngine = GameLib.EntityManager.Instance.findComponentById('0og8p6ts36');
|
||||
this.smokeParticleEngine = GameLib.EntityManager.Instance.findComponentById('3kyiu5cokv');
|
||||
this.fireParticleEngine = GameLib.EntityManager.Instance.findComponentById('z4pucpscf3');
|
||||
this.explodeParticleEngine = GameLib.EntityManager.Instance.findComponentById('uatorrbo9e');
|
||||
this.materialTreesAndRocks = GameLib.EntityManager.Instance.findComponentById('8anoe7g9or');
|
||||
|
||||
this.burningTreeParticleEngine = GameLib.EntityManager.Instance.findComponentById('coa4bqy1tc');
|
||||
this.burningTreeParticleEngine = GameLib.EntityManager.Instance.findComponentById('oapz1hoxki');
|
||||
|
||||
GameLib.Event.Emit(
|
||||
GameLib.Event.GET_GRAPHICS_IMPLEMENTATION,
|
||||
null,
|
||||
function(graphics) {
|
||||
this.graphics = graphics
|
||||
}.bind(this)
|
||||
GameLib.Event.GET_GRAPHICS_IMPLEMENTATION,
|
||||
null,
|
||||
function(graphics) {
|
||||
this.graphics = graphics
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
this.mouse = new GameLib.Mouse(this.graphics);
|
||||
this.raycaster = new GameLib.D3.Raycaster(this.graphics);
|
||||
|
||||
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('autqzs1rvq');
|
||||
this.mouseUp = GameLib.EntityManager.Instance.findComponentById('monq9ryw7a');
|
||||
this.mouseDown = GameLib.EntityManager.Instance.findComponentById('d5o2axpc0m');
|
||||
this.mouseMove = GameLib.EntityManager.Instance.findComponentById('6st4io7ceu');
|
||||
this.touchMove = GameLib.EntityManager.Instance.findComponentById('c55930et90');
|
||||
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('6rskhzgjog');
|
||||
this.mouseUp = GameLib.EntityManager.Instance.findComponentById('vinuf6amoi');
|
||||
this.mouseDown = GameLib.EntityManager.Instance.findComponentById('o3xmefbbln');
|
||||
this.mouseMove = GameLib.EntityManager.Instance.findComponentById('kbn8blxfe5');
|
||||
this.touchMove = GameLib.EntityManager.Instance.findComponentById('cnn8o15h2g');
|
||||
|
||||
GameLib.Event.Subscribe(
|
||||
GameLib.Event.WINDOW_RESIZE,
|
||||
function(data) {
|
||||
var aspect = (data.width / data.height);
|
||||
GameLib.Event.WINDOW_RESIZE,
|
||||
function(data) {
|
||||
var aspect = (data.width / data.height);
|
||||
this.camera.aspect = aspect;
|
||||
this.camera.updateInstance('aspect');
|
||||
this.renderer.setSize(
|
||||
data.width,
|
||||
data.height
|
||||
);
|
||||
}.bind(this)
|
||||
data.width,
|
||||
data.height
|
||||
);
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
/**
|
||||
* Tell all our custom code components that we loaded
|
||||
*/
|
||||
GameLib.Event.Subscribe(
|
||||
GameLib.Event.GAME_START,
|
||||
function() {
|
||||
|
||||
this.beforeRender.entityLoaded = this;
|
||||
this.mouseUp.entityLoaded = this;
|
||||
this.mouseDown.entityLoaded = this;
|
||||
this.mouseMove.entityLoaded = this;
|
||||
this.touchMove.entityLoaded = this;
|
||||
|
||||
GameLib.Event.Emit(GameLib.Event.WINDOW_RESIZE, {width : window.innerWidth, height:window.innerHeight});
|
||||
|
||||
this.camera.lookAt.x = 0;
|
||||
this.camera.lookAt.y = 0;
|
||||
this.camera.lookAt.z = 0;
|
||||
this.camera.updateInstance('lookAt');
|
||||
|
||||
this.mouse.x = 0;
|
||||
this.mouse.y = 0;
|
||||
|
||||
GameLib.Event.Emit(
|
||||
GameLib.Event.PLAY_AUDIO,
|
||||
{
|
||||
name : 'Audio - Xmas'
|
||||
}
|
||||
);
|
||||
}.bind(this)
|
||||
GameLib.Event.CUSTOM_GAME_START,
|
||||
function() {
|
||||
|
||||
delete this.beforeRender.initialized;
|
||||
|
||||
this.beforeRender.entityLoaded = this;
|
||||
this.mouseUp.entityLoaded = this;
|
||||
this.mouseDown.entityLoaded = this;
|
||||
this.mouseMove.entityLoaded = this;
|
||||
this.touchMove.entityLoaded = this;
|
||||
|
||||
GameLib.Event.Emit(GameLib.Event.WINDOW_RESIZE, {width : window.innerWidth, height:window.innerHeight});
|
||||
|
||||
this.camera.lookAt.x = 0;
|
||||
this.camera.lookAt.y = 0;
|
||||
this.camera.lookAt.z = 0;
|
||||
this.camera.updateInstance('lookAt');
|
||||
|
||||
this.mouse.x = 0;
|
||||
this.mouse.y = 0;
|
||||
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
GameLib.Event.Subscribe(
|
||||
GameLib.Event.GAME_RESTART,
|
||||
function() {
|
||||
console.log('restarting game');
|
||||
GameLib.Event.Emit(GameLib.Event.GAME_OVER);
|
||||
delete this.beforeRender.initialized;
|
||||
GameLib.Event.Emit(GameLib.Event.GAME_START);
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
GameLib.Event.Subscribe(
|
||||
GameLib.Event.GAME_OVER,
|
||||
function() {
|
||||
|
||||
this.beforeRender.entityLoaded = null;
|
||||
this.mouseUp.entityLoaded = null;
|
||||
this.mouseDown.entityLoaded = null;
|
||||
this.mouseMove.entityLoaded = null;
|
||||
this.touchMove.entityLoaded = null;
|
||||
|
||||
GameLib.Event.Emit(GameLib.Event.STOP_ALL_AUDIO);
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
//GameLib.Event.Emit(GameLib.Event.MOUSE_UP);
|
||||
|
||||
|
||||
/**
|
||||
* Plant all our trees - Below code gets generated automatically
|
||||
*/
|
||||
|
@ -162,7 +134,10 @@ mesh.rotation.z = 3.66;
|
|||
mesh.scale.x = 10;
|
||||
mesh.scale.y = 10;
|
||||
mesh.scale.z = 10;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -176,7 +151,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -190,7 +168,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -204,7 +185,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -218,7 +202,10 @@ mesh.rotation.z = 3.39;
|
|||
mesh.scale.x = 8.06;
|
||||
mesh.scale.y = 5.86;
|
||||
mesh.scale.z = 5.43;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -232,7 +219,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -246,7 +236,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 4.84;
|
||||
mesh.scale.y = 3.46;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -260,7 +253,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 15;
|
||||
mesh.scale.y = 8;
|
||||
mesh.scale.z = 8;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -274,7 +270,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 8.790000000000001;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -288,7 +287,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 8;
|
||||
mesh.scale.y = 8;
|
||||
mesh.scale.z = 8;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -302,7 +304,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 12.46;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -316,7 +321,10 @@ mesh.rotation.z = -0.41000000000000003;
|
|||
mesh.scale.x = 10;
|
||||
mesh.scale.y = 10;
|
||||
mesh.scale.z = 15;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -330,7 +338,10 @@ mesh.rotation.z = 3.08;
|
|||
mesh.scale.x = 9;
|
||||
mesh.scale.y = 9;
|
||||
mesh.scale.z = 9;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -344,7 +355,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -358,7 +372,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 7;
|
||||
mesh.scale.y = 6.3;
|
||||
mesh.scale.z = 7;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -372,7 +389,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 15;
|
||||
mesh.scale.y = 15;
|
||||
mesh.scale.z = 10;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -386,7 +406,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -400,7 +423,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -414,7 +440,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 7;
|
||||
mesh.scale.y = 7;
|
||||
mesh.scale.z = 7;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -428,7 +457,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 9.52;
|
||||
mesh.scale.y = 5.86;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -442,7 +474,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 8.06;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -456,7 +491,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -470,7 +508,10 @@ mesh.rotation.z = -0.05;
|
|||
mesh.scale.x = 4.39;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -484,7 +525,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -498,7 +542,10 @@ mesh.rotation.z = 0.73;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -512,7 +559,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 10.26;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone1.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -526,7 +576,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 11.72;
|
||||
mesh.scale.y = 12.46;
|
||||
mesh.scale.z = 8.790000000000001;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -540,7 +593,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = stone2.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -554,7 +610,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 22.72;
|
||||
mesh.scale.y = 13.19;
|
||||
mesh.scale.z = 10.26;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeSmall.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -568,7 +627,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -582,7 +644,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -596,7 +661,10 @@ mesh.rotation.z = -0.21;
|
|||
mesh.scale.x = 7.32;
|
||||
mesh.scale.y = 9.52;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -610,7 +678,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -624,7 +695,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 3;
|
||||
mesh.scale.y = 3;
|
||||
mesh.scale.z = 3;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -638,7 +712,10 @@ mesh.rotation.z = 0.19;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -652,7 +729,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -666,7 +746,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 8.790000000000001;
|
||||
mesh.scale.z = 7.32;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -680,7 +763,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -694,7 +780,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 6.59;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeMedium.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -708,7 +797,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -722,7 +814,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -736,7 +831,10 @@ mesh.rotation.z = -0.01;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -750,7 +848,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -764,7 +865,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -778,7 +882,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 8;
|
||||
mesh.scale.y = 8;
|
||||
mesh.scale.z = 8;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -792,7 +899,10 @@ mesh.rotation.z = -0.22;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -806,7 +916,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -820,7 +933,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 8;
|
||||
mesh.scale.y = 8;
|
||||
mesh.scale.z = 8;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -834,7 +950,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -848,7 +967,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -862,7 +984,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -876,7 +1001,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -890,7 +1018,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -904,7 +1035,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 8.06;
|
||||
mesh.scale.z = 10.99;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -918,7 +1052,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
mesh = treeLarge.clone();
|
||||
material = materialTreesAndRocks.clone();
|
||||
|
@ -932,7 +1069,10 @@ mesh.rotation.z = 0;
|
|||
mesh.scale.x = 5;
|
||||
mesh.scale.y = 5;
|
||||
mesh.scale.z = 5;
|
||||
mesh.updateInstance();
|
||||
mesh.updateInstance('materials');
|
||||
mesh.updateInstance('position');
|
||||
mesh.updateInstance('rotation');
|
||||
mesh.updateInstance('scale');
|
||||
|
||||
GameLib.Event.Emit(GameLib.Event.GAME_LOADED);
|
||||
|
||||
|
|
Loading…
Reference in New Issue