-
-
Notifications
You must be signed in to change notification settings - Fork 423
Conversation
...tall and reload
Added links to Modly and Lightning Pixel on X for updates.
Added a sponsors section to acknowledge early supporters.
Added input path validation to prevent path traversal attacks.
Added autoCenter and resetToken props to MeshModel. Enhanced mesh centering logic and keyboard controls for gizmo modes.
You’ll need to resolve the conflicts on the PR
Edit:
And I added the new toolbar on the Generate page.
So instead of putting the buttons in the bar on the left side, you should use the second toolbar at the top.
I already added the transform buttons there. You’ll just need to adapt it
lightningpixel
commented
Jun 10, 2026
The pushed branch isn't in a working state, so I have to request changes.
Blocking issues
-
The branch doesn't run.
Viewer3D.tsxusesgizmoMode,setGizmoMode,applying,resetToken, andmeshObjectbut never declares them (nouseState), andTransformControlsis used without being imported from@react-three/drei. Running the app immediately
throwsUncaught ReferenceError: setGizmoMode is not defined, andnpm run buildfails type-checking. It looks like part of your wiring commit was lost before pushing — could you push the complete version you actually tested? -
api/routers/optimize.pycontains the entire module twice (paste/merge accident —router = APIRouterappears at lines 25 and 361, every endpoint is defined twice). The secondroutershadows the first, and since it's the old copy without/transform, the new
endpoint is never registered: every "Apply" call will 404. Please reduce the file to a single copy that includes/transform. -
Gizmo wiring is incomplete.
MeshModelPropsdeclaresonObjectbutMeshModelnever calls it, someshObjectwould staynulland the gizmo would never render.SceneMeshModelreadsautoCenterandresetTokenbut those props are never added to its signature nor
passed down. -
Out-of-scope changes — please remove these from the PR:
- The README "Sponsors" section and the X/Twitter links. Sponsor recognition is a maintainer decision; adding yourself there isn't something we can merge from a feature PR.
- The version bumps in
package.jsonandapi/main.py—devhas already moved to 0.3.6 independently, so this will conflict anyway.
Smaller things to fix in the same pass
- The
{stem}_xf.glboutput name means re-applying produces..._xf_xf.glb, and applying twice from the same base overwrites the file while keeping the same URL —useGLTF's cache will then show the stale mesh. A unique suffix (we already useuuidelsewhere) would avoid
both problems. /transformreimplements its path check inline — please reuse_resolve_input_pathlike/meshand/smoothdo.handleApplyTransformhas nocatch, so a backend failure is silent for the user.- The baked matrix includes the auto-centering offset applied on load, so "Apply" permanently moves the file's origin even for a pure rotation. If that's intentional ("bake what you see"), a comment explaining it would help.
- The W/E/R/Escape handler only guards against
HTMLInputElement/HTMLTextAreaElement— contenteditable elements would still trigger mode switches. useApi.tsuses tab indentation against the file's spaces, andimportMeshwas re-indented without changes — this will failnpm run lint.
Happy to re-review once the complete, building version is pushed. Thanks again for the contribution !
iammojogo-sudo
commented
Jun 10, 2026
The pushed branch isn't in a working state, so I have to request changes.
Blocking issues
1. **The branch doesn't run.** `Viewer3D.tsx` uses `gizmoMode`, `setGizmoMode`, `applying`, `resetToken`, and `meshObject` but never declares them (no `useState`), and `TransformControls` is used without being imported from `@react-three/drei`. Running the app immediately throws `Uncaught ReferenceError: setGizmoMode is not defined`, and `npm run build` fails type-checking. It looks like part of your wiring commit was lost before pushing — could you push the complete version you actually tested? 2. **`api/routers/optimize.py` contains the entire module twice** (paste/merge accident — `router = APIRouter` appears at lines 25 and 361, every endpoint is defined twice). The second `router` shadows the first, and since it's the old copy without `/transform`, the new endpoint is never registered: every "Apply" call will 404. Please reduce the file to a single copy that includes `/transform`. 3. **Gizmo wiring is incomplete.** `MeshModelProps` declares `onObject` but `MeshModel` never calls it, so `meshObject` would stay `null` and the gizmo would never render. `SceneMeshModel` reads `autoCenter` and `resetToken` but those props are never added to its signature nor passed down. 4. **Out-of-scope changes** — please remove these from the PR: * The README "Sponsors" section and the X/Twitter links. Sponsor recognition is a maintainer decision; adding yourself there isn't something we can merge from a feature PR. * The version bumps in `package.json` and `api/main.py` — `dev` has already moved to 0.3.6 independently, so this will conflict anyway.Smaller things to fix in the same pass
* The `{stem}_xf.glb` output name means re-applying produces `..._xf_xf.glb`, and applying twice from the same base overwrites the file while keeping the same URL — `useGLTF`'s cache will then show the stale mesh. A unique suffix (we already use `uuid` elsewhere) would avoid both problems. * `/transform` reimplements its path check inline — please reuse `_resolve_input_path` like `/mesh` and `/smooth` do. * `handleApplyTransform` has no `catch`, so a backend failure is silent for the user. * The baked matrix includes the auto-centering offset applied on load, so "Apply" permanently moves the file's origin even for a pure rotation. If that's intentional ("bake what you see"), a comment explaining it would help. * The W/E/R/Escape handler only guards against `HTMLInputElement`/`HTMLTextAreaElement` — contenteditable elements would still trigger mode switches. * `useApi.ts` uses tab indentation against the file's spaces, and `importMesh` was re-indented without changes — this will fail `npm run lint`.Happy to re-review once the complete, building version is pushed. Thanks again for the contribution !
Not a worry, thank you and Ill work on this today until its ready. Sorry for the extra work. I hope to reduce that soon.
You know what I think I did wrong, is I attached the main branch rather than the transform-gizmo branch? Because it worked great when I tested it before the initial PR.
modly_clone-transform_gizmo.zip, I have to clone the newest with the toolbar at the top that you made and move the files over there I assume? Would it be ok if I just give the changes from now one instead of having to do all of that because I dont feel comfortable with github at all. I dont like it. I am having a very tough time trying to understand what to do next and I don't want to bog down anyone else.
Closes #161
Adds a gizmo to move/rotate/scale the mesh in the viewport. Shows when the
mesh is selected, W/E/R to switch modes. Apply bakes it into the GLB so it
sticks on export, Reset reverts.
New /optimize/transform endpoint on the backend handles the bake.
Tested locally, works.