How to use the babylonjs-serializers/glTF/2.0/index.GLTF2Export.GLBAsync function in babylonjs-serializers

To help you get started, we’ve selected a few babylonjs-serializers 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 BabylonJS / Babylon.js / inspector / src / components / actionTabs / tabs / toolsTabComponent.tsx View on Github external
exportGLTF() {
        const scene = this.props.scene;
        this._isExporting = true;
        this.forceUpdate();

        GLTF2Export.GLBAsync(scene, "scene", {
            shouldExportNode: (node) => this.shouldExport(node)
        }).then((glb: GLTFData) => {
            glb.downloadFiles();
            this._isExporting = false;
            this.forceUpdate();
        }).catch(reason => {      
            this._isExporting = false;
            this.forceUpdate();
        });
    }

babylonjs-serializers

Babylon.js Serializers =====================

Apache-2.0
Latest version published 1 day ago

Package Health Score

83 / 100
Full package analysis