Restore NativeDraco free-function compatibility exports - #1875
Open
bkaradzic-microsoft wants to merge 1 commit into
Open
bkaradzic-microsoft wants to merge 1 commit into
bkaradzic-microsoft wants to merge 1 commit into
Conversation
Publish decodeDracoMesh and encodeDracoMesh alongside the grouped DracoCodec API. Cover cross-export round trips and verify that malformed input errors propagate identically through both entry point forms. Document that the stock Babylon.js pin does not yet probe the native API. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 60c2ec68-6de1-445d-9fc9-b699db737eae
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes are covered by passing regression tests and documentation updates.
Pull request overview
Restores NativeDraco free-function compatibility exports while retaining the grouped DracoCodec API.
Changes:
- Adds
decodeDracoMeshandencodeDracoMesh. - Adds cross-export round-trip and error-propagation tests.
- Updates NativeDraco documentation and declarations.
File summaries
| File | Description |
|---|---|
Plugins/NativeDraco/Source/NativeDraco.cpp |
Registers compatibility exports. |
Plugins/NativeDraco/README.md |
Documents both API forms. |
Plugins/NativeDraco/Include/Babylon/Plugins/NativeDraco.h |
Updates API comments. |
Apps/UnitTests/JavaScript/src/tests.javaScript.all.ts |
Adds compatibility tests. |
Apps/UnitTests/JavaScript/dist/tests.javaScript.all.js |
Updates compiled tests. |
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bkaradzic-microsoft
requested review from
CedricGuillemet,
bghgary and
ryantrem
and
a lite review from Copilot
September 11, 2026 23:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_native.decodeDracoMeshand_native.encodeDracoMeshas compatibility entry points_native.DracoCodec.Decode,Encode, andVersionAPICompatibility scope
BabylonNative's unchanged stock runtime bundle is
babylonjs9.21.2. That bundle does not contain either native Draco feature probe. I also checked the publishedbabylonjsand@babylonjs/corepackages at 9.21.2 and at the current 9.26.0 release; neither contains_native.decodeDracoMeshor_native.encodeDracoMesh.These exports therefore prepare NativeDraco for the Babylon.js native decoder/encoder interface without claiming that a released Babylon.js version currently selects this path. The signatures match that interface: synchronous decode returns
{ indices, attributes, totalVertices }, and synchronous encode returns{ data: Int8Array, attributeIds }.No dependency pin, lockfile, scene, reference, gate, or exclusion changed.
Validation
Configured and built with NativeDraco enabled:
Negative control on unchanged exports with the new regression tests:
The failures explicitly reported the missing compatibility function and showed that its missing-function
TypeErrordid not match the grouped decoder's native malformed-input error.After the export change:
This is API/unit coverage against stock pinned assets; no stock visual-test outcome is claimed because the released bundle does not probe these entry points.