Skip to content

gltf gs extension + character controller fix - #429

Open
CedricGuillemet wants to merge 13 commits into
BabylonJS:masterfrom
CedricGuillemet:charctrlcaps
Open

gltf gs extension + character controller fix#429
CedricGuillemet wants to merge 13 commits into
BabylonJS:masterfrom
CedricGuillemet:charctrlcaps

Conversation

@CedricGuillemet

@CedricGuillemet CedricGuillemet commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 20, 2026 14:07
@bjsplat

bjsplat commented Jul 20, 2026

Copy link
Copy Markdown

📋 perf — Test Report

View full Playwright report

Build 20260720.5 · merge @ 345a2d5

@bjsplat

bjsplat commented Jul 20, 2026

Copy link
Copy Markdown

📋 parity — Test Report

View full Playwright report

Build 20260720.5 · merge @ 345a2d5

@bjsplat

bjsplat commented Jul 20, 2026

Copy link
Copy Markdown

📋 perf — Test Report

View full Playwright report

Build 20260720.6 · merge @ 3683f3d

@bjsplat

bjsplat commented Jul 20, 2026

Copy link
Copy Markdown

📋 parity — Test Report

View full Playwright report

Build 20260720.6 · merge @ 3683f3d

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

Adds parity coverage and loader support for the KHR_gaussian_splatting glTF extension (new Scene 266), and extends the physics character controller to allow rebuilding its capsule shape after construction. This fits into Babylon-Lite’s incremental parity-driven feature growth by adding a new glTF loader feature module and a new reference scene/test.

Changes:

  • Add KHR_gaussian_splatting as a dynamically-loaded glTF feature and implement conversion from GS attributes to Lite’s splat row-buffer format.
  • Introduce Scene 266 (Lite + Babylon.js reference) and a new parity spec + scene-config entry + per-scene bundle manifest.
  • Add setShapeOptions() / shapeOptions to PhysicsCharacterController to rebuild the Havok capsule without recreating the controller.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/lite/parity/scenes/scene266-gs-gltf.spec.ts New parity spec for Scene 266, captures/compares against BJS reference.
scene-config.json Adds scene 266 metadata and thresholds.
packages/babylon-lite/src/physics/character-controller.ts Allows rebuilding the capsule shape via new options setter/getter.
packages/babylon-lite/src/loader-gltf/gltf-feature-registry.ts Registers KHR_gaussian_splatting as a per-asset loader feature.
packages/babylon-lite/src/loader-gltf/gltf-feature-gaussian-splatting.ts Implements GS attribute extraction + packing into Lite’s splat pipeline format.
packages/babylon-lite/src/asset-container.ts Exposes internal _gaussianSplats promises contributed by the GS feature.
lab/public/bundle/manifest/scene266.json Adds per-scene bundle manifest entry for the new scene.
lab/package.json Pins Babylon.js packages to 9.16.0 for reference support.
lab/lite/src/lite/scene266.ts New Lite scene that loads the GS glTF and waits for first sort before ready.
lab/lite/src/bjs/scene266.ts New Babylon.js reference scene for GS glTF parity.
lab/lite/scene266.html Adds dev HTML entrypoint for Scene 266.
lab/lite/bundle-scene266.html Adds bundle HTML entrypoint for Scene 266.
lab/lite/babylon-ref-scene266.html Adds Babylon.js reference HTML entrypoint for Scene 266.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/babylon-lite/src/loader-gltf/gltf-feature-gaussian-splatting.ts Outdated
Comment thread lab/lite/src/lite/scene266.ts Outdated
Comment thread tests/lite/parity/scenes/scene266-gs-gltf.spec.ts Outdated
Comment thread scene-config.json Outdated
@deltakosh

Copy link
Copy Markdown
Contributor

@RaananW is working on making sure lite works with the latest bjs

@CedricGuillemet
CedricGuillemet marked this pull request as draft July 20, 2026 15:45
@CedricGuillemet

Copy link
Copy Markdown
Contributor Author

@RaananW is working on making sure lite works with the latest bjs

Perfect! I'll wait for his change

Resolve scene-config.json: keep both scene226 (GS glTF) and master's scene266 (negative-scale-doublesided).

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

Copilot-Session: 5eb0861b-0990-4481-8a6c-5821044709eb
@bjsplat

bjsplat commented Jul 20, 2026

Copy link
Copy Markdown

📋 perf — Test Report

View full Playwright report

Build 20260720.7 · merge @ ca939c2

@bjsplat

bjsplat commented Jul 20, 2026

Copy link
Copy Markdown

📋 parity — Test Report

View full Playwright report

Build 20260720.7 · merge @ ca939c2

@deltakosh
deltakosh requested a review from RaananW July 30, 2026 14:04
# Conflicts:
#	lab/package.json
#	pnpm-lock.yaml
Copilot AI review requested due to automatic review settings July 31, 2026 10:08
@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

API Changes

API Extractor detected public API changes for @babylonjs/lite.

No removed public API lines were detected; this appears to be additive.

API Extractor diff
diff --git a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
index 25b23f0c..d5839cda 100644
--- a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md
+++ b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
@@ -3842,7 +3842,9 @@ export class PhysicsCharacterController {
     readonly onTriggerCollisionObservable: CharacterCollisionObservable;
     penetrationRecoverySpeed: number;
     setPosition(position: Vec3): void;
+    setShapeOptions(options: PhysicsCharacterControllerOptions, preserveFootPosition?: boolean): void;
     setVelocity(velocity: Vec3): void;
+    get shapeOptions(): PhysicsCharacterControllerOptions;
     staticFriction: number;
     up: Vec3;
 }

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Lite Playground - Static Site

Open deployed site

Build 20260731.25 - merge @ 2bbeeca

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

Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.

Suppressed comments (2)

packages/babylon-lite/src/loader-gltf/gltf-feature-gaussian-splatting.ts:136

  • readFloats(): CT_UNSIGNED_INT ignores the accessor's normalized flag (unlike other glTF strided readers in this repo), and the default switch case silently falls back to getFloat32 for unknown component types, which can mask bad input and corrupt splat data.
                case CT_UNSIGNED_INT:
                    value = dv.getUint32(off, true);
                    break;
                default:
                    value = dv.getFloat32(off, true);

tests/lite/parity/scenes/scene226-gs-gltf.spec.ts:20

  • REFERENCE_DIR hardcodes the slug (scene226-gs-gltf) even though captureGolden() resolves the golden directory from sceneConfig.slug. Deriving the reference directory from sceneConfig.slug avoids a silent mismatch if the slug ever changes.
const REFERENCE_DIR = path.resolve(__dirname, "../../../../reference/lite/scene226-gs-gltf");
const GOLDEN_REF = path.join(REFERENCE_DIR, "babylon-ref-golden.png");

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 1 — BoomBox PBR
scene1
89 KB 88 KB +1 KB
Scene 5 — Alien Skeleton
scene5
93 KB 92 KB +1 KB
Scene 31 — KHR_materials_emissive_strength
scene31
81 KB 80 KB +1 KB
Scene 32 — KHR_materials_unlit
scene32
81 KB 80 KB +1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
99 KB 98 KB +1 KB
Scene 35 — EXT_mesh_gpu_instancing
scene35
85 KB 84 KB +1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
98 KB 97 KB +1 KB
Scene 99 — Bone Control
scene99
93 KB 92 KB +1 KB
Scene 47 — Physics Heightfield
scene47
92 KB 91 KB +1 KB
Scene 104 — Physics Character Controller
scene104
102 KB 101 KB +1 KB
Scene 105 — Character Controller + Moving Platform
scene105
103 KB 102 KB +1 KB
Scene 158 — Additive Animation Blend
scene158
97 KB 96 KB +1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
97 KB 96 KB +1 KB
Scene 176 - MosquitoInAmber
scene176
105 KB 104 KB +1 KB
Scene 210 — XMP Metadata Cube
scene210
78 KB 77 KB +1 KB
Scene 212 - DispersionTest glTF
scene212
105 KB 104 KB +1 KB
Scene 229 — Triangle Without Indices
scene229
69 KB 68 KB +1 KB
Scene 240 — AnimatedTriangle
scene240
92 KB 91 KB +1 KB
Scene 245 — RecursiveSkeletons
scene245
103 KB 102 KB +1 KB
Scene 247 — TeapotsGalore
scene247
87 KB 86 KB +1 KB
Scene 248 — TextureSettingsTest
scene248
78 KB 77 KB +1 KB
Scene 253 — AnimateAllTheThings
scene253
155 KB 154 KB +1 KB
Scene 257 — Negative Node Scale
scene257
81 KB 80 KB +1 KB
Scene 258 — Interleaved UV
scene258
84 KB 83 KB +1 KB
Scene 260 — Triangle Strip
scene260
81 KB 80 KB +1 KB
Scene 265 — EnvironmentTest (EXT_lights_image_based)
scene265
81 KB 80 KB +1 KB
Scene 266 — Negative Scale (Double-Sided)
scene266
81 KB 80 KB +1 KB

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

@CedricGuillemet
CedricGuillemet marked this pull request as ready for review July 31, 2026 12:04
@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

API Changes

API Extractor detected public API changes for @babylonjs/lite.

No removed public API lines were detected; this appears to be additive.

API Extractor diff
diff --git a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
index 25b23f0c..d5839cda 100644
--- a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md
+++ b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
@@ -3842,7 +3842,9 @@ export class PhysicsCharacterController {
     readonly onTriggerCollisionObservable: CharacterCollisionObservable;
     penetrationRecoverySpeed: number;
     setPosition(position: Vec3): void;
+    setShapeOptions(options: PhysicsCharacterControllerOptions, preserveFootPosition?: boolean): void;
     setVelocity(velocity: Vec3): void;
+    get shapeOptions(): PhysicsCharacterControllerOptions;
     staticFriction: number;
     up: Vec3;
 }

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Lite Playground - Static Site

Open deployed site

Build 20260731.26 - merge @ 2bbeeca

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 1 — BoomBox PBR
scene1
89 KB 88 KB +1 KB
Scene 5 — Alien Skeleton
scene5
93 KB 92 KB +1 KB
Scene 31 — KHR_materials_emissive_strength
scene31
81 KB 80 KB +1 KB
Scene 32 — KHR_materials_unlit
scene32
81 KB 80 KB +1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
99 KB 98 KB +1 KB
Scene 35 — EXT_mesh_gpu_instancing
scene35
85 KB 84 KB +1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
98 KB 97 KB +1 KB
Scene 99 — Bone Control
scene99
93 KB 92 KB +1 KB
Scene 47 — Physics Heightfield
scene47
92 KB 91 KB +1 KB
Scene 104 — Physics Character Controller
scene104
102 KB 101 KB +1 KB
Scene 105 — Character Controller + Moving Platform
scene105
103 KB 102 KB +1 KB
Scene 158 — Additive Animation Blend
scene158
97 KB 96 KB +1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
97 KB 96 KB +1 KB
Scene 176 - MosquitoInAmber
scene176
105 KB 104 KB +1 KB
Scene 210 — XMP Metadata Cube
scene210
78 KB 77 KB +1 KB
Scene 212 - DispersionTest glTF
scene212
105 KB 104 KB +1 KB
Scene 229 — Triangle Without Indices
scene229
69 KB 68 KB +1 KB
Scene 240 — AnimatedTriangle
scene240
92 KB 91 KB +1 KB
Scene 245 — RecursiveSkeletons
scene245
103 KB 102 KB +1 KB
Scene 247 — TeapotsGalore
scene247
87 KB 86 KB +1 KB
Scene 248 — TextureSettingsTest
scene248
78 KB 77 KB +1 KB
Scene 253 — AnimateAllTheThings
scene253
155 KB 154 KB +1 KB
Scene 257 — Negative Node Scale
scene257
81 KB 80 KB +1 KB
Scene 258 — Interleaved UV
scene258
84 KB 83 KB +1 KB
Scene 260 — Triangle Strip
scene260
81 KB 80 KB +1 KB
Scene 265 — EnvironmentTest (EXT_lights_image_based)
scene265
81 KB 80 KB +1 KB
Scene 266 — Negative Scale (Double-Sided)
scene266
81 KB 80 KB +1 KB

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

@RaananW

RaananW commented Jul 31, 2026

Copy link
Copy Markdown
Member

reviewing now. a question unrelated to code review - have you investigated why so many scenes increase in 50-200 bytes? is it related to the version update?

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 1 — BoomBox PBR
scene1
89 KB 88 KB +1 KB
Scene 5 — Alien Skeleton
scene5
93 KB 92 KB +1 KB
Scene 31 — KHR_materials_emissive_strength
scene31
81 KB 80 KB +1 KB
Scene 32 — KHR_materials_unlit
scene32
81 KB 80 KB +1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
99 KB 98 KB +1 KB
Scene 35 — EXT_mesh_gpu_instancing
scene35
85 KB 84 KB +1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
98 KB 97 KB +1 KB
Scene 99 — Bone Control
scene99
93 KB 92 KB +1 KB
Scene 47 — Physics Heightfield
scene47
92 KB 91 KB +1 KB
Scene 104 — Physics Character Controller
scene104
102 KB 101 KB +1 KB
Scene 105 — Character Controller + Moving Platform
scene105
103 KB 102 KB +1 KB
Scene 158 — Additive Animation Blend
scene158
97 KB 96 KB +1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
97 KB 96 KB +1 KB
Scene 176 - MosquitoInAmber
scene176
105 KB 104 KB +1 KB
Scene 210 — XMP Metadata Cube
scene210
78 KB 77 KB +1 KB
Scene 212 - DispersionTest glTF
scene212
105 KB 104 KB +1 KB
Scene 229 — Triangle Without Indices
scene229
69 KB 68 KB +1 KB
Scene 240 — AnimatedTriangle
scene240
92 KB 91 KB +1 KB
Scene 245 — RecursiveSkeletons
scene245
103 KB 102 KB +1 KB
Scene 247 — TeapotsGalore
scene247
87 KB 86 KB +1 KB
Scene 248 — TextureSettingsTest
scene248
78 KB 77 KB +1 KB
Scene 253 — AnimateAllTheThings
scene253
155 KB 154 KB +1 KB
Scene 257 — Negative Node Scale
scene257
81 KB 80 KB +1 KB
Scene 258 — Interleaved UV
scene258
84 KB 83 KB +1 KB
Scene 260 — Triangle Strip
scene260
81 KB 80 KB +1 KB
Scene 265 — EnvironmentTest (EXT_lights_image_based)
scene265
81 KB 80 KB +1 KB
Scene 266 — Negative Scale (Double-Sided)
scene266
81 KB 80 KB +1 KB

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

Copilot AI review requested due to automatic review settings July 31, 2026 15:25
@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

API Changes

API Extractor detected public API changes for @babylonjs/lite.

No removed public API lines were detected; this appears to be additive.

API Extractor diff
diff --git a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
index 25b23f0c..d5839cda 100644
--- a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md
+++ b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
@@ -3842,7 +3842,9 @@ export class PhysicsCharacterController {
     readonly onTriggerCollisionObservable: CharacterCollisionObservable;
     penetrationRecoverySpeed: number;
     setPosition(position: Vec3): void;
+    setShapeOptions(options: PhysicsCharacterControllerOptions, preserveFootPosition?: boolean): void;
     setVelocity(velocity: Vec3): void;
+    get shapeOptions(): PhysicsCharacterControllerOptions;
     staticFriction: number;
     up: Vec3;
 }

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Lite Playground - Static Site

Open deployed site

Build 20260731.31 - merge @ ec9d978

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

Copilot reviewed 93 out of 94 changed files in this pull request and generated no new comments.

Suppressed comments (2)

scene-config.json:52

  • This PR raises multiple maxRawKB values. Those are bundle-size ceilings enforced by tests/lite/parity/bundle-size.spec.ts, and GUIDANCE.md explicitly calls out that ceilings must not be changed without explicit user approval. If these increases are intentional, please link the approval/context; otherwise, the preferred fix is to keep ceilings unchanged and reduce the runtime bytes.
    tests/lite/unit/character-controller-shape-options.test.ts:70
  • These assertions rely on exact IEEE-754 representations (e.g. 0.19999999999999996) and can be flaky across JS engines or small implementation changes. Prefer asymmetric matchers (expect.closeTo) for the computed Y position and capsule endpoints.

Copilot AI review requested due to automatic review settings July 31, 2026 15:44
@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 1 — BoomBox PBR
scene1
89 KB 88 KB +1 KB
Scene 5 — Alien Skeleton
scene5
93 KB 92 KB +1 KB
Scene 31 — KHR_materials_emissive_strength
scene31
81 KB 80 KB +1 KB
Scene 32 — KHR_materials_unlit
scene32
81 KB 80 KB +1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
99 KB 98 KB +1 KB
Scene 35 — EXT_mesh_gpu_instancing
scene35
85 KB 84 KB +1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
98 KB 97 KB +1 KB
Scene 99 — Bone Control
scene99
93 KB 92 KB +1 KB
Scene 47 — Physics Heightfield
scene47
92 KB 91 KB +1 KB
Scene 104 — Physics Character Controller
scene104
102 KB 101 KB +1 KB
Scene 105 — Character Controller + Moving Platform
scene105
103 KB 102 KB +1 KB
Scene 158 — Additive Animation Blend
scene158
97 KB 96 KB +1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
97 KB 96 KB +1 KB
Scene 176 - MosquitoInAmber
scene176
105 KB 104 KB +1 KB
Scene 210 — XMP Metadata Cube
scene210
78 KB 77 KB +1 KB
Scene 212 - DispersionTest glTF
scene212
105 KB 104 KB +1 KB
Scene 229 — Triangle Without Indices
scene229
69 KB 68 KB +1 KB
Scene 240 — AnimatedTriangle
scene240
92 KB 91 KB +1 KB
Scene 245 — RecursiveSkeletons
scene245
103 KB 102 KB +1 KB
Scene 247 — TeapotsGalore
scene247
87 KB 86 KB +1 KB
Scene 248 — TextureSettingsTest
scene248
78 KB 77 KB +1 KB
Scene 253 — AnimateAllTheThings
scene253
155 KB 154 KB +1 KB
Scene 257 — Negative Node Scale
scene257
81 KB 80 KB +1 KB
Scene 258 — Interleaved UV
scene258
84 KB 83 KB +1 KB
Scene 260 — Triangle Strip
scene260
81 KB 80 KB +1 KB
Scene 265 — EnvironmentTest (EXT_lights_image_based)
scene265
81 KB 80 KB +1 KB
Scene 266 — Negative Scale (Double-Sided)
scene266
81 KB 80 KB +1 KB

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

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

API Changes

API Extractor detected public API changes for @babylonjs/lite.

No removed public API lines were detected; this appears to be additive.

API Extractor diff
diff --git a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
index 25b23f0c..d5839cda 100644
--- a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md
+++ b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
@@ -3842,7 +3842,9 @@ export class PhysicsCharacterController {
     readonly onTriggerCollisionObservable: CharacterCollisionObservable;
     penetrationRecoverySpeed: number;
     setPosition(position: Vec3): void;
+    setShapeOptions(options: PhysicsCharacterControllerOptions, preserveFootPosition?: boolean): void;
     setVelocity(velocity: Vec3): void;
+    get shapeOptions(): PhysicsCharacterControllerOptions;
     staticFriction: number;
     up: Vec3;
 }

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Lite Playground - Static Site

Open deployed site

Build 20260731.33 - merge @ 8b24c6f

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

Copilot reviewed 93 out of 94 changed files in this pull request and generated no new comments.

Suppressed comments (2)

scene-config.json:52

  • This PR increases multiple maxRawKB ceilings. Per GUIDANCE.md:222, bundle-size ceilings must not be changed without explicit user approval; please revert these increases (or request approval with the before/after measured sizes and justification).
    packages/babylon-lite/src/loader-gltf/gltf-feature-gaussian-splatting.ts:136
  • readFloats doesn't honor accessor.normalized for UNSIGNED_INT (5125), and the default branch silently reads float32. This is inconsistent with other strided-accessor readers (e.g. gltf-ext-basisu.ts) and can produce incorrect splat attributes or hide unsupported component types.

@bjsplat

bjsplat commented Jul 31, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 1 — BoomBox PBR
scene1
89 KB 88 KB +1 KB
Scene 5 — Alien Skeleton
scene5
93 KB 92 KB +1 KB
Scene 31 — KHR_materials_emissive_strength
scene31
81 KB 80 KB +1 KB
Scene 32 — KHR_materials_unlit
scene32
81 KB 80 KB +1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
99 KB 98 KB +1 KB
Scene 35 — EXT_mesh_gpu_instancing
scene35
85 KB 84 KB +1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
98 KB 97 KB +1 KB
Scene 99 — Bone Control
scene99
93 KB 92 KB +1 KB
Scene 47 — Physics Heightfield
scene47
92 KB 91 KB +1 KB
Scene 104 — Physics Character Controller
scene104
102 KB 101 KB +1 KB
Scene 105 — Character Controller + Moving Platform
scene105
103 KB 102 KB +1 KB
Scene 158 — Additive Animation Blend
scene158
97 KB 96 KB +1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
97 KB 96 KB +1 KB
Scene 176 - MosquitoInAmber
scene176
105 KB 104 KB +1 KB
Scene 210 — XMP Metadata Cube
scene210
78 KB 77 KB +1 KB
Scene 212 - DispersionTest glTF
scene212
105 KB 104 KB +1 KB
Scene 229 — Triangle Without Indices
scene229
69 KB 68 KB +1 KB
Scene 240 — AnimatedTriangle
scene240
92 KB 91 KB +1 KB
Scene 245 — RecursiveSkeletons
scene245
103 KB 102 KB +1 KB
Scene 247 — TeapotsGalore
scene247
87 KB 86 KB +1 KB
Scene 248 — TextureSettingsTest
scene248
78 KB 77 KB +1 KB
Scene 253 — AnimateAllTheThings
scene253
155 KB 154 KB +1 KB
Scene 257 — Negative Node Scale
scene257
81 KB 80 KB +1 KB
Scene 258 — Interleaved UV
scene258
84 KB 83 KB +1 KB
Scene 260 — Triangle Strip
scene260
81 KB 80 KB +1 KB
Scene 265 — EnvironmentTest (EXT_lights_image_based)
scene265
81 KB 80 KB +1 KB
Scene 266 — Negative Scale (Double-Sided)
scene266
81 KB 80 KB +1 KB

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

RaananW and others added 2 commits August 3, 2026 17:47
Resolves conflicts in the generated per-scene bundle manifests by taking
master's values; manifests are regenerated afterwards so they reflect the
merged code.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rebuilt all scene bundles so the committed manifests reflect the merged
code (KHR_gaussian_splatting loader-feature registry entry + master's PBR
diffuse-IBL fix). No scene exceeds its configured maxRawKB ceiling.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 3, 2026 16:01

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

Copilot reviewed 82 out of 83 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

scene-config.json:51

  • This PR raises existing per-scene bundle-size ceilings (maxRawKB) in scene-config.json. GUIDANCE.md forbids changing bundle-size ceilings without explicit user approval (GUIDANCE.md:222). Please revert the ceiling changes (or get explicit approval and document the measured overage numbers in the PR).
    packages/babylon-lite/src/loader-gltf/gltf-feature-gaussian-splatting.ts:149
  • buildSplatBuffer assumes every GS primitive has a POSITION accessor (attrs["POSITION"]!). If an asset is malformed (or isGsPrimitive matches via attributes but POSITION is missing), this will crash with a non-obvious error. Please validate required attributes and throw a clear error before reading accessors.

Comment thread tests/lite/parity/scenes/scene226-gs-gltf.spec.ts
@bjsplat

bjsplat commented Aug 3, 2026

Copy link
Copy Markdown

API Changes

API Extractor detected public API changes for @babylonjs/lite.

No removed public API lines were detected; this appears to be additive.

API Extractor diff
diff --git a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
index d63f27c7..b0f75fc1 100644
--- a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md
+++ b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
@@ -3843,7 +3843,9 @@ export class PhysicsCharacterController {
     readonly onTriggerCollisionObservable: CharacterCollisionObservable;
     penetrationRecoverySpeed: number;
     setPosition(position: Vec3): void;
+    setShapeOptions(options: PhysicsCharacterControllerOptions, preserveFootPosition?: boolean): void;
     setVelocity(velocity: Vec3): void;
+    get shapeOptions(): PhysicsCharacterControllerOptions;
     staticFriction: number;
     up: Vec3;
 }

@bjsplat

bjsplat commented Aug 3, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 1 — BoomBox PBR
scene1
89 KB 88 KB +1 KB
Scene 5 — Alien Skeleton
scene5
93 KB 92 KB +1 KB
Scene 31 — KHR_materials_emissive_strength
scene31
81 KB 80 KB +1 KB
Scene 32 — KHR_materials_unlit
scene32
81 KB 80 KB +1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
99 KB 98 KB +1 KB
Scene 35 — EXT_mesh_gpu_instancing
scene35
85 KB 84 KB +1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
98 KB 97 KB +1 KB
Scene 99 — Bone Control
scene99
93 KB 92 KB +1 KB
Scene 47 — Physics Heightfield
scene47
92 KB 91 KB +1 KB
Scene 104 — Physics Character Controller
scene104
102 KB 101 KB +1 KB
Scene 105 — Character Controller + Moving Platform
scene105
103 KB 102 KB +1 KB
Scene 158 — Additive Animation Blend
scene158
97 KB 96 KB +1 KB
Scene 174 - Navigation Off-Mesh Connections
scene174
97 KB 96 KB +1 KB
Scene 176 - MosquitoInAmber
scene176
105 KB 104 KB +1 KB
Scene 210 — XMP Metadata Cube
scene210
78 KB 77 KB +1 KB
Scene 212 - DispersionTest glTF
scene212
105 KB 104 KB +1 KB
Scene 229 — Triangle Without Indices
scene229
69 KB 68 KB +1 KB
Scene 240 — AnimatedTriangle
scene240
92 KB 91 KB +1 KB
Scene 245 — RecursiveSkeletons
scene245
103 KB 102 KB +1 KB
Scene 247 — TeapotsGalore
scene247
87 KB 86 KB +1 KB
Scene 248 — TextureSettingsTest
scene248
78 KB 77 KB +1 KB
Scene 253 — AnimateAllTheThings
scene253
155 KB 154 KB +1 KB
Scene 257 — Negative Node Scale
scene257
81 KB 80 KB +1 KB
Scene 258 — Interleaved UV
scene258
84 KB 83 KB +1 KB
Scene 260 — Triangle Strip
scene260
81 KB 80 KB +1 KB
Scene 265 — EnvironmentTest (EXT_lights_image_based)
scene265
81 KB 80 KB +1 KB
Scene 266 — Negative Scale (Double-Sided)
scene266
81 KB 80 KB +1 KB

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

RaananW and others added 2 commits August 3, 2026 21:09
Resolves conflicts in the generated per-scene bundle manifests by taking
master's values; manifests are regenerated afterwards.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds the missing committed Babylon.js golden at
reference/lite/scene226-gs-gltf/babylon-ref-golden.png (force-added past the
reference/**/babylon-ref-*.png ignore rule, matching how every recent scene
commits its golden) so scene226 parity diffs against a stable baseline instead
of recapturing at runtime.

Also rebuilds all scene bundles so the committed manifests reflect the merged
code (KHR_gaussian_splatting registry entry + master's gsplat counting-sort and
readonly dirty-tracking changes). No scene exceeds its configured maxRawKB.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 3, 2026 19:21
@bjsplat

bjsplat commented Aug 3, 2026

Copy link
Copy Markdown

API Changes

API Extractor detected public API changes for @babylonjs/lite.

No removed public API lines were detected; this appears to be additive.

API Extractor diff
diff --git a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
index e2f917a7..70461da6 100644
--- a/home/vsts/work/1/s/test-results/api-report/target/temp/babylon-lite.api.md
+++ b/home/vsts/work/1/s/test-results/api-report/current/temp/babylon-lite.api.md
@@ -3843,7 +3843,9 @@ export class PhysicsCharacterController {
     readonly onTriggerCollisionObservable: CharacterCollisionObservable;
     penetrationRecoverySpeed: number;
     setPosition(position: Vec3): void;
+    setShapeOptions(options: PhysicsCharacterControllerOptions, preserveFootPosition?: boolean): void;
     setVelocity(velocity: Vec3): void;
+    get shapeOptions(): PhysicsCharacterControllerOptions;
     staticFriction: number;
     up: Vec3;
 }

@bjsplat

bjsplat commented Aug 3, 2026

Copy link
Copy Markdown

Lite Playground - Static Site

Open deployed site

Build 20260803.20 - merge @ 0916db3

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

Copilot reviewed 82 out of 84 changed files in this pull request and generated no new comments.

Suppressed comments (3)

packages/babylon-lite/src/loader-gltf/gltf-feature-gaussian-splatting.ts:133

  • readFloats() normalizes BYTE/SHORT/USHORT/UBYTE when accessor.normalized is set, but CT_UNSIGNED_INT (5125) currently ignores normalized. For strided GS attributes authored as normalized UNSIGNED_INT, this will produce incorrect values and diverge from the loader’s own readComponent() logic used elsewhere (e.g. BasisU path).
    scene-config.json:52
  • This PR raises multiple maxRawKB bundle-size ceilings. Per GUIDANCE.md, bundle-size ceilings must not be changed without explicit user approval (if exceeded, report the measured numbers and ask before raising). Please either (1) keep existing ceilings and reduce the added runtime bytes, or (2) get explicit approval for these ceiling bumps and document the measured overage that necessitates them.
    tests/lite/parity/scenes/scene226-gs-gltf.spec.ts:8
  • The header comment says the Babylon.js reference is captured “on-the-fly”, but captureGolden() actually reuses the committed golden when it exists (only recaptures when the golden is missing, force=true, or RECAPTURE_GOLDEN is set). Updating this avoids confusion about whether the parity baseline is stable/committed.

@bjsplat

bjsplat commented Aug 3, 2026

Copy link
Copy Markdown

Bundle Size Changes

Increases

Package Current Master Change
Scene 1 — BoomBox PBR
scene1
89 KB 88 KB +1 KB
Scene 5 — Alien Skeleton
scene5
93 KB 92 KB +1 KB
Scene 11 — Shark GLB
scene11
90 KB 89 KB +1 KB
Scene 31 — KHR_materials_emissive_strength
scene31
81 KB 80 KB +1 KB
Scene 32 — KHR_materials_unlit
scene32
81 KB 80 KB +1 KB
Scene 34 — KHR_node_visibility + KHR_animation_pointer
scene34
99 KB 98 KB +1 KB
Scene 35 — EXT_mesh_gpu_instancing
scene35
85 KB 84 KB +1 KB
Scene 37 — Sheen Wood Leather Sofa
scene37
98 KB 97 KB +1 KB
Scene 99 — Bone Control
scene99
93 KB 92 KB +1 KB
Scene 47 — Physics Heightfield
scene47
92 KB 91 KB +1 KB
Scene 104 — Physics Character Controller
scene104
102 KB 101 KB +1 KB
Scene 105 — Character Controller + Moving Platform
scene105
103 KB 102 KB +1 KB
Scene 158 — Additive Animation Blend
scene158
97 KB 96 KB +1 KB
Scene 176 - MosquitoInAmber
scene176
105 KB 104 KB +1 KB
Scene 210 — XMP Metadata Cube
scene210
78 KB 77 KB +1 KB
Scene 212 - DispersionTest glTF
scene212
105 KB 104 KB +1 KB
Scene 229 — Triangle Without Indices
scene229
69 KB 68 KB +1 KB
Scene 240 — AnimatedTriangle
scene240
92 KB 91 KB +1 KB
Scene 245 — RecursiveSkeletons
scene245
103 KB 102 KB +1 KB
Scene 247 — TeapotsGalore
scene247
87 KB 86 KB +1 KB
Scene 248 — TextureSettingsTest
scene248
78 KB 77 KB +1 KB
Scene 253 — AnimateAllTheThings
scene253
155 KB 154 KB +1 KB
Scene 257 — Negative Node Scale
scene257
81 KB 80 KB +1 KB
Scene 258 — Interleaved UV
scene258
84 KB 83 KB +1 KB
Scene 260 — Triangle Strip
scene260
81 KB 80 KB +1 KB
Scene 265 — EnvironmentTest (EXT_lights_image_based)
scene265
81 KB 80 KB +1 KB
Scene 266 — Negative Scale (Double-Sided)
scene266
81 KB 80 KB +1 KB

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

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.

5 participants