Browse Source

WebGLPRoperties: Clean up.

Mr.doob 10 years ago
parent
commit
900abd32f3
1 changed files with 10 additions and 15 deletions
  1. 10 15
      src/renderers/webgl/WebGLProperties.js

+ 10 - 15
src/renderers/webgl/WebGLProperties.js

@@ -6,33 +6,28 @@ THREE.WebGLProperties = function () {
 
 
 	var properties = {};
 	var properties = {};
 
 
-	this.clear = function () {
+	this.get = function ( object ) {
 
 
-		properties = {};
+		if ( properties[ object.uuid ] === undefined ) {
 
 
-	}
+			properties[ object.uuid ] = {};
 
 
-	this.delete = function ( object ) {
+		}
 
 
-		delete properties[ object.uuid ];
+		return properties[ object.uuid ];
 
 
 	};
 	};
 
 
-	this.get = function ( object ) {
-
-		initObject( object );
+	this.delete = function ( object ) {
 
 
-		return properties[ object.uuid ];
+		delete properties[ object.uuid ];
 
 
 	};
 	};
 
 
-	function initObject ( object ) {
-
-		if ( properties[ object.uuid ] === undefined ) {
+	this.clear = function () {
 
 
-			properties[ object.uuid ] = {};
-		}
+		properties = {};
 
 
-	}
+	};
 
 
 };
 };