Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AssetContainer

The root object of the MRE SDK's asset system. Once you create an AssetContainer, you can create new materials, textures, or sounds from scratch, or load glTF files for their assets.

Hierarchy

  • AssetContainer

Index

Constructors

constructor

Properties

context

context: Context

Accessors

assets

assetsById

  • get assetsById(): object

materials

meshes

  • get meshes(): Mesh[]

prefabs

sounds

textures

Methods

createMaterial

createSound

createTexture

createVideoStream

loadGltf

  • loadGltf(uri: string, colliderType?: Payloads.CreateColliderType): Promise<Asset[]>
  • Load the assets in a glTF file by URL, and this container with the result.

    Parameters

    • uri: string

      The URI to a glTF model.

    • Optional colliderType: Payloads.CreateColliderType

      The shape of the generated prefab collider.

    Returns Promise<Asset[]>

    A promise that resolves with the list of loaded assets.

unload

  • unload(): void