Accueil / npm / three@0.152.0 / examples / jsm / nodes / core / NodeCache.js
NodeCache.js
let id = 0;
class NodeCache {
constructor() {
this.id = id ++;
this.nodesData = new WeakMap();
}
getNodeData( node ) {
return this.nodesData.get( node );
}
setNodeData( node, data ) {
this.nodesData.set( node, data );
}
}
export default NodeCache;