Skip to content

copper3d / Modules / Renderer/disposeScene

Module: Renderer/disposeScene ​

Table of contents ​

Interfaces ​

Functions ​

Functions ​

disposeScene ​

▸ disposeScene<S>(host, name): S | undefined

Unregisters a scene and frees everything in it. Returns the scene that was disposed, or undefined if there was none under that name.

Type parameters ​

NameType
Sextends DisposableScene

Parameters ​

NameType
hostSceneDisposalHost<S>
namestring

Returns ​

S | undefined

Defined in ​

src/Renderer/disposeScene.ts:66


removeSceneFromMap ​

▸ removeSceneFromMap(host, name): void

Unregisters a scene WITHOUT freeing anything, for callers re-registering it under a different name.

Throws if the entry survives removal. delete on a missing property is a silent no-op, so restructuring sceneMap into a real Map would stop eviction working with no crash and no type error -- the map would grow without bound again, invisibly. Confirming through the host's own accessor fails loudly instead.

Parameters ​

NameType
hostSceneDisposalHost<any>
namestring

Returns ​

void

Defined in ​

src/Renderer/disposeScene.ts:51