Skip to content

chore(deps): upgrade Vite to 8 (rolldown-vite)#377

Draft
RaananW wants to merge 2 commits into
masterfrom
raananw-deps-vite-8-rolldown
Draft

chore(deps): upgrade Vite to 8 (rolldown-vite)#377
RaananW wants to merge 2 commits into
masterfrom
raananw-deps-vite-8-rolldown

Conversation

@RaananW

@RaananW RaananW commented Jul 7, 2026

Copy link
Copy Markdown
Member

🧪 EXPLORATION — DO NOT MERGE. Rolldown adoption is on hold.

Per maintainer decision, this PR is parked as a documented exploration; the TypeScript 6 upgrade (#376) is the deliverable from this effort. Reasons, in priority order:

  1. Tree-shakeability regression (primary blocker). Rolldown emits the lib barrel via a module-scope __exportAll(...) runtime call — a module-level side effect that violates the repo's zero-side-effects pillar (treeshake-rollup.test.ts test 1). For a library whose entire purpose is aggressive tree-shaking, this is disqualifying, not cosmetic.
  2. 5 inherent Rolldown bundle-size ceiling overages (~3.3 KB total across scene47/49/221/262/263) — Rolldown codegen is inherently larger than Rollup's.

Revive criteria: revisit when Rolldown emits side-effect-free barrel exports (or a config workaround keeps treeshake-rollup green) and the bundle-size overages fall within ceilings — without weakening the tree-shaking test or raising ceilings.


Scope

Bumps Vite ^6.x^8.1.3 across the workspace (root, packages/babylon-lite, packages/babylon-lite-compat, lab, playground). Vite 8 swaps Rollup for Rolldown as its bundler, so this PR is fundamentally a Rollup → Rolldown switch.

TypeScript is intentionally left at ^5.7.0 so this PR isolates the bundler change — the TypeScript 6 upgrade is a separate PR. Verified: Vite 8 builds cleanly under TS 5.9.3; it does not require TS 6, so the two upgrades are independent.

This split was made deliberately so the Rolldown switch can be evaluated on its own merits — it carries real, quantifiable costs (below) that the TS6 PR does not.

🔄 Refreshed against current master

Merged origin/master (now includes #374 tooling batch + pnpm 9.15.9, #378 REUSE_BROWSER, #369 viewer support, #379 docs, #380 scene144 ceiling widen). Lock regenerated cleanly (pnpm install), test-harness files (playwright.config.ts, parity-fixtures.ts, compare-core.ts) taken from master, Rolldown config kept in vite.config/bundle scripts. All 209 per-scene manifests regenerated with Rolldown against the new baseline. The size story is unchanged by the merge — same 5 scenes over ceiling, ~3.3 KB total.

Rolldown config adaptations

  • liteResolvePlugin (scripts/bundle-scenes-core.ts, scripts/bundle-demos-core.ts) now returns { id, moduleSideEffects: false }. Rolldown doesn't pick up the package's sideEffects: false via the resolved absolute path, so the lite entry stopped tree-shaking without this.
  • $initial codeSplitting group ({ name: "lite-initial", tags: ["$initial"] }) consolidates the many tiny util chunks Rolldown would otherwise emit back into the entry chunk, matching Rollup's chunking.
  • oxc minifier for lite scenes — Rolldown's native minifier. terser breaks the entry-only __name banner across split chunks under Rolldown; esbuild produces larger output; oxc is the smallest viable option.
  • codeSplitting: false in the dist vite.config.ts — Rolldown's replacement for the removed inlineDynamicImports, keeping the single-file dist output.

Test-harness adaptation

  • tests/lite/build/treeshake-rollup.test.tsnormalize() now strips Rolldown's //#region <path> / //#endregion module-boundary comments (pure codegen bookkeeping, not emitted code). Without this, the side-effect assertions compared against comment noise. This fixes two false failures (the "every source module" test and the positive control). The remaining failure is not masked — see residuals.

Bundle-size result vs current master (refreshed)

bundle-size.spec.ts under the parity lock (port 5279): 202 passed, 5 failed — the same 5 Rolldown overages, no new scenes:

Scene raw KB Ceiling (maxRawKB) Over by
scene221 — Pointer Drags 102.2 101.1 +1.1 KB
scene263 — NPE Particles: Sphere 46.1 45 +1.1 KB
scene47 — Physics Heightfield 93.0 92.5 +0.5 KB
scene49 — Physics Shape Queries 93.9 93.5 +0.4 KB
scene262 — NPE Particles: Size 45.2 45 +0.2 KB

~3.3 KB total over — identical set to the pre-merge measurement. No ceilings or goldens touched.

Parity vs current master

  • scene144 (bloom) now PASSES — master's docs(parity): scene144 bloom parity ceiling investigation (ON HOLD) #380 widened maxMad to 0.072; Rolldown build measures within it. ✅
  • scene116 (shadow depth) — MAD 0.288: pre-existing local-GPU strict-threshold noise; fails byte-identically on unmodified master, green on CI. Not introduced here.
  • Single-window REUSE_BROWSER=true --workers=1 (headed) confirmed working on the scene specs.

Test / build results

  • pnpm run lint (eslint + tsc across all tsconfigs): ✅ green
  • pnpm build:lib: ✅ exit 0
  • pnpm test:build: ⚠️ 1 residual failure (treeshake barrel side effect — see below)

⚠️ Known residuals (Rolldown-inherent — parked, NOT worked around)

These are the reason this PR is separate and parked. No ceilings or golden references were touched.

1. Bundle-size ceiling overages (5 scenes) — table above; Rolldown emits slightly larger output than Rollup even with the config levers applied.

2. Tree-shakeabilitytreeshake-rollup.test.ts test 1 (bare import of the built dist) still fails after the master merge: Rolldown emits the lib barrel via an __exportAll(...) runtime call at module scope, which the harness's forced moduleSideEffects: true treats as a module-level side effect (Rollup emitted static export {} with none). This is a genuine Rolldown tree-shakeability difference vs GUIDANCE's "zero module-level side effects" pillar and is left visible rather than masked for evaluation.

Notes

Bump vite ^6.x -> ^8.1.3 across the workspace (root, babylon-lite,
babylon-lite-compat, lab, playground). Vite 8 replaces Rollup with Rolldown
as its bundler, so this is fundamentally a Rollup -> Rolldown switch.
TypeScript is intentionally left at ^5.7.0 so this PR isolates the bundler
change; the TypeScript 6 upgrade is a separate PR. (Verified Vite 8 builds
fine under TS 5.9.3 — it does NOT require TS 6.)

Rolldown config adaptations (scripts/bundle-scenes-core.ts,
scripts/bundle-demos-core.ts, packages/babylon-lite/vite.config.ts):

- liteResolvePlugin now returns `{ id, moduleSideEffects: false }`. Rolldown
  does not pick up the package's `sideEffects: false` via the resolved
  absolute path, so tree-shaking of the lite entry regressed without this.
- Scene bundles use a `$initial` codeSplitting group
  (`{ name: "lite-initial", tags: ["$initial"] }`) to consolidate the many
  tiny util chunks Rolldown would otherwise emit back into the entry chunk,
  matching Rollup's chunking.
- Lite scenes minify with Rolldown's native `oxc` minifier. terser breaks the
  entry-only `__name` banner across split chunks under Rolldown, and esbuild
  produces larger output; oxc is the smallest viable option.
- dist build uses `codeSplitting: false` (Rolldown's replacement for the
  removed `inlineDynamicImports`) to keep the single-file dist output.

Test-harness adaptation (tests/lite/build/treeshake-rollup.test.ts):

- `normalize()` now strips Rolldown's `//#region <path>` / `//#endregion`
  module-boundary comments. These are pure codegen bookkeeping, not emitted
  code; without stripping them the side-effect assertions compared against
  comment noise. This fixes the two false failures (source-module and
  positive-control tests). See "Known residual" below for the one that
  remains and is NOT masked.

Regenerated 209 per-scene bundle manifests reflecting Rolldown codegen.

Known residuals (Rolldown-inherent — documented for evaluation, NOT worked
around by touching ceilings/goldens):

- Bundle size: 5 scenes exceed their immutable maxRawKB ceilings under
  Rolldown codegen — scene47 (+~0.6KB), scene49 (+~1.0KB), scene221
  (+~1.3KB), scene262 (+~4.5KB), scene263 (+~4.2KB). Rolldown emits slightly
  larger output than Rollup for these; the config levers above were already
  applied. Merging needs either a small ceiling bump or known-diff
  acceptance (user's call).
- Tree-shaking: treeshake-rollup.test.ts test 1 (bare import of the built
  dist) fails because Rolldown emits the lib barrel via an `__exportAll(...)`
  runtime call at module scope, which the harness's forced
  `moduleSideEffects: true` treats as a module-level side effect (Rollup
  emitted static `export {}` with none). This is a genuine Rolldown
  tree-shakeability difference and is left visible rather than masked.

scene116 (MAD 0.288) and scene144 (0.07000434) parity failures are
PRE-EXISTING local-GPU strict-threshold noise: they fail byte-identically on
unmodified master and are green on CI. Not introduced by this change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bjsplat

bjsplat commented Jul 7, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 262 — NPE Particles: Basic Properties - Size
scene262
45 KB 41 KB +4 KB
Scene 263 — NPE Particles: Emitters - Sphere
scene263
46 KB 42 KB +4 KB
Scene 67 — NME PBR Core
scene67
78 KB 76 KB +2 KB
Scene 129 — Gaussian Splatting GPU Picking
scene129
85 KB 83 KB +2 KB
Scene 47 — Physics Heightfield
scene47
93 KB 92 KB +1 KB
Scene 49 — Physics Shape Queries
scene49
94 KB 93 KB +1 KB
Scene 51 — Soft-Edged Sprite Grid (Premultiplied)
scene51
17 KB 16 KB +1 KB
Scene 55 — Billboard Sorting
scene55
32 KB 31 KB +1 KB
Scene 58 — Sprite2D Animation
scene58
20 KB 19 KB +1 KB
Scene 61 — NME Normal As Color
scene61
55 KB 54 KB +1 KB
Scene 68 — NME PBR Clearcoat
scene68
92 KB 91 KB +1 KB
Scene 70 — NME PBR Anisotropy
scene70
92 KB 91 KB +1 KB
Scene 87 — NME Iridescence + Image Processing
scene87
95 KB 94 KB +1 KB
Scene 113 — Picking Precision
scene113
64 KB 63 KB +1 KB
Scene 114 — Morph/Skeleton Picking
scene114
81 KB 80 KB +1 KB
Scene 125 — Gaussian Splatting bakeCurrentTransformIntoVertices
scene125
38 KB 37 KB +1 KB
Scene 221 — Pointer Drags
scene221
102 KB 101 KB +1 KB
Scene 224 — Bounding Box Gizmo
scene224
83 KB 82 KB +1 KB

Decreases

Package Current Master Change
Scene 146 — PBR Geometry Renderer (Sponza)
scene146
109 KB 112 KB -3 KB
Scene 241 — AnimationPointerUVs
scene241
159 KB 162 KB -3 KB
Scene 253 — AnimateAllTheThings
scene253
150 KB 153 KB -3 KB
Scene 5 — Alien Skeleton
scene5
90 KB 92 KB -2 KB
Scene 7 — ChibiRex Animated
scene7
104 KB 106 KB -2 KB
Scene 11 — Shark GLB
scene11
87 KB 89 KB -2 KB
Scene 22 — PBR Shadows
scene22
96 KB 98 KB -2 KB
Scene 27 — Material Variants
scene27
81 KB 83 KB -2 KB
Scene 39 — KHR_animation_pointer (Animated Waterfall)
scene39
107 KB 109 KB -2 KB
Scene 99 — Bone Control
scene99
90 KB 92 KB -2 KB
Scene 73 — Wheel PBR vs NME Viewports
scene73
142 KB 144 KB -2 KB
Scene 111 — Light Selection Stress Test
scene111
133 KB 135 KB -2 KB
Scene 116 — Shadow Depth Materials
scene116
75 KB 77 KB -2 KB
Scene 141 — ESM Material Casters
scene141
122 KB 124 KB -2 KB
Scene 144 — Bloom Post-process
scene144
109 KB 111 KB -2 KB
Scene 145 — Geometry Renderer Task
scene145
87 KB 89 KB -2 KB
Scene 147 — Circle of Confusion
scene147
102 KB 104 KB -2 KB
Scene 148 — Depth of Field
scene148
108 KB 110 KB -2 KB
Scene 158 — Additive Animation Blend
scene158
94 KB 96 KB -2 KB
Scene 164 - Device Lost Recovery
scene164
97 KB 99 KB -2 KB
Scene 209 — LWR Physics
scene209
53 KB 55 KB -2 KB
Scene 215 — Cascaded Shadow Maps (PBR)
scene215
78 KB 80 KB -2 KB
Scene 244 — PotOfCoalsAnimationPointer
scene244
132 KB 134 KB -2 KB
Scene 251 — Animation Mask (Xbot walk, frozen legs)
scene251
88 KB 90 KB -2 KB
Scene 1 — BoomBox PBR
scene1
88 KB 89 KB -1 KB
Scene 4 — Shadows
scene4
72 KB 73 KB -1 KB
Scene 6 — PBR Gold Sphere
scene6
72 KB 73 KB -1 KB
Scene 8 — HDR Glass Sphere
scene8
74 KB 75 KB -1 KB
Scene 9 — Sponza (.babylon)
scene9
59 KB 60 KB -1 KB
Scene 12 — PBR Shader Balls
scene12
102 KB 103 KB -1 KB
Scene 13 — PBR Spheres Grid
scene13
84 KB 85 KB -1 KB
Scene 14 — Flight Helmet
scene14
88 KB 89 KB -1 KB
Scene 18 — PCF Shadows
scene18
60 KB 61 KB -1 KB
Scene 20 — PBR Emissive Grid
scene20
78 KB 79 KB -1 KB
Scene 23 — PBR Anisotropy
scene23
78 KB 79 KB -1 KB
Scene 24 — Hill Valley
scene24
58 KB 59 KB -1 KB
Scene 28 — Clearcoat glTF
scene28
86 KB 87 KB -1 KB
Scene 29 — Sheen Cloth glTF
scene29
89 KB 90 KB -1 KB
Scene 30 — KHR_materials_volume_testing
scene30
103 KB 104 KB -1 KB
Scene 32 — KHR_materials_unlit
scene32
79 KB 80 KB -1 KB
Scene 33 — KHR_lights_punctual
scene33
103 KB 104 KB -1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
96 KB 97 KB -1 KB
Scene 36 — Basis Universal Texture
scene36
51 KB 52 KB -1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
96 KB 97 KB -1 KB
Scene 40 — Physics
scene40
49 KB 50 KB -1 KB
Scene 45 — Physics Collision Filtering
scene45
51 KB 52 KB -1 KB
Scene 46 — Physics Constraints
scene46
54 KB 55 KB -1 KB
Scene 48 — Physics Center of Mass
scene48
54 KB 55 KB -1 KB
Scene 53 — Depth-Hosted Sprites Mixed With 3D
scene53
57 KB 58 KB -1 KB
Scene 60 — NME Flat Colour
scene60
55 KB 56 KB -1 KB
Scene 66 — NME Full Playground (AT7YY5#6)
scene66
88 KB 89 KB -1 KB
Scene 72 — NME PBR Full (D8AK3Z)
scene72
107 KB 108 KB -1 KB
Scene 77 — NME Compatibility Blocks
scene77
59 KB 60 KB -1 KB
Scene 80 — NME Color Operations
scene80
60 KB 61 KB -1 KB
Scene 81 — NME UV Projection
scene81
66 KB 67 KB -1 KB
Scene 83 — NME Normals
scene83
69 KB 70 KB -1 KB
Scene 84 — NME Fragment Screen
scene84
84 KB 85 KB -1 KB
Scene 86 — NME Scene State
scene86
59 KB 60 KB -1 KB
Scene 88 — NME LoopBlock
scene88
60 KB 61 KB -1 KB
Scene 94 — Billboard Custom Shader (params tint)
scene94
63 KB 64 KB -1 KB
Scene 100 — Physics Collision Event
scene100
50 KB 51 KB -1 KB
Scene 106 — Prestep × Motion Types
scene106
51 KB 52 KB -1 KB
Scene 112 — KHR_texture_basisu Flight Helmet
scene112
120 KB 121 KB -1 KB
Scene 115 — Alien Picking Frame 100
scene115
125 KB 126 KB -1 KB
Scene 143 — Pipelined Post-processes
scene143
69 KB 70 KB -1 KB
Scene 149 — Node-Material Geometry Renderer (PowerPlant)
scene149
108 KB 109 KB -1 KB
Scene 151 — Manual Transform Animation
scene151
55 KB 56 KB -1 KB
Scene 152 — Unified AnimationManager
scene152
93 KB 94 KB -1 KB
Scene 154 - Step Time Animation
scene154
55 KB 56 KB -1 KB
Scene 157 — glTF Weighted Animation Blend
scene157
94 KB 95 KB -1 KB
Scene 161 - ShaderMaterial Uniform
scene161
38 KB 39 KB -1 KB
Scene 170 - Navigation Basic
scene170
51 KB 52 KB -1 KB
Scene 171 - Navigation Crowd Path
scene171
95 KB 96 KB -1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
96 KB 97 KB -1 KB
Scene 175 - Navigation Raycast
scene175
94 KB 95 KB -1 KB
Scene 176 - MosquitoInAmber
scene176
103 KB 104 KB -1 KB
Scene 177 - PBR Iridescence Sphere
scene177
69 KB 70 KB -1 KB
Scene 178 - IridescenceAbalone glTF
scene178
87 KB 88 KB -1 KB
Scene 179 - Clustered Sponza Lights
scene179
72 KB 73 KB -1 KB
Scene 201 - LWR Demo (HPM on, FO on)
scene201
48 KB 49 KB -1 KB
Scene 203 - LWR Spot Light
scene203
49 KB 50 KB -1 KB
Scene 204 - LWR Thin Instances
scene204
50 KB 51 KB -1 KB
Scene 205 - LWR Facing Billboards
scene205
61 KB 62 KB -1 KB
Scene 207 - LWR Directional Shadows
scene207
59 KB 60 KB -1 KB
Scene 210 — XMP Metadata Cube
scene210
76 KB 77 KB -1 KB
Scene 211 — BrainStem Meshopt
scene211
89 KB 90 KB -1 KB
Scene 216 — PBR Fog
scene216
53 KB 54 KB -1 KB
Scene 217 — Material Plugin (BlackAndWhite)
scene217
77 KB 78 KB -1 KB
Scene 218 — Vertex Animation Texture (VAT)
scene218
91 KB 92 KB -1 KB
Scene 219 — Per-instance VAT
scene219
94 KB 95 KB -1 KB
Scene 222 — Composite Gizmos
scene222
111 KB 112 KB -1 KB
Scene 229 — Triangle Without Indices
scene229
67 KB 68 KB -1 KB
Scene 240 — AnimatedTriangle
scene240
90 KB 91 KB -1 KB
Scene 242 — EmissiveFireflies
scene242
96 KB 97 KB -1 KB
Scene 243 — MorphStressTest
scene243
96 KB 97 KB -1 KB
Scene 245 — RecursiveSkeletons
scene245
99 KB 100 KB -1 KB
Scene 246 — SimpleSkin
scene246
98 KB 99 KB -1 KB
Scene 247 — TeapotsGalore
scene247
83 KB 84 KB -1 KB
Scene 249 — VertexColorAlphaClipTest
scene249
78 KB 79 KB -1 KB
Scene 254 — Signed Accessor Animation
scene254
91 KB 92 KB -1 KB
Scene 255 — Skin Weights (Byte)
scene255
93 KB 94 KB -1 KB
Scene 257 — Negative Node Scale
scene257
79 KB 80 KB -1 KB
Scene 258 — Interleaved UV
scene258
82 KB 83 KB -1 KB
Scene 260 — Triangle Strip
scene260
79 KB 80 KB -1 KB

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

@bjsplat

bjsplat commented Jul 7, 2026

Copy link
Copy Markdown

📋 parity — Test Report

View full Playwright report

Build 20260707.12 · merge @ 395bcb9

…-rolldown

# Conflicts:
#	lab/public/bundle/manifest/scene101.json
#	lab/public/bundle/manifest/scene102.json
#	lab/public/bundle/manifest/scene104.json
#	lab/public/bundle/manifest/scene105.json
#	lab/public/bundle/manifest/scene106.json
#	lab/public/bundle/manifest/scene110.json
#	lab/public/bundle/manifest/scene113.json
#	lab/public/bundle/manifest/scene114.json
#	lab/public/bundle/manifest/scene115.json
#	lab/public/bundle/manifest/scene128.json
#	lab/public/bundle/manifest/scene129.json
#	lab/public/bundle/manifest/scene142.json
#	lab/public/bundle/manifest/scene150.json
#	lab/public/bundle/manifest/scene151.json
#	lab/public/bundle/manifest/scene155.json
#	lab/public/bundle/manifest/scene170.json
#	lab/public/bundle/manifest/scene172.json
#	lab/public/bundle/manifest/scene18.json
#	lab/public/bundle/manifest/scene201.json
#	lab/public/bundle/manifest/scene202.json
#	lab/public/bundle/manifest/scene203.json
#	lab/public/bundle/manifest/scene205.json
#	lab/public/bundle/manifest/scene213.json
#	lab/public/bundle/manifest/scene221.json
#	lab/public/bundle/manifest/scene222.json
#	lab/public/bundle/manifest/scene223.json
#	lab/public/bundle/manifest/scene224.json
#	lab/public/bundle/manifest/scene225.json
#	lab/public/bundle/manifest/scene3.json
#	lab/public/bundle/manifest/scene36.json
#	lab/public/bundle/manifest/scene45.json
#	lab/public/bundle/manifest/scene46.json
#	lab/public/bundle/manifest/scene49.json
#	lab/public/bundle/manifest/scene53.json
#	lab/public/bundle/manifest/scene54.json
#	lab/public/bundle/manifest/scene57.json
#	lab/public/bundle/manifest/scene59.json
#	lab/public/bundle/manifest/scene66.json
#	lab/public/bundle/manifest/scene94.json
#	lab/public/bundle/manifest/scene95.json
#	lab/public/bundle/manifest/scene98.json
#	package.json
#	pnpm-lock.yaml
@bjsplat

bjsplat commented Jul 8, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 262 — NPE Particles: Basic Properties - Size
scene262
45 KB 41 KB +4 KB
Scene 263 — NPE Particles: Emitters - Sphere
scene263
46 KB 42 KB +4 KB
Scene 67 — NME PBR Core
scene67
78 KB 76 KB +2 KB
Scene 129 — Gaussian Splatting GPU Picking
scene129
85 KB 83 KB +2 KB
Scene 47 — Physics Heightfield
scene47
93 KB 92 KB +1 KB
Scene 49 — Physics Shape Queries
scene49
94 KB 93 KB +1 KB
Scene 51 — Soft-Edged Sprite Grid (Premultiplied)
scene51
17 KB 16 KB +1 KB
Scene 55 — Billboard Sorting
scene55
32 KB 31 KB +1 KB
Scene 58 — Sprite2D Animation
scene58
20 KB 19 KB +1 KB
Scene 61 — NME Normal As Color
scene61
55 KB 54 KB +1 KB
Scene 68 — NME PBR Clearcoat
scene68
92 KB 91 KB +1 KB
Scene 70 — NME PBR Anisotropy
scene70
92 KB 91 KB +1 KB
Scene 87 — NME Iridescence + Image Processing
scene87
95 KB 94 KB +1 KB
Scene 113 — Picking Precision
scene113
64 KB 63 KB +1 KB
Scene 114 — Morph/Skeleton Picking
scene114
81 KB 80 KB +1 KB
Scene 125 — Gaussian Splatting bakeCurrentTransformIntoVertices
scene125
38 KB 37 KB +1 KB
Scene 221 — Pointer Drags
scene221
102 KB 101 KB +1 KB
Scene 224 — Bounding Box Gizmo
scene224
83 KB 82 KB +1 KB

Decreases

Package Current Master Change
Scene 253 — AnimateAllTheThings
scene253
149 KB 153 KB -4 KB
Scene 39 — KHR_animation_pointer (Animated Waterfall)
scene39
106 KB 109 KB -3 KB
Scene 146 — PBR Geometry Renderer (Sponza)
scene146
109 KB 112 KB -3 KB
Scene 241 — AnimationPointerUVs
scene241
159 KB 162 KB -3 KB
Scene 244 — PotOfCoalsAnimationPointer
scene244
131 KB 134 KB -3 KB
Scene 5 — Alien Skeleton
scene5
90 KB 92 KB -2 KB
Scene 7 — ChibiRex Animated
scene7
104 KB 106 KB -2 KB
Scene 11 — Shark GLB
scene11
87 KB 89 KB -2 KB
Scene 22 — PBR Shadows
scene22
96 KB 98 KB -2 KB
Scene 27 — Material Variants
scene27
81 KB 83 KB -2 KB
Scene 99 — Bone Control
scene99
90 KB 92 KB -2 KB
Scene 73 — Wheel PBR vs NME Viewports
scene73
142 KB 144 KB -2 KB
Scene 111 — Light Selection Stress Test
scene111
133 KB 135 KB -2 KB
Scene 112 — KHR_texture_basisu Flight Helmet
scene112
119 KB 121 KB -2 KB
Scene 116 — Shadow Depth Materials
scene116
75 KB 77 KB -2 KB
Scene 141 — ESM Material Casters
scene141
122 KB 124 KB -2 KB
Scene 144 — Bloom Post-process
scene144
109 KB 111 KB -2 KB
Scene 145 — Geometry Renderer Task
scene145
87 KB 89 KB -2 KB
Scene 147 — Circle of Confusion
scene147
102 KB 104 KB -2 KB
Scene 148 — Depth of Field
scene148
108 KB 110 KB -2 KB
Scene 158 — Additive Animation Blend
scene158
94 KB 96 KB -2 KB
Scene 164 - Device Lost Recovery
scene164
97 KB 99 KB -2 KB
Scene 209 — LWR Physics
scene209
53 KB 55 KB -2 KB
Scene 215 — Cascaded Shadow Maps (PBR)
scene215
78 KB 80 KB -2 KB
Scene 251 — Animation Mask (Xbot walk, frozen legs)
scene251
88 KB 90 KB -2 KB
Scene 1 — BoomBox PBR
scene1
88 KB 89 KB -1 KB
Scene 4 — Shadows
scene4
72 KB 73 KB -1 KB
Scene 6 — PBR Gold Sphere
scene6
72 KB 73 KB -1 KB
Scene 8 — HDR Glass Sphere
scene8
74 KB 75 KB -1 KB
Scene 9 — Sponza (.babylon)
scene9
59 KB 60 KB -1 KB
Scene 12 — PBR Shader Balls
scene12
102 KB 103 KB -1 KB
Scene 13 — PBR Spheres Grid
scene13
84 KB 85 KB -1 KB
Scene 14 — Flight Helmet
scene14
88 KB 89 KB -1 KB
Scene 18 — PCF Shadows
scene18
60 KB 61 KB -1 KB
Scene 20 — PBR Emissive Grid
scene20
78 KB 79 KB -1 KB
Scene 23 — PBR Anisotropy
scene23
78 KB 79 KB -1 KB
Scene 24 — Hill Valley
scene24
58 KB 59 KB -1 KB
Scene 28 — Clearcoat glTF
scene28
86 KB 87 KB -1 KB
Scene 29 — Sheen Cloth glTF
scene29
89 KB 90 KB -1 KB
Scene 30 — KHR_materials_volume_testing
scene30
103 KB 104 KB -1 KB
Scene 32 — KHR_materials_unlit
scene32
79 KB 80 KB -1 KB
Scene 33 — KHR_lights_punctual
scene33
103 KB 104 KB -1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
96 KB 97 KB -1 KB
Scene 36 — Basis Universal Texture
scene36
51 KB 52 KB -1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
96 KB 97 KB -1 KB
Scene 40 — Physics
scene40
49 KB 50 KB -1 KB
Scene 45 — Physics Collision Filtering
scene45
51 KB 52 KB -1 KB
Scene 46 — Physics Constraints
scene46
54 KB 55 KB -1 KB
Scene 48 — Physics Center of Mass
scene48
54 KB 55 KB -1 KB
Scene 53 — Depth-Hosted Sprites Mixed With 3D
scene53
57 KB 58 KB -1 KB
Scene 60 — NME Flat Colour
scene60
55 KB 56 KB -1 KB
Scene 66 — NME Full Playground (AT7YY5#6)
scene66
88 KB 89 KB -1 KB
Scene 72 — NME PBR Full (D8AK3Z)
scene72
107 KB 108 KB -1 KB
Scene 77 — NME Compatibility Blocks
scene77
59 KB 60 KB -1 KB
Scene 80 — NME Color Operations
scene80
60 KB 61 KB -1 KB
Scene 81 — NME UV Projection
scene81
66 KB 67 KB -1 KB
Scene 83 — NME Normals
scene83
69 KB 70 KB -1 KB
Scene 84 — NME Fragment Screen
scene84
84 KB 85 KB -1 KB
Scene 86 — NME Scene State
scene86
59 KB 60 KB -1 KB
Scene 88 — NME LoopBlock
scene88
60 KB 61 KB -1 KB
Scene 94 — Billboard Custom Shader (params tint)
scene94
63 KB 64 KB -1 KB
Scene 100 — Physics Collision Event
scene100
50 KB 51 KB -1 KB
Scene 106 — Prestep × Motion Types
scene106
51 KB 52 KB -1 KB
Scene 115 — Alien Picking Frame 100
scene115
125 KB 126 KB -1 KB
Scene 143 — Pipelined Post-processes
scene143
69 KB 70 KB -1 KB
Scene 149 — Node-Material Geometry Renderer (PowerPlant)
scene149
108 KB 109 KB -1 KB
Scene 151 — Manual Transform Animation
scene151
55 KB 56 KB -1 KB
Scene 152 — Unified AnimationManager
scene152
93 KB 94 KB -1 KB
Scene 154 - Step Time Animation
scene154
55 KB 56 KB -1 KB
Scene 157 — glTF Weighted Animation Blend
scene157
94 KB 95 KB -1 KB
Scene 161 - ShaderMaterial Uniform
scene161
38 KB 39 KB -1 KB
Scene 170 - Navigation Basic
scene170
51 KB 52 KB -1 KB
Scene 171 - Navigation Crowd Path
scene171
95 KB 96 KB -1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
96 KB 97 KB -1 KB
Scene 175 - Navigation Raycast
scene175
94 KB 95 KB -1 KB
Scene 176 - MosquitoInAmber
scene176
103 KB 104 KB -1 KB
Scene 177 - PBR Iridescence Sphere
scene177
69 KB 70 KB -1 KB
Scene 178 - IridescenceAbalone glTF
scene178
87 KB 88 KB -1 KB
Scene 179 - Clustered Sponza Lights
scene179
72 KB 73 KB -1 KB
Scene 201 - LWR Demo (HPM on, FO on)
scene201
48 KB 49 KB -1 KB
Scene 203 - LWR Spot Light
scene203
49 KB 50 KB -1 KB
Scene 204 - LWR Thin Instances
scene204
50 KB 51 KB -1 KB
Scene 205 - LWR Facing Billboards
scene205
61 KB 62 KB -1 KB
Scene 207 - LWR Directional Shadows
scene207
59 KB 60 KB -1 KB
Scene 210 — XMP Metadata Cube
scene210
76 KB 77 KB -1 KB
Scene 211 — BrainStem Meshopt
scene211
89 KB 90 KB -1 KB
Scene 212 - DispersionTest glTF
scene212
103 KB 104 KB -1 KB
Scene 216 — PBR Fog
scene216
53 KB 54 KB -1 KB
Scene 217 — Material Plugin (BlackAndWhite)
scene217
77 KB 78 KB -1 KB
Scene 218 — Vertex Animation Texture (VAT)
scene218
91 KB 92 KB -1 KB
Scene 219 — Per-instance VAT
scene219
94 KB 95 KB -1 KB
Scene 222 — Composite Gizmos
scene222
111 KB 112 KB -1 KB
Scene 229 — Triangle Without Indices
scene229
67 KB 68 KB -1 KB
Scene 240 — AnimatedTriangle
scene240
90 KB 91 KB -1 KB
Scene 242 — EmissiveFireflies
scene242
96 KB 97 KB -1 KB
Scene 243 — MorphStressTest
scene243
96 KB 97 KB -1 KB
Scene 245 — RecursiveSkeletons
scene245
99 KB 100 KB -1 KB
Scene 246 — SimpleSkin
scene246
98 KB 99 KB -1 KB
Scene 247 — TeapotsGalore
scene247
83 KB 84 KB -1 KB
Scene 249 — VertexColorAlphaClipTest
scene249
78 KB 79 KB -1 KB
Scene 254 — Signed Accessor Animation
scene254
91 KB 92 KB -1 KB
Scene 255 — Skin Weights (Byte)
scene255
93 KB 94 KB -1 KB
Scene 257 — Negative Node Scale
scene257
79 KB 80 KB -1 KB
Scene 258 — Interleaved UV
scene258
82 KB 83 KB -1 KB
Scene 260 — Triangle Strip
scene260
79 KB 80 KB -1 KB

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

RaananW added a commit that referenced this pull request Jul 9, 2026
## Scope

Bumps **TypeScript `^5.7.0` → `^6.0.3`** across the workspace only.
**Vite is unchanged** (stays at its existing `^6.x` pins).

This PR was originally TS6 + Vite 8 together, but a split diagnostic
showed the two majors carry independent risk, so the Vite 8
(rolldown-vite) work has been moved to its **own separate draft PR
(#377, parked as exploration)**. This PR is now a clean,
zero-ceiling/zero-golden TypeScript-6-only change and is **the
deliverable**.

### Version bumps
`typescript ^5.7.0 → ^6.0.3` in: root, `packages/babylon-lite`,
`packages/babylon-lite-gl`, `packages/babylon-lite-compat`, `lab`,
`playground`. `pnpm-lock.yaml` regenerated (TS-only delta; resolves TS
`5.9.3 → 6.0.3`).

## Code changes required by TS 6

-
**`packages/babylon-lite/src/material/node/node-geometry-renderable.ts`**
— copy the readonly `_vertexBuffers` array (`buffers:
[...a._vertexBuffers]`) when passing it as `GPUVertexState.buffers`. TS6
tightened the WebGPU typings so a readonly array is no longer assignable
to the mutable `buffers` field. Semantics-preserving (shallow copy only;
no runtime/render change).
- **`tests/lite/build/public-api-types.test.ts`,
`tests/gl/build/public-api.test.ts`** — add `--ignoreConfig` to the
standalone `tsc` invocations. TS6 now errors (**TS5112**) when a file is
passed on the command line while a `tsconfig.json` exists in cwd;
`--ignoreConfig` is the flag the error itself recommends.
- **`tests/lite/build/public-api-types.test.ts`** — drop `--types
@webgpu/types`. TS6's built-in `dom` lib now bundles the WebGPU
declarations, so also loading the `@webgpu/types` package duplicates
them and (without `skipLibCheck`, which this test deliberately omits to
catch leaking internal types) trips **TS6200/TS2717** conflicts. The
native lib fully covers every `GPU*` type the public `build/index.d.ts`
references — verified type-checks clean.

No tsconfig strictness was loosened; no blanket `any` / `@ts-ignore` was
added.

### Bundle manifests
All per-scene bundle manifests were regenerated under TS6. Codegen is
**byte-identical to the TS5/Rollup baseline for every scene except two**
— `scene104.json` and `scene149.json` — which shift by a fraction of a
KB (gzip rounding, e.g. `44.5 → 44.6` KB). Those two are therefore the
only manifest files this PR changes vs `master`, and both remain within
existing size ceilings (**0 overages**). (An earlier revision of this
description said "46 manifests"; that reflected a mid-work snapshot
before the TS6-only split — the accurate figure vs `master` is 2.)

## Test / build results (TS6 + Vite 6)

- `pnpm run lint` (eslint + `tsc --noEmit` across all tsconfigs): ✅
green
- `pnpm test:unit` ✅ · `pnpm test:build` ✅ · `pnpm test:unit:gl` ✅ ·
`pnpm test:build:gl` ✅
- `pnpm build:lib`, `pnpm build`, `pnpm build:gl`, `pnpm
build:playground`: ✅ exit 0
- Locked parity + bundle-size on `LAB_TEST_PORT=5279`: **0 bundle-size
overages** ✅. Only `scene116` parity fails (see below); `scene144` now
**passes** after merging master's widened `0.072` ceiling (#380).

### scene116 is pre-existing local-GPU noise — NOT introduced here
`scene116` fails **byte-identically on unmodified `master`** (TS 5.9.3 +
Vite 6, this branch's changes reverted): MAD `0.2883984375…` vs
threshold `0.01`. It is machine/GPU-specific strict-threshold noise that
is **green on CI**, and fails with and without this PR's changes, so it
is not a regression from the TS6 upgrade — a reviewer should not be
alarmed. `scene144` (`0.07000434…`) previously sat a hair over the old
`0.07` threshold but now **passes** under master's widened `0.072`
ceiling (#380). No golden references or thresholds were touched.

## Notes
- Touches `pnpm-lock.yaml` → shares a conflict surface with sibling
dependency PRs (#374 and the parked Vite 8 PR #377); **whichever merges
second regenerates the lock** (trivial re-resolve).
- Merged current `master` (incl. #374 tooling batch + pnpm 9.15.9, #378
REUSE_BROWSER, #353, #381); all suites re-validated green.
- Kept as **draft** for the user's review (drafts-first).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

2 participants