@babylonjs/serializers

The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.

Usage no npm install needed!

<script type="module">
  import babylonjsSerializers from 'https://cdn.skypack.dev/@babylonjs/serializers';
</script>

README

Babylon.js Serializers

Installation instructions

To install using npm :

npm install --save @babylonjs/core @babylonjs/serializers

How to use

Afterwards it can be imported to the your project using:

import { GLTF2Export } from '@babylonjs/serializers/glTF';

And used as usual:

GLTF2Export.GLTFAsync(scene, "fileName").then((gltf) => {
    gltf.downloadFiles();
});

For more information you can have a look at our our ES6 dedicated documentation and the gltf exporter documentation.