made components compatible with editor
parent
517d75d3c2
commit
613474ba44
|
@ -15,6 +15,7 @@
|
|||
* @param entities GameLib.D3.Entity[]
|
||||
* @param progressCallback
|
||||
* @param uploadUrl String
|
||||
* @param components
|
||||
* @constructor
|
||||
*/
|
||||
GameLib.D3.Scene = function(
|
||||
|
@ -32,7 +33,8 @@ GameLib.D3.Scene = function(
|
|||
worlds,
|
||||
entities,
|
||||
progressCallback,
|
||||
uploadUrl
|
||||
uploadUrl,
|
||||
components
|
||||
) {
|
||||
this.id = id;
|
||||
this.sceneId = GameLib.D3.Tools.RandomId();
|
||||
|
@ -98,6 +100,11 @@ GameLib.D3.Scene = function(
|
|||
|
||||
this.instance = this.createInstance();
|
||||
|
||||
if (typeof components == 'undefined') {
|
||||
components = [];
|
||||
}
|
||||
this.components = components;
|
||||
|
||||
// assoc array
|
||||
this.meshIdToMesh = {};
|
||||
|
||||
|
@ -112,6 +119,17 @@ GameLib.D3.Scene = function(
|
|||
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
|
||||
* map IDs, and instance materials.
|
||||
|
|
Loading…
Reference in New Issue