AnimationClipAssets

View source

ExtendsAssets

Typed resource alias for the shared Assets pool of AnimationClip assets. It inherits Assets behavior for adding clips and resolving their handles.

Retrieve the pool with world.getResource and AnimationClipAssets. Use Assets#add to add clips and Assets#get to resolve their handles.

Examples

import { AnimationClip, AnimationClipAssets } from 'wima'

function addClip(world) {
  const clips = world.getResource(AnimationClipAssets)
  const handle = clips.add(new AnimationClip())

  return clips.get(handle)
}

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.

—