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
Creates a new resource.
constructor(type: ResourceType, path: string, name: string);Properties
type
The category or discriminator for this value.
type: ResourceType;path
The path.
path: string;name
The human-readable 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;