Thank you @Cedric , confirming the PR works.
For others who might be reading this, negative scaling does work with Gizmo. Here is a working solution:
- Copy transform of childMesh to gizmoMesh
- Sanitize gizmoMesh.scaling to only have positive values
- Store scaling state of the childMesh before attaching to gizmoMesh with
gizmoMesh.addChild(childMesh, true)
- Attach gizmoMesh to GizmoManager
GizmoManager.attachToMesh(gizmoMesh)
- Let gizmo do any transform as usual, except negative scaling (need to detach GizmoManager from gizmoMesh first, then apply negative scaling to the gizmoMesh directly)
- Release the childMesh with
gizmoMesh.removeChild(childMesh, true)
- Apply back stored scaling state of childMesh, along with gizmoMesh.scaling to get the final scaling state of the childMesh.