[compat-sync] Back NullEngine with Lite headless engine + add RawTexture3D#362
Merged
Merged
Conversation
Lab - Static SiteBuild 20260704.1 - merge @ 92b0f1f |
ryantrem
approved these changes
Jul 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Syncs @babylonjs/lite-compat to the referenced Babylon.js commit by replacing the compat NullEngine stub with Babylon Lite’s real headless engine path, and adds a compat RawTexture3D wrapper backed by Lite’s createTexture3DFromPixels.
Changes:
- Back compat
NullEngine/headlessScenewith Babylon Lite’screateNullEngine+stepScene, usingdefaultRenderTask: falsefor deviceless simulation. - Add compat
RawTexture3D(construction, getters,update,whenReadyAsync) and export it from the compat entrypoint. - Add/extend compat tests for the headless engine stepping path and
RawTexture3Dargument coercion/forwarding.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/babylon-lite/src/engine/null-engine.ts | Ensures headless engine contexts have _renderingContexts so scene disposal/unregister paths are safe. |
| packages/babylon-lite-compat/src/engine/engine.ts | Switches compat NullEngine to Lite createNullEngine + stepScene and updates headless run loop semantics. |
| packages/babylon-lite-compat/src/scene/scene.ts | Replaces the prior headless SceneContext stub with a real Lite scene context using defaultRenderTask: false, and always disposes via disposeScene. |
| packages/babylon-lite-compat/src/textures/textures.ts | Adds RawTexture3D wrapper and the helper that coerces raw data to RGBA bytes for Lite upload. |
| packages/babylon-lite-compat/src/index.ts | Re-exports RawTexture3D from the compat public surface. |
| packages/babylon-lite-compat/README.md | Updates supported texture surface list to include RawTexture3D. |
| packages/babylon-lite-compat/COMPAT-STATUS.md | Updates sync SHA/date and marks NullEngine and RawTexture3D support status/details. |
| packages/babylon-lite-compat/tests/null-engine.test.ts | Adds assertions proving headless scenes are Lite-driven and stepped via stepScene (observables + delta). |
| packages/babylon-lite-compat/tests/raw-texture-3d.test.ts | Adds unit coverage for RawTexture3D forwarding, coercion, getters, update, and readiness behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Bundle Size ChangesDecreases
Sizes rounded to nearest KB. Run |
… loop docs Truncate toRgbaBytes output to width*height*depth*4 so a larger source view no longer uploads trailing bytes, matching the helper's tightly-packed contract. Update RawTexture3D test to assert the trimmed view. Correct NullEngine doc comments that described a 'fixed' step; the run loop advances scenes by the variable wall-clock delta between frames. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ryantrem
approved these changes
Jul 6, 2026
Lab - Static SiteBuild 20260706.14 - merge @ 208ca35 |
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.
Automated sync of
@babylonjs/lite-compatagainst the latest Babylon.js and Babylon Lite changes,produced by the
update-compat-layerskill.Synced against BJS commit:
fe3f8210e9def4da065ec4ee2b2ef07e5afff63bValidation (run independently by the pipeline)
Changed files
ackages/babylon-lite-compat/COMPAT-STATUS.mdpackages/babylon-lite-compat/README.mdpackages/babylon-lite-compat/src/engine/engine.tspackages/babylon-lite-compat/src/index.tspackages/babylon-lite-compat/src/scene/scene.tspackages/babylon-lite-compat/src/textures/textures.tspackages/babylon-lite-compat/tests/null-engine.test.tspackages/babylon-lite/src/engine/null-engine.tspackages/babylon-lite-compat/tests/raw-texture-3d.test.ts