Class: ViewerStore
Меньше 1 минуты
Class: ViewerStore
Store for active RenderManagers. Each RenderManager have unique name.
Example
const sceneManager = new SceneManager();
const metaManager = new MetaManager();
const renderManager = viewerStore.createRenderManager("default", sceneManager, metaManager);
Properties
renderMans
• Readonly
renderMans: Map
<string
, RenderManager
>
Active RenderManager instances.
Methods
addRenderManager
▸ addRenderManager(name
, renderManager
): void
Add existing RenderManager into map.
Parameters
Name | Type | Description |
---|---|---|
name | string | unique name of render manager (viewer name). |
renderManager | RenderManager | RenderManager instance for adding to map. |
Returns
void
createRenderManager
▸ createRenderManager(name
, sceneManager
, metaManager?
): RenderManager
Create new RenderManager instance and store it in map.
Parameters
Name | Type | Description |
---|---|---|
name | string | unique name of render manager (viewer name). |
sceneManager | SceneManager | SceneManager instance for adding into new RenderManager. |
metaManager? | MetaManager | Optional MetaManager. Used for possible additional operations with metadata. |
Returns
New RenderManager instance or existing instance if manager with this name already exists.
deleteRenderManager
▸ deleteRenderManager(name
): void
Destroy and delete existing RenderManager instance.
Parameters
Name | Type | Description |
---|---|---|
name | string | unique name of render manager (viewer name). |
Returns
void
getRenderManager
▸ getRenderManager(name?
): RenderManager
Get RenderManager by name
Parameters
Name | Type | Description |
---|---|---|
name? | string | unique name of render manager (viewer name). |