Pipeline to draw models !
This commit is contained in:
@@ -145,7 +145,7 @@ export class ClientLevel {
|
||||
entities = new Map<string, Entity>();
|
||||
// the client data of blocks that have some, see BlockRef.set_client_data, by chunk_key then position_key "x,y,z"
|
||||
block_data = new Map<number, Map<string, BlockData>>();
|
||||
visuals = new Visuals((x, y, z) => this.get_block_data(x, y, z));
|
||||
visuals = new Visuals(this);
|
||||
|
||||
// server_blocks is the server's block id for each of its numeric ids
|
||||
constructor(server_blocks: string[], view_distance: number) {
|
||||
@@ -259,8 +259,8 @@ export class ClientLevel {
|
||||
this.workers.terminate();
|
||||
for (const chunk of this.chunks.values()) {
|
||||
this.delete_chunk_mesh(chunk);
|
||||
this.visuals.unload(chunk.x, chunk.z);
|
||||
}
|
||||
this.visuals.dispose();
|
||||
this.chunks.clear();
|
||||
this.#dirty.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user