You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
refactor: extract usePathtracingMesh hook and optimize Zustand selectors (#865)
* refactor: extract usePathtracingMesh hook and optimize Zustand selectors
- Create usePathtracingMesh hook to encapsulate pathtracing mesh conversion
logic, eliminating ~40 lines of duplicate code from 6 geometry components
- Refactor Particles, Bonds, Arrow, Box, Plane, Shape to use the new hook
- Fix type error in Bonds.tsx (hoverMeshRef was Mesh instead of InstancedMesh)
- Optimize Zustand store access by using individual selectors instead of
object destructuring to prevent unnecessary re-renders
- Improve convertInstancedMesh utility with better bounding box computation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* use larger array if needed
* something finally working
* fix: add missing effect dependencies and cleanup unused imports
- Add updateMergedMesh to useEffect dependencies in all geometry components
- Memoize fullData in Cell.tsx for consistency with other components
- Remove unused BufferGeometryUtils import from convertInstancedMesh.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* address comments
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
0 commit comments