Преглед изворни кода

WebGLPRoperties: Clean up.

Mr.doob пре 10 година
родитељ
комит
900abd32f3
1 измењених фајлова са 10 додато и 15 уклоњено
  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 = {};
 
 
-	}
+	};
 
 
 };
 };

粤ICP备19079148号