three.fbo-helper
Version:
FrameBuffer Object inspector for three.js
44 lines (24 loc) • 476 B
JavaScript
/**
* @author fordacious / fordacious.github.io
*/
function WebGLProperties() {
var properties = {};
return {
get: function ( object ) {
var uuid = object.uuid;
var map = properties[ uuid ];
if ( map === undefined ) {
map = {};
properties[ uuid ] = map;
}
return map;
},
delete: function ( object ) {
delete properties[ object.uuid ];
},
clear: function () {
properties = {};
}
};
}
export { WebGLProperties };