Skip to content

Add high-resolution PNG export for the 3D soundscape canvas#23

Draft
danieleguido with Copilot wants to merge 5 commits into
masterfrom
copilot/add-download-hi-quality-image
Draft

Add high-resolution PNG export for the 3D soundscape canvas#23
danieleguido with Copilot wants to merge 5 commits into
masterfrom
copilot/add-download-hi-quality-image

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown

This adds a downloadable high-quality image export for the 3D soundscape preview. The new export path renders the active Three.js scene off-screen at print-friendly resolution instead of reusing the visible canvas buffer.

  • UI surface

    • Adds a downloadHighQualityImage action to the existing fullscreen preview controls alongside package and GLB export.
  • Preview export state

    • Captures the live preview canvas, renderer, scene, and camera from the React Three Fiber canvas.
    • Stores those references centrally so export can use the current camera position and scene state without rebuilding the preview separately.
  • High-resolution render path

    • Introduces a dedicated canvas export utility that:
      • scales output from screen size to a higher DPI target,
      • renders the current Three.js scene into an off-screen WebGL canvas,
      • preserves renderer color/tone/shadow settings,
      • downloads the result as PNG.
  • Output fidelity

    • Applies the preview container background color to the exported image so the PNG matches the fullscreen presentation more closely, rather than exporting a transparent canvas by default.
  • Cleanup behavior

    • Clears preview export references on unmount.
    • Defers blob URL revocation to avoid racing browser download initiation.
await exportHighQualityCanvas({
  sourceCanvas: previewCanvas,
  renderer: previewRenderer,
  scene: previewScene,
  camera: previewCamera,
  fileName: `${baseName}.png`,
})

@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for soundscape-maker ready!

Name Link
🔨 Latest commit 22bad59
🔍 Latest deploy log https://app.netlify.com/projects/soundscape-maker/deploys/6a2bc6ed7374900008184df3
😎 Deploy Preview https://deploy-preview-23--soundscape-maker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI linked an issue Jun 12, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add download high quality image from 3D canvas Add high-resolution PNG export for the 3D soundscape canvas Jun 12, 2026
Copilot AI requested a review from danieleguido June 12, 2026 08:44
@danieleguido
danieleguido requested a review from memerchik June 12, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add download hi quality image from the 3D canvas

2 participants