Browse Source

WebGLProperties: Simplified.

Mr.doob 9 years ago
parent
commit
d241b50acd
1 changed files with 18 additions and 15 deletions
  1. 18 15
      src/renderers/webgl/WebGLProperties.js

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

@@ -6,35 +6,38 @@ function WebGLProperties() {
 
 
 	var properties = {};
 	var properties = {};
 
 
-	this.get = function ( object ) {
+	return {
 
 
-		var uuid = object.uuid;
-		var map = properties[ uuid ];
+		get: function ( object ) {
 
 
-		if ( map === undefined ) {
+			var uuid = object.uuid;
+			var map = properties[ uuid ];
 
 
-			map = {};
-			properties[ uuid ] = map;
+			if ( map === undefined ) {
 
 
-		}
+				map = {};
+				properties[ uuid ] = map;
 
 
-		return map;
+			}
 
 
-	};
+			return map;
 
 
-	this.delete = function ( object ) {
+		},
 
 
-		delete properties[ object.uuid ];
+		delete: function ( object ) {
 
 
-	};
+			delete properties[ object.uuid ];
+
+		},
 
 
-	this.clear = function () {
+		clear: function () {
 
 
-		properties = {};
+			properties = {};
+
+		}
 
 
 	};
 	};
 
 
 }
 }
 
 
-
 export { WebGLProperties };
 export { WebGLProperties };