made components compatible with editor
parent
517d75d3c2
commit
613474ba44
|
@ -15,6 +15,7 @@
|
||||||
* @param entities GameLib.D3.Entity[]
|
* @param entities GameLib.D3.Entity[]
|
||||||
* @param progressCallback
|
* @param progressCallback
|
||||||
* @param uploadUrl String
|
* @param uploadUrl String
|
||||||
|
* @param components
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
GameLib.D3.Scene = function(
|
GameLib.D3.Scene = function(
|
||||||
|
@ -32,7 +33,8 @@ GameLib.D3.Scene = function(
|
||||||
worlds,
|
worlds,
|
||||||
entities,
|
entities,
|
||||||
progressCallback,
|
progressCallback,
|
||||||
uploadUrl
|
uploadUrl,
|
||||||
|
components
|
||||||
) {
|
) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.sceneId = GameLib.D3.Tools.RandomId();
|
this.sceneId = GameLib.D3.Tools.RandomId();
|
||||||
|
@ -98,6 +100,11 @@ GameLib.D3.Scene = function(
|
||||||
|
|
||||||
this.instance = this.createInstance();
|
this.instance = this.createInstance();
|
||||||
|
|
||||||
|
if (typeof components == 'undefined') {
|
||||||
|
components = [];
|
||||||
|
}
|
||||||
|
this.components = components;
|
||||||
|
|
||||||
// assoc array
|
// assoc array
|
||||||
this.meshIdToMesh = {};
|
this.meshIdToMesh = {};
|
||||||
|
|
||||||
|
@ -112,6 +119,17 @@ GameLib.D3.Scene = function(
|
||||||
this.notifications = [];
|
this.notifications = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GameLib.D3.Scene.prototype.createInstance = function() {
|
||||||
|
|
||||||
|
this.graphics.isNotThreeThrow();
|
||||||
|
|
||||||
|
var instance = new this.graphics.instance.Scene();
|
||||||
|
|
||||||
|
instance.render = true;
|
||||||
|
|
||||||
|
return instance;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notification objects manage the links between image filenames, instance texture
|
* Notification objects manage the links between image filenames, instance texture
|
||||||
* map IDs, and instance materials.
|
* map IDs, and instance materials.
|
||||||
|
|
Loading…
Reference in New Issue