Cache.js 468 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. THREE.Cache = {
  5. files: {},
  6. add: function ( key, file ) {
  7. // console.log( 'THREE.Cache', 'Adding key:', key );
  8. this.files[ key ] = file;
  9. },
  10. get: function ( key ) {
  11. // console.log( 'THREE.Cache', 'Checking key:', key );
  12. return this.files[ key ];
  13. },
  14. remove: function ( key ) {
  15. delete this.files[ key ];
  16. },
  17. clear: function () {
  18. this.files = {};
  19. }
  20. };
粤ICP备19079148号