@pixi/3d
    Preparing search index...

    Variable loadGlbConst Advanced

    loadGlb: {
        extension: { name: string; type: LoadParser };
        id: string;
        name: string;
        load<T>(
            url: string,
            _resolvedAsset?: ResolvedAsset<any>,
            loader?: Loader,
        ): Promise<Scene3DSource>;
        test(url: string): boolean;
        unload(
            source: Scene3DSource,
            _resolvedAsset?: ResolvedAsset<any>,
            loader?: Loader,
        ): Promise<void>;
    } = ...

    Loads a binary glTF (.glb) file as a Scene3DSource

    @pixi/3d registers it with Assets on import, and Assets.unload(url) frees the source as Scene3DSource#destroy describes. Compressed data and texture formats load as loadGltf describes.

    Only the buffer packed in the file loads: a buffer kept outside it isn't fetched, and the loader warns. Images kept outside it resolve relative to the .glb URL.

    Type Declaration

    import 'pixi.js/ktx2'; // only needed for models with KTX2 textures
    import { Assets } from 'pixi.js';
    import { Model3D, type Scene3DSource } from '@pixi/3d';

    const source = await Assets.load<Scene3DSource>('robot.glb');
    view3d.root.addChild(new Model3D(source));