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
perf: optimize logo animation and fix Safari rendering issues
PlatonicLogo:
- Cache size-dependent style strings (translate/rotate/stagger) by
solidIndex:size, eliminating ~80 toFixed() allocations per render
- Precompute active face indices at module load
- Move face transitions to inline styles, only active during morphs —
prevents Safari from re-evaluating transition timing each rAF frame
- Snap projected slot U-vector to nearest face edge, fixing in-plane
tilt on cube faces
- Per-face depth bias (0.01px outward push) breaks z-degeneracy for
edge-on faces without backface-visibility:hidden
- Clear resumeTimerRef on unmount, mark pointermove passive
CelebrationEffect:
- Bake trail translate positions into keyframe stops instead of
animating via @Property --trail-progress (Safari doesn't reliably
animate registered custom properties in translate calc expressions)
- Quadratic ease-out arc sampled at 8 stops for natural deceleration
- Reduce particle text-shadow to single 10px layer
- Use window.innerWidth/Height instead of getBoundingClientRect
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,5 +52,5 @@ Before editing anything that touches styled-components APIs (`createTheme`, `The
52
52
- OKLCH hue 0° is pink/magenta, not red. Warmer = higher hue toward orange. Read `logoPalette.ts` for the offset that places red at step 0.
53
53
-`mix-blend-mode` and `filter` on children of `preserve-3d` elements flattens 3D. Use alpha in background colors or `color-mix` instead.
54
54
- Blog posts are assembled dynamically from MDX files at build time by `utils/blog.server.ts`. No JSON index to maintain — just create the MDX file with `export const meta`.
55
-
-`PlatonicLogo.tsx` faces must NOT use `backface-visibility: hidden`. Per-face axis-angle interpolation during morph transitions can briefly flip a face normal and cull mid-animation. `transform-style: preserve-3d` z-sorts back faces naturally.
55
+
-`PlatonicLogo.tsx` faces must NOT use `backface-visibility: hidden`. Per-face axis-angle interpolation during morph transitions can briefly flip a face normal and cull mid-animation. `transform-style: preserve-3d` z-sorts back faces naturally. Per-face depth bias (tiny outward push along each face's normal) breaks z-degeneracy for edge-on faces without culling.
56
56
-`CelebrationEffect.tsx` particles are `React.memo`'d; `onAnimationEnd` is a stable `useCallback` that reads `fwId`/`particleId` from `data-*` attributes. Don't close over IDs in per-item arrow functions — it defeats memoization on the particle list.
0 commit comments