Skip to content

Remove GSplatComponent unified property support#243

Merged
willeastcott merged 2 commits into
mainfrom
remove-gsplat-unified-property
May 29, 2026
Merged

Remove GSplatComponent unified property support#243
willeastcott merged 2 commits into
mainfrom
remove-gsplat-unified-property

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

What

Removes all support for and references to the unified property of GSplatComponent from web-components.

  • src/components/splat-component.ts — drop the _unified field, the getInitialComponentData entry, the set/get unified accessors, the 'unified' observed attribute, and its attributeChangedCallback case.
  • examples/splat-flipbook.html — remove the now-redundant unified attribute from <pc-splat>, and replace scene.gsplat.material.setParameter('alphaClip', 0.1) with scene.gsplat.alphaClip = 0.1.

Why

The engine deprecated GSplatComponent.unified and made unified rendering the default (true) as of playcanvas v2.19.0 (#8802). Now that web-components is on 2.19.1, the <pc-splat> element no longer needs to expose the property.

In unified mode the component material getter returns null, so the flipbook example's old material.setParameter(...) call no longer works — it's been swapped for the new scene.gsplat.alphaClip setter, matching the engine's flipbook.example.mjs.

Reviewer notes

  • Requires playcanvas >= 2.19.0 (already pinned at 2.19.1 on main). On older versions the flipbook would render non-unified and fail to update between frames.
  • Verified with npm run lint and npm run build (clean; the pre-existing TS5107 moduleResolution deprecation warning is unrelated).

🤖 Generated with Claude Code

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>
@willeastcott willeastcott requested a review from Copilot May 29, 2026 20:32
@willeastcott willeastcott self-assigned this May 29, 2026
@willeastcott willeastcott added the enhancement New feature or request label May 29, 2026

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

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 unified attribute/property plumbing from SplatComponentElement (<pc-splat>).
  • Updated the flipbook example to drop the unified attribute and to set alpha clipping via scene.gsplat.alphaClip instead of gsplat.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.

Comment thread src/components/splat-component.ts
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>

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 3 out of 3 changed files in this pull request and generated no new comments.

@willeastcott willeastcott merged commit 2a6a1dd into main May 29, 2026
3 checks passed
@willeastcott willeastcott deleted the remove-gsplat-unified-property branch May 29, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants