mirror of
https://github.com/jiawanlong/Cesium-Examples.git
synced 2025-07-06 16:31:03 +00:00
39 lines
471 B
JavaScript
39 lines
471 B
JavaScript
import ChainMap from './ChainMap.js';
|
|
import RenderList from './RenderList.js';
|
|
|
|
class RenderLists {
|
|
|
|
constructor() {
|
|
|
|
this.lists = new ChainMap();
|
|
|
|
}
|
|
|
|
get( scene, camera ) {
|
|
|
|
const lists = this.lists;
|
|
const keys = [ scene, camera ];
|
|
|
|
let list = lists.get( keys );
|
|
|
|
if ( list === undefined ) {
|
|
|
|
list = new RenderList();
|
|
lists.set( keys, list );
|
|
|
|
}
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
dispose() {
|
|
|
|
this.lists = new ChainMap();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default RenderLists;
|