Taos API Reference
    Preparing search index...

    Interface AssetResolver

    Caller-supplied asset resolution for component construction. Every method is optional; a factory that needs one the resolver doesn't provide should degrade gracefully (e.g. leave a placeholder). All are async — factories build the component synchronously and fill the asset in when the promise resolves, exactly as the editor's load path does.

    interface AssetResolver {
        loadAssembly?(asset: string): Promise<AssemblyDoc>;
        loadMesh?(
            ref: { type: "gltf"; asset: string },
            device: GPUDevice,
        ): Promise<Mesh>;
        loadMaterial?(ref: MaterialRef, device: GPUDevice): Promise<Material>;
        readBytes?(ref: string): Promise<ArrayBuffer>;
        resolvePath?(ref: string): Promise<string | null>;
    }

    Implemented by

    Index

    Methods