@@ -673,6 +673,12 @@ THREE.Geometry.prototype = {
// TODO
+ },
+
+ deallocate: function () {
+ THREE.GeometryLib[ this.id ] = null;
}
};
@@ -343,6 +343,12 @@ THREE.Object3D.prototype = {
return object;
+ THREE.Object3DLib[ this.id ] = null;
@@ -116,4 +116,10 @@ THREE.Material.prototype.clone = function ( material ) {
+THREE.Material.prototype.deallocate = function () {
+ THREE.MaterialLib[ this.id ] = null;
+};
THREE.MaterialLib = [];
@@ -69,6 +69,12 @@ THREE.Texture.prototype = {
return texture;
+ THREE.TextureLib[ this.id ] = null;