ResourceLoader

Interface for resource loading, can be specified in the Properties of each object.

Use Pack and getPack to use Isodi's default pack loader.

The loader should be responsible for allocating, caching and freeing the textures.

Members

Functions

blockTexture
Texture2D blockTexture(string[] names, BlockUV[BlockType] uv)

Load texture for a chunk.

boneSetTexture
Texture2D boneSetTexture(string[] names, BoneUV[BoneType] uv)

// Load texture for the given bone sets.

options
const(ResourceOptions)* options(ResourceType resource, string name)

Get options for the given resource.

skeleton
Bone[] skeleton(string name, string boneSet)

Load bones for a skeleton, using the given bone set.

Static functions

packImages
Image packImages(UV[Type][] mapping, Image[] images, UV[Type] newMapping)

Combine the given images to create an atlas map. Each image must be square with dimensions equal to a power of two, eg. 32×32 or 128x128. All images must be of equal size.

Meta