cursor tracking on 3D CSS surfaces 👨🍳
inverse projection mappin' to calculate proximity in 3D space and apply an eased 0-1 value 🤙
the key: measuring the 4 corners, check the reveal 👇
(ideal for 2D canvas w/ 3D transforms)
JavaScript Tip ⭐️
Avoid setTimeout when dealing with element animations ⚠️
Use Element.getAnimations() and tap into the animation lifecycle instead of guessing 🙏 Great for unmount animations in React, etc.
Let your CSS be the source of truth 🥇
keypad w/ CSS + <img> layers 🧑🍳
.key { mask: url(keycap.png); }
.key:active img { translate: 0 20%; }
use keycap images as a mask for the container that they translate in ✨
bonus: clip-path to clip the hit area + filter to style the keys 🤙
whoa. I just found a way to properly infer recursive types in z.object() — no casting, no z.lazy(), no scopes/registries, no special syntax.
i've been trying to do this for literally years
React Native 0.79 is now available!
This release includes several performance improvements. Metro is now >3x faster to cold start! Android apps will also be faster thanks to changes to JS bundle compression.
https://t.co/tNrnPcnSGi
in JavaScript, `globalThis` is `window` in the browser, and `global` in Node.js
this is useful for library code if you need to attach a value to the global object