Atlas Engine
API Referenceatlas

Resource

Reference to a named asset and its resource type.

Module: atlas

Reference to a named asset and its resource type.

Declaration

export class Resource { ... }

Constructors

constructor(type: ResourceType, path: string, name: string);

Properties

type

type: ResourceType;

path

path: string;

name

name: string;

Methods

fromAssetPath

Creates a resource reference from an asset path, type, and optional name.

static fromAssetPath(
            path: string,
            type: ResourceType,
            name?: string,
        ): Resource;

fromName

Looks up a resource by name and type; returns null if no matching resource is found.

static fromName(name: string, type: ResourceType): Resource | null;

On this page