Cesium-Examples/three/examples/jsm/nodes/core/NodeCache.js

27 lines
274 B
JavaScript
Raw Normal View History

2025-03-11 08:25:45 +00:00
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;