WebGLProperties.js 430 字节
Newer Older
1 2 3 4 5 6 7 8
/**
* @author fordacious / fordacious.github.io
*/

THREE.WebGLProperties = function () {

	var properties = {};

9
	this.delete = function ( object ) {
10 11 12 13 14

		delete properties[ object.uuid ];

	};

15
	this.get = function ( object ) {
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

		initObject( object );

		return properties[ object.uuid ];

	};

	function initObject ( object ) {

		if ( properties[ object.uuid ] === undefined ) {

			properties[ object.uuid ] = {};
		}

	}

};