mirror of
https://github.com/jiawanlong/Cesium-Examples.git
synced 2025-07-07 16:57:30 +00:00
27 lines
274 B
JavaScript
27 lines
274 B
JavaScript
![]() |
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;
|