Skip to content

Implementation of a render image dialog #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 24, 2025

Conversation

simonbethke
Copy link
Contributor

@simonbethke simonbethke commented Apr 17, 2025

I created a simple image export dialog with the goal, to support larger resolutions than the viewport of my browser. By doing that, I found that I could/should include more settings that have been copied from the video-export code.

Screenshot 2025-04-22 at 16 01 13

@simonbethke
Copy link
Contributor Author

The alignment of the dialog items is still bad, but I am not sure what your best practice is.
I am not sure if the old quick screenshot should still exist. The Render Menu could have two different render image items. Also the quick image could have a distinct shortcut.

@simonbethke simonbethke changed the title Implmentation of an image export dialog Implementation of a render image dialog Apr 17, 2025
@slimbuck slimbuck requested review from a team and Copilot April 22, 2025 14:55
@slimbuck slimbuck self-assigned this Apr 22, 2025
@slimbuck slimbuck added the enhancement New feature label Apr 22, 2025
Copy link

@Copilot 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 introduces an image export dialog to enable rendering images at resolutions larger than the viewport while reusing parts of the video export settings.

  • Updates the menu to trigger the new image settings dialog.
  • Adds a new ImageSettingsDialog component with associated localization strings.
  • Integrates the image settings dialog into the editor and updates the render logic to process the provided image settings.

Reviewed Changes

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

Show a summary per file
File Description
src/ui/menu.ts Updated the onSelect handler to invoke the image settings dialog.
src/ui/localization.ts Added new localization keys for the image settings dialog and render menu.
src/ui/image-settings-dialog.ts Introduces the UI component for image export settings.
src/ui/editor.ts Integrates the image settings dialog and its event handling.
src/render.ts Updates the render.image event to use offscreen rendering based on custom image settings.
src/editor.ts Adds an event to expose the scene's targetSize for the image settings dialog.
Files not reviewed (2)
  • src/ui/scss/settings-dialog.scss: Language not supported
  • submodules/supersplat-viewer: Language not supported
Comments suppressed due to low confidence (2)

src/ui/image-settings-dialog.ts:107

  • [nitpick] Since this dialog is specifically for image settings, consider using image-specific localization keys (e.g., 'image.cancel' and 'image.ok') for the dialog actions to avoid potential confusion.
text: localize('render.cancel')

src/render.ts:47

  • [nitpick] Consider renaming 'postRender' to 'waitForPostRender' to reflect that it awaits the completion of the render event, thereby improving code clarity.
const postRender = () => {

@slimbuck slimbuck merged commit 85cc129 into playcanvas:main Apr 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants