clone components - lodash required from now on

beta.r3js.org
Theunis J. Botha 2016-11-15 13:51:00 +01:00
parent 6f17f777e3
commit 758bfe0a2b
4 changed files with 14 additions and 4 deletions

View File

@ -8,6 +8,7 @@
"gulp-concat": "^2.6.0",
"gulp-minify": "0.0.14",
"gulp-sort": "^2.0.0",
"lodash": "^4.17.1",
"q": "^1.4.1",
"three": "^0.81.2"
},

View File

@ -13,4 +13,13 @@ if (typeof Q == 'undefined') {
}
var Q = require('q');
}
if (typeof _ == 'undefined') {
if (typeof require == 'undefined') {
console.warn('You need the lowdash library for the GameLib.D3');
throw new Error('You need the lowdash library for the GameLib.D3');
}
var _ = require('_');
}

View File

@ -77,4 +77,8 @@ GameLib.D3.ComponentInterface.prototype.onSetParentEntity = function(
parentEntity
) {
};
GameLib.D3.ComponentInterface.prototype.clone = function() {
return _.cloneDeep(this);
};

View File

@ -448,10 +448,6 @@ GameLib.D3.Scene.LoadScene = function(
var mesh = gameLibScene.meshes[m];
if (!mesh.id) {
mesh.id = GameLib.D3.Tools.RandomId();
}
console.log("loading mesh " + mesh.name);
var geometry = new graphics.instance.Geometry();