ResourceManager
1.2.0+
Manager for resources.
Resources are accessed via the engine they belong to.
See: textures, meshes, and materials.
.allocatedCount: number
Number of textures allocated in the manager.
.count: number
Number of textures in the manager.
Note: For performance reasons, avoid calling this method when possible.
.engine: WonderlandEngine
Hosting engine instance.
.get(index: number) ⇒ null | T
Retrieve the resource at the given index.
Note: The index is relative to the host, i.e., doesn’t pack the host index.
Param | Type | Description |
---|---|---|
index | number |
.wrap(index: number) ⇒ null | T
Wrap the index into a resource instance.
Note: The index is relative to the host, i.e., doesn’t pack the host index (if any).
Returns:
Param | Type | Description |
---|---|---|
index | number | The resource index. |