Skip to content

Add support for GLTF Serializer #1448

Closed

Description

@SergioRZMasson

Currently it is not possible to use the GLTF Serializer functionality due some missing Polyfills. Calling GLTF2Export.GLBAsync directly is not possible because Native does not have a implementation for Blob. It is simple to modify GLBAsync to export an ArrayBufferView instead. However, when serializing models with textures we also need OffscreenCanvas. Since this class does not exist in Native we get an exception in the serializer level.

Activity

  1. added this to the Future milestone on Dec 4, 2024
  2. self-assigned this
    on Aug 12, 2025
  3. bkaradzic-microsoft commented on Oct 23, 2026

    @bkaradzic-microsoft
    Member

    The missing pieces are now implemented: native Blob landed in BabylonJS/JsRuntimeHost#108, and native Canvas support (including canvas-to-image export and canvas drawImage paths in #1855) is initialized by the current Embedding runtime. Current implementation locations are Canvas.cpp and Runtime.cpp.

    Verified with published Babylon.js 9.31.3 on native headless Metal/JavaScriptCore: GLTF2Export.GLBAsync exports a box with a raw RGBA texture as a native Blob; reading Blob.arrayBuffer() produces a valid 6,520-byte GLB with an embedded PNG (checked both GLB structure and PNG signature). The existing non-Draco serializer cases 208-230 also pass individually against unchanged visual references. No exporter changes or Blob/Canvas shims were needed for this verification.

    Closing this serializer-support request. Broader Blob browser parity (#1241) and compression-specific failures (#1214) are separate and are not being closed by this result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions