clone components - lodash required from now on
parent
6f17f777e3
commit
758bfe0a2b
|
@ -8,6 +8,7 @@
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
"gulp-minify": "0.0.14",
|
"gulp-minify": "0.0.14",
|
||||||
"gulp-sort": "^2.0.0",
|
"gulp-sort": "^2.0.0",
|
||||||
|
"lodash": "^4.17.1",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
"three": "^0.81.2"
|
"three": "^0.81.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,3 +14,12 @@ if (typeof Q == 'undefined') {
|
||||||
|
|
||||||
var Q = require('q');
|
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('_');
|
||||||
|
}
|
|
@ -78,3 +78,7 @@ GameLib.D3.ComponentInterface.prototype.onSetParentEntity = function(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GameLib.D3.ComponentInterface.prototype.clone = function() {
|
||||||
|
return _.cloneDeep(this);
|
||||||
|
};
|
|
@ -448,10 +448,6 @@ GameLib.D3.Scene.LoadScene = function(
|
||||||
|
|
||||||
var mesh = gameLibScene.meshes[m];
|
var mesh = gameLibScene.meshes[m];
|
||||||
|
|
||||||
if (!mesh.id) {
|
|
||||||
mesh.id = GameLib.D3.Tools.RandomId();
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("loading mesh " + mesh.name);
|
console.log("loading mesh " + mesh.name);
|
||||||
|
|
||||||
var geometry = new graphics.instance.Geometry();
|
var geometry = new graphics.instance.Geometry();
|
||||||
|
|
Loading…
Reference in New Issue