Nano WebGPU API - v0.11.0
    Preparing search index...

    Interface ModelParser

    ModelParser defines the interface for standardizing third-party 3D file formats (e.g. GLTF, OBJ, FBX) into a format-agnostic ModelData hierarchy.

    interface ModelParser {
        canParse(url: string): boolean;
        parse(url: string, response: Response): Promise<ModelData>;
    }
    Index

    Methods

    Methods

    • Evaluates whether this parser is capable of reading and interpreting the target file asset, typically by inspecting the path extension or resource query strings.

      Parameters

      • url: string

        The source web address or file path.

      Returns boolean

      True if parsing can be attempted, false otherwise.

    • Asynchronously parses a raw network response into the standardized engine ModelData model.

      Parameters

      • url: string

        The source web address or file path of the asset.

      • response: Response

        The raw, unconsumed network Response object.

      Returns Promise<ModelData>

      A promise resolving to a parsed ModelData structure.