Skip to content

Upgrade viewer export format to v2 with per-pose FOV and loop mode#831

Merged
slimbuck merged 2 commits intoplaycanvas:mainfrom
slimbuck:publish-dev
Mar 10, 2026
Merged

Upgrade viewer export format to v2 with per-pose FOV and loop mode#831
slimbuck merged 2 commits intoplaycanvas:mainfrom
slimbuck:publish-dev

Conversation

@slimbuck
Copy link
Member

Summary

  • Upgrade ExperienceSettings to version 2, adding support for cameras, annotations, post-effect settings, tonemapping, and start mode configuration
  • Add per-pose FOV: each camera keyframe now stores and interpolates its own field of view, computed from camera intrinsics when loading pose files
  • Add loop mode selector (none/repeat/ping pong) to export and publish dialogs, replacing the animation dropdown
  • Refactor fly-mode look rotation into Camera.look(), fixing camera drift during tween convergence by pinning the camera position until the azim/elev tween completes
  • Use fixed-size camera pose gizmos instead of scaling relative to scene bounds
  • Change publish success link to point to the scene edit page
  • Add missing loop-mode translations for all 9 locales

Details

The viewer export format is restructured around a cameras array with CameraPose objects (position, target, fov) and a startMode field instead of the previous camera.startAnim/camera.animTrack approach. Animation tracks now include per-keyframe FOV values in the spline interpolation (7 values per keyframe instead of 6). The "Start Position" selector and per-splat export selector have been removed in favor of always using the current viewport and exporting all splats.

The fly-mode camera look was moved from PointerController into Camera.look() with a new lookCameraPos field that holds the camera position fixed while the azim/elev tween smoothly converges, preventing visible drift.

@slimbuck slimbuck requested review from a team and Copilot March 10, 2026 18:38
@slimbuck slimbuck self-assigned this Mar 10, 2026
@slimbuck slimbuck added the enhancement New feature label Mar 10, 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 upgrades the viewer export/publish settings format to v2, adding per-pose FOV support and a new loop-mode selector while refactoring camera fly-look behavior to reduce drift.

Changes:

  • Introduces ExperienceSettings v2 fields (cameras array, startMode, post effects, tonemapping, etc.) and updates export/publish dialogs accordingly.
  • Adds per-pose FOV to camera pose loading/serialization and includes FOV in spline keyframe interpolation.
  • Replaces the export/publish animation dropdown with an animation toggle + loop-mode selector; updates camera fly-look implementation and pose gizmo sizing.

Reviewed changes

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

Show a summary per file
File Description
static/locales/en.json Adds loop-mode strings for export UI.
static/locales/de.json Adds loop-mode strings for export UI.
static/locales/es.json Adds loop-mode strings for export UI.
static/locales/fr.json Adds loop-mode strings for export UI.
static/locales/ja.json Adds loop-mode strings for export UI.
static/locales/ko.json Adds loop-mode strings for export UI.
static/locales/pt-BR.json Adds loop-mode strings for export UI.
static/locales/ru.json Adds loop-mode strings for export UI.
static/locales/zh-CN.json Adds loop-mode strings for export UI.
src/ui/scss/settings-dialog.scss Adjusts dialog header styling and boolean alignment.
src/ui/scss/export-popup.scss Aligns boolean toggle styling in export popup.
src/ui/publish-settings-dialog.ts Updates publish settings UI/serialization to ExperienceSettings v2 and loop mode selection.
src/ui/export-popup.ts Updates viewer export settings to ExperienceSettings v2 and loop mode selection; removes per-splat selection.
src/splat-serialize.ts Defines v2 settings types (cameras, annotations, post effects) and expands anim keyframes to include FOV.
src/splat-overlay.ts Updates overlay primitive count update handling on sorter updates.
src/publish.ts Changes publish success link target to scene edit page.
src/file-handler.ts Computes per-pose FOV from intrinsics when loading pose files.
src/editor.ts Extends camera pose get/set to include optional FOV.
src/doc.ts Passes document camera FOV into pose deserialization path.
src/controllers.ts Delegates fly-look rotation to Camera.look().
src/camera.ts Adds Camera.look() and pins camera position during fly-look tween convergence.
src/camera-poses.ts Adds per-pose FOV to pose data model and spline interpolation/serialization.
src/camera-pose-gizmos.ts Uses fixed-size camera pose gizmos.

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

@slimbuck
Copy link
Member Author

Addressed Copilot feedback:

  1. fov optional on Pose — Made fov?: number on the Pose type since addPose already defensively fills a default via ??=.

  2. Duplicated defaultPostEffectSettings — Extracted to splat-serialize.ts alongside the PostEffectSettings type. Both export-popup.ts and publish-settings-dialog.ts now import it from there.

  3. listed: false hardcoded — This is intentional; the listed field is being deprecated on the platform side.

@slimbuck slimbuck merged commit 12e65fd into playcanvas:main Mar 10, 2026
2 checks passed
@slimbuck slimbuck deleted the publish-dev branch March 10, 2026 18:52
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

enhancement New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants