How to use the @babylonjs/loaders/glTF/2.0.GLTFLoader.RegisterExtension function in @babylonjs/loaders

To help you get started, we’ve selected a few @babylonjs/loaders examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github virtual-cast / babylon-vrm-loader / src / vrm-extension.ts View on Github external
* @inheritdoc
     */
    public _loadMaterialAsync(
        context: string,
        material: IMaterial,
        mesh: Mesh,
        babylonDrawMode: number,
        assign: (babylonMaterial: Material) => void,
    ): Nullable> {
        // ジェネレータでマテリアルを生成する
        return (new VRMMaterialGenerator(this.loader)).generate(context, material, mesh, babylonDrawMode, assign);
    }
}

// ローダーに登録する
GLTFLoader.RegisterExtension(NAME, (loader) => new VRM(loader));

@babylonjs/loaders

For usage documentation please visit https://doc.babylonjs.com/extensions and choose "loaders".

Apache-2.0
Latest version published 19 hours ago

Package Health Score

92 / 100
Full package analysis