MeshAssets

View source

ExtendsAssets

Typed resource alias for the shared Assets pool of Mesh assets. It inherits Assets behavior, including Assets#add and Assets#get, for storing and resolving mesh handles. RenderCorePlugin registers the pool for access through world.getResource and MeshAssets.

Examples

import { MeshAssets } from '@wimaengine/render-core'

function lookupMesh(world, meshHandle) {
  const meshes = world.getResource(MeshAssets)
  return meshes.get(meshHandle)
}

Constructor


constructor(type: object)

View source

Creates a typed asset pool for values identified by type.

The supplied constructor is retained as the asset family’s type identity for handles and resource access.

Parameters

NameDescriptionDefault
type

Constructor for the asset values in this container.

—