Skip to content

Remove unused hasStartPose field and fix TypeScript warning#837

Merged
slimbuck merged 4 commits intoplaycanvas:mainfrom
slimbuck:pose-dev
Mar 13, 2026
Merged

Remove unused hasStartPose field and fix TypeScript warning#837
slimbuck merged 4 commits intoplaycanvas:mainfrom
slimbuck:pose-dev

Conversation

@slimbuck
Copy link
Member

Summary

  • Remove the redundant hasStartPose field from ExperienceSettings and its usage in the export and publish dialogs. The presence of entries in the cameras array already indicates a start pose, making the separate boolean unnecessary.
  • Add explicit type annotation to the result array in file-handler.ts to resolve TS7034/TS7005 build warnings about implicit any[] type.

Changed Files

  • src/splat-serialize.ts — remove hasStartPose from ExperienceSettings type
  • src/ui/export-popup.ts — inline camera pose check, remove hasStartPose from settings
  • src/ui/publish-settings-dialog.ts — same cleanup as export popup
  • src/file-handler.ts — add (Splat | undefined)[] type annotation to result

@slimbuck slimbuck requested review from a team and Copilot March 13, 2026 11:49
@slimbuck slimbuck self-assigned this Mar 13, 2026
@slimbuck slimbuck added the bug Something isn't working label Mar 13, 2026
Copy link
Contributor

Copilot AI left a comment

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 simplifies viewer/publish experience settings by removing the redundant hasStartPose flag (since cameras being non-empty already implies a start pose) and fixes a TypeScript implicit-any[] warning in the file import pipeline.

Changes:

  • Remove hasStartPose from ExperienceSettings and stop emitting it from export/publish flows.
  • Inline the “has start pose” check by deriving cameras directly from the current camera pose.
  • Add an explicit (Splat | undefined)[] type annotation to the result array in importFiles to address TS7034/TS7005 warnings.

Reviewed changes

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

File Description
src/splat-serialize.ts Removes hasStartPose from the exported ExperienceSettings type.
src/ui/export-popup.ts Stops computing/persisting hasStartPose; derives cameras from current pose.
src/ui/publish-settings-dialog.ts Same cleanup as export popup for publish settings assembly.
src/file-handler.ts Adds an explicit type annotation for the result array to resolve TS warnings.

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

@slimbuck slimbuck merged commit 5eb4e72 into playcanvas:main Mar 13, 2026
2 checks passed
@slimbuck slimbuck deleted the pose-dev branch March 13, 2026 11:57
stechdrive pushed a commit to stechdrive/supersplat-cameraframes that referenced this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants