Files
Housekeeping-web-admin/node_modules/three/src/renderers/common/RenderLists.js
T
2026-06-24 09:48:54 +02:00

41 lines
540 B
JavaScript

import ChainMap from './ChainMap.js';
import RenderList from './RenderList.js';
class RenderLists {
constructor( lighting ) {
this.lighting = lighting;
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( this.lighting, scene, camera );
lists.set( keys, list );
}
return list;
}
dispose() {
this.lists = new ChainMap();
}
}
export default RenderLists;