Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AssetManager

A per-context singleton that manages all of an app's assets. Create a new asset group by calling a load method (e.g. loadGltf), view the group's assets via group, and use the assets by ID on actors (e.g. Actor.CreateFromPrefab).

Hierarchy

  • AssetManager

Index

Methods

Methods

group

loadGltf

  • loadGltf(groupName: string, url: string): Promise<AssetGroup>
  • Load the assets in a glTF model by URL, and populate a new group with the result.

    Parameters

    • groupName: string

      The name of the group to create.

    • url: string

      The URL to a glTF model.

    Returns Promise<AssetGroup>

    The promise of a new asset group.

ready

  • ready(): Promise<void>