entity array

beta.r3js.org
Theunis J. Botha 2016-10-28 15:31:45 +02:00
parent d9c336286d
commit b7a244e282
3 changed files with 26 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -2947,7 +2947,8 @@ GameLib.D3.RigidWheel = function(
* @param scale * @param scale
* @param parentSceneId * @param parentSceneId
* @param lights * @param lights
* @param physics GameLib.D3.Physics * @param worlds
* @param entities
* @constructor * @constructor
*/ */
GameLib.D3.Scene = function( GameLib.D3.Scene = function(
@ -2961,7 +2962,8 @@ GameLib.D3.Scene = function(
scale, scale,
parentSceneId, parentSceneId,
lights, lights,
physics worlds,
entities
) { ) {
this.id = id; this.id = id;
this.sceneId = GameLib.D3.Tools.RandomId(); this.sceneId = GameLib.D3.Tools.RandomId();
@ -3006,10 +3008,15 @@ GameLib.D3.Scene = function(
} }
this.lights = lights; this.lights = lights;
if (typeof physics == 'undefined') { if (typeof worlds == 'undefined') {
physics = []; worlds = [];
} }
this.physics = physics; this.worlds = worlds;
if (typeof entities == 'undefined') {
entities = [];
}
this.entities = entities;
}; };
/** /**

View File

@ -10,7 +10,8 @@
* @param scale * @param scale
* @param parentSceneId * @param parentSceneId
* @param lights * @param lights
* @param physics GameLib.D3.Physics * @param worlds
* @param entities
* @constructor * @constructor
*/ */
GameLib.D3.Scene = function( GameLib.D3.Scene = function(
@ -24,7 +25,8 @@ GameLib.D3.Scene = function(
scale, scale,
parentSceneId, parentSceneId,
lights, lights,
physics worlds,
entities
) { ) {
this.id = id; this.id = id;
this.sceneId = GameLib.D3.Tools.RandomId(); this.sceneId = GameLib.D3.Tools.RandomId();
@ -69,10 +71,15 @@ GameLib.D3.Scene = function(
} }
this.lights = lights; this.lights = lights;
if (typeof physics == 'undefined') { if (typeof worlds == 'undefined') {
physics = []; worlds = [];
} }
this.physics = physics; this.worlds = worlds;
if (typeof entities == 'undefined') {
entities = [];
}
this.entities = entities;
}; };
/** /**