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.

ParamTypeDescription
indexnumber

.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:

ParamTypeDescription
indexnumberThe resource index.