Skip to content

Fix/mesh transform plus export - #364

Open
iammojogo-sudo wants to merge 3 commits into
lightningpixel:devfrom
iammojogo-sudo:fix/mesh-transform-plus-export
Open

iammojogo-sudo wants to merge 3 commits into
lightningpixel:devfrom
iammojogo-sudo:fix/mesh-transform-plus-export

Conversation

@iammojogo-sudo

Copy link
Copy Markdown
Contributor

Summary

Keep the mesh transform gizmo usable after a drag and make the Export menu save the mesh as it currently appears in the viewer, including its transforms.

Changes

  • Prevent the mesh from being deselected when a gizmo drag ends, so the user can continue translating, rotating, or scaling it.
  • Add a reset-transform control for the selected mesh.
  • Export the live mesh with its current world transform in GLB, OBJ, STL, and PLY formats.
  • Use the mesh’s original materials for export so viewer display modes do not replace them in the exported file.
  • Leave point-light behavior unchanged.

Testing

  • Manually tested the gizmo and transformed exports in Modly.
  • The automated build could not complete in this environment because esbuild was denied access to a directory above the project. The TypeScript check reported unrelated asset-library and workflow errors, with no diagnostics in the changed files.

Files changed

  • src/areas/generate/GeneratePage.tsx
  • src/areas/generate/components/Viewer3D.tsx
test_original test_move-rotate-scale-combined test_move-rotate-scale-combined-glb-SAT test_move-rotate-scale-combined-obj-SAT test_move-rotate-scale-combined-stl-SAT test_move-rotate-scale-combined-ply-SAT

GeneratePage.tsx: wire the reset control and download transformed meshes from the Export menu.
Viewer3D.tsx: keep mesh selection through gizmo release, reset transforms, and export the live mesh as GLB, OBJ, STL, or PLY.
@iammojogo-sudo

Copy link
Copy Markdown
Contributor Author

Images are 1: original in Modly, 2: modified transforms in Modly, and then all four file types tested SAT for export with transforms in place.

@iammojogo-sudo

Copy link
Copy Markdown
Contributor Author

I also re-included the reset button as well as fixed the gizmo disappearing when mouse release not over mesh.

@iammojogo-sudo
iammojogo-sudo changed the base branch from main to dev October 2, 2026 17:07
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.

1 participant