Skip to content

Port demos to ES6, add pure flavors, and remove all UMD demos#759

Draft
RaananW wants to merge 3 commits into
masterfrom
port-demos-es6-remove-umd
Draft

Port demos to ES6, add pure flavors, and remove all UMD demos#759
RaananW wants to merge 3 commits into
masterfrom
port-demos-es6-remove-umd

Conversation

@RaananW

@RaananW RaananW commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

Migrates the legacy UMD demos to ES6 @babylonjs/* packages and removes all UMD demos from the website, per the contributor rule in AGENTS.md ("no UMD demos"). Every ported demo exists in both flavors:

  • Compiled (src/compiledDemos/<Slug>/) — deep @babylonjs/core/... named imports + side-effect imports.
  • Pure (src/pureCompiledDemos/<Slug>/) — tree-shaken @babylonjs/core/pure barrel + explicit Register*() calls.

Changes

  • Add ES6 compiled + pure versions of the ported demos, wired through the shared demoRunner and registered in both manifest.json files.
  • Strip leftover legacy UMD code (*.js and legacy index.html) from already-ported static/Demos/<Slug> folders. All asset files (textures, .babylon, .hdr, .fx, screenshots) are preserved; fully-ported demos that contained only code are removed entirely.
  • Fix Simplification pure scene to register RegisterEnginesExtensionsEngineRawTexture() so the Dude scene textures load under the pure barrel.
  • Smoke harness, shared demoRunner (compiled + pure), and AGENTS.md contributor-guide updates.

Validation

  • npm run build — succeeds (86 compiled demos).
  • npm run demos:smoke — 85/86 pass (Flat2009 has renderCheck.disabled because its VideoTexture can't decode under headless swiftshader; works in real browsers).
  • npm run demos:pure:smoke — 85 pass.
  • npm run demos:format:write — clean.

Not ported (deferred / unportable)

  • Missing CDN asset (not in repo): UTD, ChibiRex, Retail, ActionBuilder
  • Physics (needs V1→Havok rewrite): Cloth, Physics
  • Audio/video engine: Dancing CSG, AudioAnalyser, AudioAnalyzer, Amp360Video, VideoProcessing
  • Webpack-bundled / NodeMaterial: Ink, Distraction, ProductPage
  • Custom .fx shaders / multi-canvas: Planet, Views
  • Unportable (VR / PWA / WebGPU / GIF): MansionVR, HillValleyVR, Ruins, Sponza, WebGPU, AnimatedGif

RaananW added 2 commits June 8, 2026 17:13
Migrate the legacy UMD demos to ES6 `@babylonjs/*` packages, each in both
the compiled (`src/compiledDemos`) and tree-shaken pure
(`src/pureCompiledDemos`) flavors, and remove the legacy UMD code from the
website per AGENTS.md ("no UMD demos").

- Add ES6 compiled + pure versions of the ported demos, wired through the
  shared demoRunner and registered in both manifests.
- Strip leftover legacy UMD code (*.js and legacy index.html) from already
  ported static/Demos folders; keep all asset files (textures, .babylon,
  .hdr, .fx, screenshots). Fully ported demos with no assets are removed.
- Register RegisterEnginesExtensionsEngineRawTexture in the Simplification
  pure scene so the Dude scene textures load under the pure barrel.
- Smoke harness, shared demoRunners, and AGENTS.md contributor guide updates.

Validation: full build, compiled smoke (85/86, Flat2009 render-check
disabled for headless video), and pure smoke (85) all pass.
@RaananW RaananW marked this pull request as draft June 8, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant