Skip to content

[compat-sync] Back NullEngine with Lite headless engine + add RawTexture3D#362

Merged
ryantrem merged 2 commits into
masterfrom
compat-sync/scheduled-2026-07-04-55773
Jul 6, 2026
Merged

[compat-sync] Back NullEngine with Lite headless engine + add RawTexture3D#362
ryantrem merged 2 commits into
masterfrom
compat-sync/scheduled-2026-07-04-55773

Conversation

@babylon-compat-sync

Copy link
Copy Markdown
Contributor

Automated sync of @babylonjs/lite-compat against the latest Babylon.js and Babylon Lite changes,
produced by the update-compat-layer skill.

Synced against BJS commit: fe3f8210e9def4da065ec4ee2b2ef07e5afff63b

Validation (run independently by the pipeline)

  • ✅ compat unit tests
  • ✅ compat typecheck

Changed files

  • ackages/babylon-lite-compat/COMPAT-STATUS.md
  • packages/babylon-lite-compat/README.md
  • packages/babylon-lite-compat/src/engine/engine.ts
  • packages/babylon-lite-compat/src/index.ts
  • packages/babylon-lite-compat/src/scene/scene.ts
  • packages/babylon-lite-compat/src/textures/textures.ts
  • packages/babylon-lite-compat/tests/null-engine.test.ts
  • packages/babylon-lite/src/engine/null-engine.ts
  • packages/babylon-lite-compat/tests/raw-texture-3d.test.ts

Validation passed. Please review the wrapper changes and the updated COMPAT-STATUS.md before merging.

Opened as a draft by the compat-sync pipeline. Review and mark ready when satisfied.

@babylon-compat-sync babylon-compat-sync Bot added automation compat Missing or broken feature in the compatibility layer (@babylonjs/lite-compat) labels Jul 4, 2026
@bjsplat

bjsplat commented Jul 4, 2026

Copy link
Copy Markdown

Lab - Static Site

Open deployed site

Build 20260704.1 - merge @ 92b0f1f

@ryantrem ryantrem self-assigned this Jul 6, 2026
@ryantrem ryantrem marked this pull request as ready for review July 6, 2026 16:41
Copilot AI review requested due to automatic review settings July 6, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/headless Scene with Babylon Lite’s createNullEngine + stepScene, using defaultRenderTask: false for 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 RawTexture3D argument 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.

Comment thread packages/babylon-lite-compat/src/textures/textures.ts
Comment thread packages/babylon-lite-compat/src/engine/engine.ts Outdated
Comment thread packages/babylon-lite-compat/src/engine/engine.ts
@bjsplat

bjsplat commented Jul 6, 2026

Copy link
Copy Markdown

Bundle Size Changes

Decreases

Package Current Master Change
Scene 146 — PBR Geometry Renderer (Sponza)
scene146
65 KB 112 KB -47 KB

Sizes rounded to nearest KB. Run pnpm build:bundle-scenes locally to verify.

… 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 ryantrem enabled auto-merge (squash) July 6, 2026 18:16
@bjsplat

bjsplat commented Jul 6, 2026

Copy link
Copy Markdown

Lab - Static Site

Open deployed site

Build 20260706.14 - merge @ 208ca35

@ryantrem ryantrem merged commit df59cb7 into master Jul 6, 2026
11 checks passed
@ryantrem ryantrem deleted the compat-sync/scheduled-2026-07-04-55773 branch July 6, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation compat Missing or broken feature in the compatibility layer (@babylonjs/lite-compat)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants