Uh oh!
There was an error while loading. Please reload this page.
Add TextDecoder polyfill with tests - #138
Conversation
- Add Polyfills/TextDecoder with CMakeLists.txt, public header, and implementation - Register JSRUNTIMEHOST_POLYFILL_TEXTDECODER option in root CMakeLists.txt - Add TextDecoder subdirectory to Polyfills/CMakeLists.txt - Initialize TextDecoder in Tests/UnitTests/Shared/Shared.cpp - Link TextDecoder in Tests/UnitTests/CMakeLists.txt - Add TextDecoder decode tests in Tests/UnitTests/Scripts/tests.ts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a TextDecoder polyfill to the JsRuntimeHost polyfills set so GaussianSplatting can parse PLY / compressed PLY headers in environments lacking a native TextDecoder.
Changes:
- Introduce new
Polyfills/TextDecoderlibrary and CMake optionJSRUNTIMEHOST_POLYFILL_TEXTDECODER. - Register the polyfill in unit test runtime initialization.
- Add mocha tests covering basic
TextDecoder.decode()behavior forUint8ArrayandArrayBuffer.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/UnitTests/Shared/Shared.cpp | Initializes the new TextDecoder polyfill in the JS test runtime. |
| Tests/UnitTests/Scripts/tests.ts | Adds mocha coverage for basic TextDecoder.decode() usage. |
| Tests/UnitTests/CMakeLists.txt | Links UnitTests target against the new TextDecoder library. |
| Polyfills/TextDecoder/Source/TextDecoder.cpp | Implements the TextDecoder global and decode() in C++ via N-API. |
| Polyfills/TextDecoder/Include/Babylon/Polyfills/TextDecoder.h | Declares the polyfill Initialize entry point. |
| Polyfills/TextDecoder/CMakeLists.txt | Adds build target for the TextDecoder polyfill. |
| Polyfills/CMakeLists.txt | Adds conditional subdirectory inclusion for TextDecoder. |
| CMakeLists.txt | Adds JSRUNTIMEHOST_POLYFILL_TEXTDECODER option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Used by GaussianSplatting for parsing ply/compressed ply headers