Skip to content

Comments

Add shared anchor transform helper scaffold for placement refactor#309

Closed
tracygardner wants to merge 1 commit intomainfrom
codex/implement-geometry-transformation-for-meshes
Closed

Add shared anchor transform helper scaffold for placement refactor#309
tracygardner wants to merge 1 commit intomainfrom
codex/implement-geometry-transformation-for-meshes

Conversation

@tracygardner
Copy link
Contributor

Summary

  • add a new api/anchorTransform.js module to centralize anchor/pivot coordinate math
  • expose reusable helper methods:
    • getPivotSettings(mesh)
    • getLocalAnchorOffset(mesh, pivotSettings)
    • resolveWorldAnchor(mesh, pivotSettings)
    • setMeshByWorldAnchor(mesh, target, options)
  • wire the module into flock.js so helpers are available on the shared flock object and receive the flock reference

Why

This is the first incremental step of the single coherent refactor to move away from scattered manual offset calculations while preserving current behavior. It provides a canonical helper surface without changing existing transform callsites yet.

Notes

  • no behavior migration is included in this commit; this is a scaffold step only
  • existing repo lint issues remain outside this change and are unchanged

Codex Task

@tracygardner tracygardner deleted the codex/implement-geometry-transformation-for-meshes branch February 22, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant