Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NameResolver<T>

Provide abstraction of resolving named resource such as Geometry, Materials.

Type parameters

  • T

Hierarchy

  • NameResolver

Index

Properties

Static RESOLVED

RESOLVED: number = 2

Static RESOLVING

RESOLVING: number = 1

Static UNLOADED

UNLOADED: number = 0

Methods

get

  • get(name: string): Promise<T>
  • Obtain the named resource.

    Parameters

    • name: string

    Returns Promise<T>

    the resource

getStatus

  • getStatus(name: string): number
  • Get status of specified resource. This method would return NameResolver.UNLOADED,NameResolver.RESOLVED or NameResolver.RESOLVING

    Parameters

    • name: string

      resource name to check status

    Returns number

    status code

register

  • register(name: string, generator: Promise<T> | T): Promise<T>
  • Register named resource

    Parameters

    • name: string

      name of the resource

    • generator: Promise<T> | T

      Promise to resolve the resource

    Returns Promise<T>

    The promise of resource

Generated using TypeDoc