Remove GSplatComponent unified property support#243
Merged
Conversation
The engine deprecated `GSplatComponent.unified` and made unified
rendering the default (true) as of playcanvas v2.19.0 (#8802). With
web-components now on 2.19.1, the `<pc-splat>` element no longer needs
to expose the property.
- Drop all `unified` support from SplatComponentElement (field,
initial component data, accessors, observed attribute, handler).
- Remove the `unified` attribute from the flipbook example and replace
the old `scene.gsplat.material.setParameter('alphaClip', 0.1)` (the
material getter returns null in unified mode) with the new
`scene.gsplat.alphaClip = 0.1` API, matching the engine example.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes support for the deprecated GSplatComponent.unified property from the <pc-splat> web component and updates the GSplat flipbook example to use the newer unified-mode API, aligning web-components with PlayCanvas engine behavior in v2.19.x.
Changes:
- Removed the
unifiedattribute/property plumbing fromSplatComponentElement(<pc-splat>). - Updated the flipbook example to drop the
unifiedattribute and to set alpha clipping viascene.gsplat.alphaClipinstead ofgsplat.material.setParameter(...).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/splat-component.ts | Removes the unified backing field, accessors, initial component data, and attribute observation/handling. |
| examples/splat-flipbook.html | Updates the example to match unified-mode behavior and removes the redundant unified attribute. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Unified rendering became the default in playcanvas v2.19.0 (#8802). Now that the `unified` property is removed, the component requires that contract, so raise the peer dependency floor to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
What
Removes all support for and references to the
unifiedproperty ofGSplatComponentfrom web-components.src/components/splat-component.ts— drop the_unifiedfield, thegetInitialComponentDataentry, theset/get unifiedaccessors, the'unified'observed attribute, and itsattributeChangedCallbackcase.examples/splat-flipbook.html— remove the now-redundantunifiedattribute from<pc-splat>, and replacescene.gsplat.material.setParameter('alphaClip', 0.1)withscene.gsplat.alphaClip = 0.1.Why
The engine deprecated
GSplatComponent.unifiedand made unified rendering the default (true) as of playcanvas v2.19.0 (#8802). Now that web-components is on2.19.1, the<pc-splat>element no longer needs to expose the property.In unified mode the component
materialgetter returnsnull, so the flipbook example's oldmaterial.setParameter(...)call no longer works — it's been swapped for the newscene.gsplat.alphaClipsetter, matching the engine'sflipbook.example.mjs.Reviewer notes
main). On older versions the flipbook would render non-unified and fail to update between frames.npm run lintandnpm run build(clean; the pre-existing TS5107 moduleResolution deprecation warning is unrelated).🤖 Generated with Claude Code