WebGLProperties.js 421 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @author fordacious / fordacious.github.io
  3. */
  4. THREE.WebGLProperties = function () {
  5. var properties = {};
  6. this.get = function ( object ) {
  7. if ( properties[ object.uuid ] === undefined ) {
  8. properties[ object.uuid ] = {};
  9. }
  10. return properties[ object.uuid ];
  11. };
  12. this.delete = function ( object ) {
  13. delete properties[ object.uuid ];
  14. };
  15. this.clear = function () {
  16. properties = {};
  17. };
  18. };