fix(gsplat): unified-mode follow-ups (orbit-camera AABB, internal warnings)#8803
Merged
Conversation
…nings) Follow-up cleanups to #8802 (flip of GSplatComponent#unified default to true). Addresses spurious deprecation warnings raised by engine-internal code, and updates the bundled orbit-camera script to be unified-aware. - GSplatComponent: route internal mesh-instance probes through the private _instance field instead of the deprecated public instance getter (set castShadows, addToLayers, removeFromLayers). - GSplatComponent: silence the spurious Debug.errorOnce in onLayerAdded / onLayerRemoved. These are engine-driven event handlers subscribed to the layer composition's add/remove events — not user-facing APIs — so they now silently no-op in unified mode. - scripts/camera/orbit-camera.js: _buildAabb now collects AABBs for unified gsplats via gsplat.customAabb transformed by the entity's world matrix, so unified gsplats contribute to the orbit camera's focus AABB instead of being silently skipped. - examples/.../global-sorting.example.mjs: now that the orbit camera correctly builds an AABB for unified gsplats, the prior framing (which incidentally relied on an empty AABB at origin) needed an explicit pivot — switched to resetAndLookAtPoint targeting the statue's world-space centre.
mvaligursky
added a commit
that referenced
this pull request
May 28, 2026
Follow-up cleanup to the unified-default flip (#8802, #8803, #8804). Unified rendering is now the default and the unified property is @deprecated/@ignore, so the public API docs and examples shouldn't be framed around "unified mode" any more — it's just gsplat rendering. Engine source: - GSplatComponent: remove the "## Unified Rendering" section from the class JSDoc; strip the JSDoc blocks from material get/set and highQualitySH get/set (both are legacy-only and only documented the unified/non-unified distinction). Drop "unified" qualifiers from workBufferUpdate, workBufferModifier, setParameter, and getInstanceTexture JSDocs. - GSplatComponentSystem: drop "in unified mode" from the material:created and frame:ready event JSDocs, and from the getMaterial JSDoc. - GSplatParams: rename "Parameters for GSplat unified system" to "Parameters for the GSplat system"; drop "unified" qualifier from dataFormat, material, and format JSDocs. - GSplatContainer: drop "non-unified rendering" from the class example comment, drop unified: true from the addComponent example, drop "unified" qualifier from the centers JSDoc. Examples (gaussian-splatting folder): - Remove unified: true from every addComponent('gsplat', { ... }) call (~40 occurrences across 29 files) — it's now the default and the property is deprecated. - Reword/remove comments that mention "unified" framing now that it's just the standard path (e.g. "Create hotel gsplat with unified set to true" → "Create hotel gsplat"). - Drop three stale orbit-pivot comments ("unified gsplats have no mesh AABB for focusEntity framing") — these became factually incorrect once #8803 made orbit-camera unified-aware. - Update global-sorting example header from "demonstrates unified gsplat rendering" to "demonstrates global gsplat sorting" to reflect what the example actually shows. Remaining "unified" mentions in the engine are all either internal (private fields, code comments, code branches), runtime warning strings (which must keep the property name), @ignore'd JSDoc, or directory names — none render in public docs. Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
mvaligursky
added a commit
that referenced
this pull request
May 28, 2026
Follow-up cleanup to the unified-default flip (#8802, #8803, #8804). Unified rendering is now the default and the unified property is @deprecated/@ignore, so the public API docs and examples shouldn't be framed around "unified mode" any more — it's just gsplat rendering. Engine source: - GSplatComponent: remove the "## Unified Rendering" section from the class JSDoc; strip the JSDoc blocks from material get/set and highQualitySH get/set (both are legacy-only and only documented the unified/non-unified distinction). Drop "unified" qualifiers from workBufferUpdate, workBufferModifier, setParameter, and getInstanceTexture JSDocs. - GSplatComponentSystem: drop "in unified mode" from the material:created and frame:ready event JSDocs, and from the getMaterial JSDoc. - GSplatParams: rename "Parameters for GSplat unified system" to "Parameters for the GSplat system"; drop "unified" qualifier from dataFormat, material, and format JSDocs. - GSplatContainer: drop "non-unified rendering" from the class example comment, drop unified: true from the addComponent example, drop "unified" qualifier from the centers JSDoc. Examples (gaussian-splatting folder): - Remove unified: true from every addComponent('gsplat', { ... }) call (~40 occurrences across 29 files) — it's now the default and the property is deprecated. - Reword/remove comments that mention "unified" framing now that it's just the standard path (e.g. "Create hotel gsplat with unified set to true" → "Create hotel gsplat"). - Drop three stale orbit-pivot comments ("unified gsplats have no mesh AABB for focusEntity framing") — these became factually incorrect once #8803 made orbit-camera unified-aware. - Update global-sorting example header from "demonstrates unified gsplat rendering" to "demonstrates global gsplat sorting" to reflect what the example actually shows. Remaining "unified" mentions in the engine are all either internal (private fields, code comments, code branches), runtime warning strings (which must keep the property name), @ignore'd JSDoc, or directory names — none render in public docs. Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
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.
Follow-up cleanups to #8802 (flip of
GSplatComponent#unifieddefault totrue). Addresses spurious deprecation warnings raised by engine-internal code, and updates the bundled orbit-camera script to be unified-aware.Changes:
GSplatComponent: route internal mesh-instance probes through the private_instancefield instead of the deprecated publicinstancegetter (avoids spurious warnings fromset castShadows,addToLayers,removeFromLayers).GSplatComponent: silence the spuriousDebug.errorOnceinonLayerAdded/onLayerRemoved. These are engine-driven event handlers (subscribed to the layer composition'sadd/removeevents) — not user-facing APIs — so they now silently no-op in unified mode. The portal example was triggering them on every portal crossing viareorderLayersForSwap.scripts/camera/orbit-camera.js:_buildAabbnow collects AABBs for unified gsplats viagsplat.customAabbtransformed by the entity's world matrix (BoundingBox.setFromTransformedAabb), so unified gsplats contribute to the orbit camera's focus AABB instead of being silently skipped.examples/.../global-sorting.example.mjs: now that the orbit camera correctly builds an AABB for unified gsplats, the prior framing (which incidentally relied on an empty AABB at origin) needed an explicit pivot — switched toresetAndLookAtPointtargeting the statue's world-space centre.API Changes:
Examples:
gaussian-splatting/global-sorting.example.mjsto pivot the orbit camera on the statue (matches the visual intent of the scene now that the orbit camera honours unified gsplat bounds).