Header menu logo Mibo

IAssets Type

Per-game asset loader/cache service for the raylib backend.

Provides cached loading for textures, fonts, sounds, models, and shaders from loose files (no content pipeline). Extends IAssetCache so portable code can cache custom assets without referencing a backend.

Example

 let assets = GameContext.getService<IAssets> ctx
 let tex = assets.Texture "sprites/player.png"
 let font = assets.Font "fonts/main.ttf"
 let config = assets.GetOrCreate "gameConfig" (fun () -> loadConfig())
val assets: obj
val tex: obj
val font: obj
val config: obj

Instance members

Instance member Description

this.Font

Full Usage: this.Font

Parameters:
    path : string

Returns: Font
Modifiers: abstract

Loads and caches a Font from file.

path : string
Returns: Font

this.Model

Full Usage: this.Model

Parameters:
    path : string

Returns: Model
Modifiers: abstract

Loads and caches a Model from file.

path : string
Returns: Model

this.ModelAnimations

Full Usage: this.ModelAnimations

Parameters:
    path : string

Returns: ModelAnimation[]
Modifiers: abstract

Loads and caches ModelAnimation

Loads all skeletal animations from a model file (glb/gltf/iqm). Returns an empty array if the model has no animations.

path : string
Returns: ModelAnimation[]

this.Sound

Full Usage: this.Sound

Parameters:
    path : string

Returns: Sound
Modifiers: abstract

Loads and caches a Sound from file.

path : string
Returns: Sound

this.Texture

Full Usage: this.Texture

Parameters:
    path : string

Returns: Texture2D
Modifiers: abstract

Loads and caches a Texture2D from file.

path : string
Returns: Texture2D

Type something to start searching.