2
0
Эх сурвалжийг харах

Removed *Library objects as per discussion in #2712.

Mr.doob 12 жил өмнө
parent
commit
609329f11e

+ 0 - 6
examples/webgl_test_memory.html

@@ -87,12 +87,6 @@
 
 
 				//
 				//
 
 
-				texture.deallocate();
-
-				mesh.deallocate();
-				mesh.geometry.deallocate();
-				mesh.material.deallocate();
-
 				renderer.deallocateObject( mesh );
 				renderer.deallocateObject( mesh );
 				renderer.deallocateTexture( texture );
 				renderer.deallocateTexture( texture );
 
 

+ 0 - 8
src/core/BufferGeometry.js

@@ -29,8 +29,6 @@ THREE.BufferGeometry = function () {
 
 
 	this.morphTargets = [];
 	this.morphTargets = [];
 
 
-	THREE.GeometryLibrary[ this.id ] = this;
-
 };
 };
 
 
 THREE.BufferGeometry.prototype = {
 THREE.BufferGeometry.prototype = {
@@ -542,12 +540,6 @@ THREE.BufferGeometry.prototype = {
 		this.hasTangents = true;
 		this.hasTangents = true;
 		this.tangentsNeedUpdate = true;
 		this.tangentsNeedUpdate = true;
 
 
-	},
-
-	deallocate: function () {
-
-		delete THREE.GeometryLibrary[ this.id ];
-
 	}
 	}
 
 
 };
 };

+ 0 - 9
src/core/Geometry.js

@@ -50,8 +50,6 @@ THREE.Geometry = function () {
 
 
 	this.buffersNeedUpdate = false;
 	this.buffersNeedUpdate = false;
 
 
-	THREE.GeometryLibrary[ this.id ] = this;
-
 };
 };
 
 
 THREE.Geometry.prototype = {
 THREE.Geometry.prototype = {
@@ -734,15 +732,8 @@ THREE.Geometry.prototype = {
 
 
 		return geometry;
 		return geometry;
 
 
-	},
-
-	deallocate: function () {
-
-		delete THREE.GeometryLibrary[ this.id ];
-
 	}
 	}
 
 
 };
 };
 
 
 THREE.GeometryIdCount = 0;
 THREE.GeometryIdCount = 0;
-THREE.GeometryLibrary = {};

+ 0 - 9
src/core/Object3D.js

@@ -47,8 +47,6 @@ THREE.Object3D = function () {
 
 
 	this._vector = new THREE.Vector3();
 	this._vector = new THREE.Vector3();
 
 
-	THREE.Object3DLibrary[ this.id ] = this;
-
 };
 };
 
 
 
 
@@ -358,12 +356,6 @@ THREE.Object3D.prototype = {
 
 
 		return object;
 		return object;
 
 
-	},
-
-	deallocate: function () {
-
-		delete THREE.Object3DLibrary[ this.id ];
-
 	}
 	}
 
 
 };
 };
@@ -372,4 +364,3 @@ THREE.Object3D.__m1 = new THREE.Matrix4();
 THREE.Object3D.defaultEulerOrder = 'XYZ',
 THREE.Object3D.defaultEulerOrder = 'XYZ',
 
 
 THREE.Object3DIdCount = 0;
 THREE.Object3DIdCount = 0;
-THREE.Object3DLibrary = {};

+ 0 - 9
src/materials/Material.js

@@ -35,8 +35,6 @@ THREE.Material = function () {
 
 
 	this.needsUpdate = true;
 	this.needsUpdate = true;
 
 
-	THREE.MaterialLibrary[ this.id ] = this;
-
 };
 };
 
 
 THREE.Material.prototype.setValues = function ( values ) {
 THREE.Material.prototype.setValues = function ( values ) {
@@ -116,11 +114,4 @@ THREE.Material.prototype.clone = function ( material ) {
 
 
 };
 };
 
 
-THREE.Material.prototype.deallocate = function () {
-
-	delete THREE.MaterialLibrary[ this.id ];
-
-};
-
 THREE.MaterialIdCount = 0;
 THREE.MaterialIdCount = 0;
-THREE.MaterialLibrary = {};

+ 0 - 9
src/textures/Texture.js

@@ -37,8 +37,6 @@ THREE.Texture = function ( image, mapping, wrapS, wrapT, magFilter, minFilter, f
 	this.needsUpdate = false;
 	this.needsUpdate = false;
 	this.onUpdate = null;
 	this.onUpdate = null;
 
 
-	THREE.TextureLibrary[ this.id ] = this;
-
 };
 };
 
 
 THREE.Texture.prototype = {
 THREE.Texture.prototype = {
@@ -75,15 +73,8 @@ THREE.Texture.prototype = {
 
 
 		return texture;
 		return texture;
 
 
-	},
-
-	deallocate: function () {
-
-		delete THREE.TextureLibrary[ this.id ];
-
 	}
 	}
 
 
 };
 };
 
 
 THREE.TextureIdCount = 0;
 THREE.TextureIdCount = 0;
-THREE.TextureLibrary = {};