content/hifi-content/dave/walk-tools/walkTools/libraries/three.js/loaders/Cache.js
2022-02-13 22:49:05 +01:00

37 lines
467 B
JavaScript

/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.Cache = {
files: {},
add: function ( key, file ) {
// console.log( 'THREE.Cache', 'Adding key:', key );
this.files[ key ] = file;
},
get: function ( key ) {
// console.log( 'THREE.Cache', 'Checking key:', key );
return this.files[ key ];
},
remove: function ( key ) {
delete this.files[ key ];
},
clear: function () {
this.files = {}
}
};