<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>GSAP | 锤子前端</title><description>Now vibe coding, so learning hammer FE ?</description><link>https://channel.meo-ai.com</link><item><title>《CSS 与 JavaScript 动画性能之争》</title><link>https://channel.meo-ai.com/posts/648</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/648</guid><pubDate>Sat, 30 May 2026 00:02:44 GMT</pubDate><content:encoded>&lt;span class=&quot;post-title-source&quot;&gt;《CSS 与 JavaScript 动画性能之争》&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;标签：&lt;a href=&quot;/search/result?q=%23%E5%89%8D%E7%AB%AF&quot; title=&quot;#前端&quot;&gt;#前端&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23CSS%E5%8A%A8%E7%94%BB&quot; title=&quot;#CSS动画&quot;&gt;#CSS动画&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23JavaScript%E5%8A%A8%E7%94%BB&quot; title=&quot;#JavaScript动画&quot;&gt;#JavaScript动画&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23WebAnimationsAPI&quot; title=&quot;#WebAnimationsAPI&quot;&gt;#WebAnimationsAPI&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96&quot; title=&quot;#性能优化&quot;&gt;#性能优化&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23GSAP&quot; title=&quot;#GSAP&quot;&gt;#GSAP&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Motion&quot; title=&quot;#Motion&quot;&gt;#Motion&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;总结：&lt;br /&gt;本文通过交互式演示拆解了 CSS 与 JS 动画的性能差异真相：CSS Keyframes 和 Transitions 运行在独立线程，主线程阻塞时依然流畅；而传统 JS 动画（如 requestAnimationFrame 循环）与主线程争抢资源，容易卡顿。但 Motion 库通过底层调用 Web Animations API（WAAPI）绕过了这一限制，实现了与 CSS 同级别的流畅度。作者建议优先使用原生 CSS，遇到 CSS 无法覆盖的场景时选择 Motion 等 WAAPI 方案，而非直接上 &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt; 这类纯主线程库。&lt;br /&gt;&lt;br /&gt;文章要点：&lt;br /&gt;1. CSS 动画的核心优势不是&quot;计算快&quot;，而是运行在独立线程，主线程再忙也不影响动画流畅度&lt;br /&gt;2. 传统 JS 动画（requestAnimationFrame）每帧都在主线程计算，React 重渲染或 fetch 解析时容易掉帧&lt;br /&gt;3. Motion 库（原 Framer Motion）底层使用 Web Animations API，能接入与 CSS 相同的底层动画引擎，主线程阻塞时照样丝滑&lt;br /&gt;4. &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt; 功能极其强大，但坚持在主线程运行，是&quot;能力换性能&quot;的取舍，适合复杂序列动画而非简单过渡&lt;br /&gt;5. 现代 CSS 已经很能打，View Transitions、linear()、Animation Timeline 等新 API 大幅减少了必须上 JS 的场景&lt;br /&gt;6. 选型建议：能用 CSS 就不用库 → CSS 搞不定优先选 Motion/WAAPI → 只有复杂时间线控制才考虑 &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt;&lt;br /&gt;&lt;br /&gt;URL：&lt;a href=&quot;https://www.joshwcomeau.com/animation/css-vs-javascript/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://www.joshwcomeau.com/animation/css-vs-javascript/&quot;&gt;https://www.joshwcomeau.com/animation/css-vs-javascript/&lt;/a&gt;&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://joshwcomeau.com/animation/css-vs-javascript&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;There are a bunch of JavaScript animation libraries out there, and you might have wondered whether there’s a performance cost compared to traditional CSS transitions and keyframe animations. In this blog post, we’ll compare the same animation across several…&quot;&gt;
  
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;Joshwcomeau&lt;/div&gt;
  &lt;img class=&quot;link_preview_image&quot; alt=&quot;CSS vs. JavaScript • Josh W. Comeau&quot; src=&quot;/static/https://cdn4.telesco.pe/file/j6pHpHOiid85hW-PiHO5RbHQNhUfz8DCzWKspZ6INAOvz1cGOLiCr4icJdVWszb3YD9dLs05A3Hd7EFas5ZsW-R5_tDkwte5eHWsZo06if-Y-ojVVBb0HKR_g1VBbjGnA1nk7Kyp-2o2HK7w6SuzPySg8h20PO-8_JlOyaHI8ygvgqC0LS2hxasm1JN8YYC7N-QeaC7370uBuBtmrggiIKtw04s15QlT-AMhl02e04AH8vKNK16Cz7YPZjODUVKtBj5CVEz9ewIhA6qLKjtE9Rkz7wYZ4b2SmiUD1QH0shZkEmvzzws7oAszCWv_aKZ5rF4-0UBBxvgvcF1jYGDb7g.jpg&quot; width=&quot;1200&quot; height=&quot;630&quot; loading=&quot;eager&quot; /&gt;
  &lt;div class=&quot;link_preview_title&quot;&gt;CSS vs. JavaScript • Josh W. Comeau&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;There are a bunch of JavaScript animation libraries out there, and you might have wondered whether there’s a performance cost compared to traditional CSS transitions and keyframe animations. In this blog post, we’ll compare the same animation across several…&lt;/div&gt;
&lt;/a&gt;</content:encoded></item><item><title>《用 React、GSAP 和 AI 打造 Maxima Therapy 网站》</title><link>https://channel.meo-ai.com/posts/611</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/611</guid><pubDate>Sun, 26 Apr 2026 02:32:10 GMT</pubDate><content:encoded>&lt;span class=&quot;post-title-source&quot;&gt;《用 React、&lt;/span&gt;&lt;mark class=&quot;highlight&quot;&gt;&lt;span class=&quot;post-title-source&quot;&gt;GSAP&lt;/span&gt;&lt;/mark&gt;&lt;span class=&quot;post-title-source&quot;&gt; 和 AI 打造 Maxima Therapy 网站》&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;标签：&lt;a href=&quot;/search/result?q=%23%E5%89%8D%E7%AB%AF&quot; title=&quot;#前端&quot;&gt;#前端&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23React&quot; title=&quot;#React&quot;&gt;#React&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23GSAP&quot; title=&quot;#GSAP&quot;&gt;#GSAP&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23TailwindCSS&quot; title=&quot;#TailwindCSS&quot;&gt;#TailwindCSS&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23ReactRouter&quot; title=&quot;#ReactRouter&quot;&gt;#ReactRouter&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23AI%E8%BE%85%E5%8A%A9%E5%BC%80%E5%8F%91&quot; title=&quot;#AI辅助开发&quot;&gt;#AI辅助开发&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E5%88%9B%E6%84%8F%E7%BC%96%E7%A8%8B&quot; title=&quot;#创意编程&quot;&gt;#创意编程&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Lottie&quot; title=&quot;#Lottie&quot;&gt;#Lottie&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23MatterJS&quot; title=&quot;#MatterJS&quot;&gt;#MatterJS&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23ScrollTrigger&quot; title=&quot;#ScrollTrigger&quot;&gt;#ScrollTrigger&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;总结：&lt;br /&gt;&lt;br /&gt;本文是 Codrops 上的一篇案例复盘，记录了团队为神经多样性支持机构 Maxima Therapy 打造高互动、高插画风格网站的全过程。文章详细介绍了技术栈选型（Sanity + React Router + &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt; + TailwindCSS）、多个核心交互模块的实现思路（可拖拽轮播、SVG 水波纹、物理绳索、形状变形、贴纸动效），以及 AI（Claude Code）在实际开发中的辅助作用与局限。对于想在前端项目中融合创意动画与 AI 提效的开发者来说，这是一份非常接地气的实战参考。&lt;br /&gt;&lt;br /&gt;文章要点：&lt;br /&gt;&lt;br /&gt;- 技术栈选型很务实：团队选了 React Router（而非 Next.js）做静态生成，搭配 Sanity 做 CMS、Cloudflare Pages 托管，理由是配置更轻量；&lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt; + Lenis 负责动画和滚动平滑，TailwindCSS 负责样式，TypeScript 做类型检查&lt;br /&gt;- 首页轮播的交互设计很巧妙：把四个节目板块拆成四个旋转的 &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;，只有当前可见的板块才响应交互；切换时触发路由变化，但轮播组件通过布局隔离避免了不必要的重渲染&lt;br /&gt;- SVG 水波纹效果用 AI 辅助生成：Claude Code 帮忙把原始 SVG 路径转换成带 50 个控制点的系统，再结合 &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt; 实现鼠标触发的涟漪动画——AI 在创意编码这类&quot;繁琐但规则明确&quot;的任务上表现不错&lt;br /&gt;- Lottie 动画与 Canvas 背景混合：通过离屏 Canvas 绘制固定图案，再用 Lottie 的 Canvas 渲染模式做遮罩，最后用 &lt;code&gt;globalCompositeOperation&lt;/code&gt; 合成，实现了滚动联动的背景效果&lt;br /&gt;- 物理引擎让页面更有生命力：招聘页用 Matter.js 模拟&quot;supports&quot;单词被两根绳索悬挂的物理效果，绳索由复合体堆叠而成，SVG 文字根据物理模拟结果实时位移&lt;br /&gt;- AI 是&quot;得力助手&quot;但不是&quot;万能替身&quot;：Claude Code 在 SVG 优化、Sanity 数据模型扩展、TypeScript 类型生成上帮了大忙，但也会出现结果不一致、擅自改动数据获取模式、甚至&quot;幻觉&quot;出不存在 SVG 路径的情况；团队建议把 AI 用在范围明确的小任务上&lt;br /&gt;- ScrollTrigger 让滚动交互管理很轻松：配合 &lt;code&gt;useGSAP&lt;/code&gt; hook 自动清理，避免了手动写 Intersection Observer 的繁琐，实现了文字显现、图片揭示、SVG 播放等丰富的滚动动效&lt;br /&gt;&lt;br /&gt;文章URL：&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://tympanus.net/codrops/2026/04/06/building-the-maxima-therapy-website-react-gsap-and-dabbling-with-ai/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://tympanus.net/codrops/2026/04/06/building-the-maxima-therapy-website-react-gsap-and-dabbling-with-ai/&quot;&gt;https://tympanus.net/codrops/2026/04/06/building-the-maxima-therapy-website-react-gsap-and-dabbling-with-ai/&lt;/a&gt;&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://tympanus.net/codrops/2026/04/06/building-the-maxima-therapy-website-react-gsap-and-dabbling-with-ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;A behind-the-scenes look at how we built Maxima Therapy with playful interactions, creative code, and a little AI help along the way.&quot;&gt;
  &lt;i class=&quot;link_preview_right_image&quot; style=&quot;background-image:url(&apos;https://cdn4.telesco.pe/file/OSLXxNQNQbCaKK_WYdjWo3UjgGf4WWi3p-5CfnCy7GI0o1FD73UMf9jQ3VWXSWcUdyMHnJO_OS1yqITy3da1RJOSYIfQeJHrE6s9r50gAZYdWU1RVeDMYUZy3V-4xggyDG3xw0ZDyRc-rU-yTqMHXQju_1RpODiVwM4uPHC5UYZ7fRVe51cLHGS_UH_u5-Lmdp4TjI9aOuW5PvsNcDVn8gkUNq0mL5RLs85sd178uwfxO0OxFDzorvwEhCjaalLaBc54dgfJYl0BDM295uXUHJbzySWOEq0uDax3ceCIeW9lT5dkvmRZqDW8t7uITM8aQVPG1I1CpLMlaaguNK3UdQ.jpg&apos;)&quot;&gt;&lt;/i&gt;
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;Codrops&lt;/div&gt;
  
  &lt;div class=&quot;link_preview_title&quot;&gt;Building the Maxima Therapy Website: React, &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt;, and Dabbling with AI | Codrops&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;A behind-the-scenes look at how we built Maxima Therapy with playful interactions, creative code, and a little AI help along the way.&lt;/div&gt;
&lt;/a&gt;</content:encoded></item><item><title>#GSAP 用 GSAP 打造卷轴驱动的双波浪文本动画</title><link>https://channel.meo-ai.com/posts/545</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/545</guid><pubDate>Wed, 21 Jan 2026 08:26:09 GMT</pubDate><content:encoded>&lt;a href=&quot;/search/result?q=%23GSAP&quot; title=&quot;#GSAP&quot;&gt;#GSAP&lt;/a&gt; 用 &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt; 打造卷轴驱动的双波浪文本动画&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://tympanus.net/codrops/2026/01/15/building-a-scroll-driven-dual-wave-text-animation-with-gsap/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://tympanus.net/codrops/2026/01/15/building-a-scroll-driven-dual-wave-text-animation-with-gsap/&quot;&gt;https://tympanus.net/codrops/2026/01/15/building-a-scroll-driven-dual-wave-text-animation-with-gsap/&lt;/a&gt;&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://tympanus.net/codrops/2026/01/15/building-a-scroll-driven-dual-wave-text-animation-with-gsap&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;Learn how to create smooth, opposing wave text animations across dual columns with scroll-driven sine wave mathematics and synchronized image updates.&quot;&gt;
  
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;Codrops&lt;/div&gt;
  
  &lt;div class=&quot;link_preview_title&quot;&gt;Building a Scroll-Driven Dual-Wave Text Animation with &lt;mark class=&quot;highlight&quot;&gt;GSAP&lt;/mark&gt; | Codrops&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;Learn how to create smooth, opposing wave text animations across dual columns with scroll-driven sine wave mathematics and synchronized image updates.&lt;/div&gt;
&lt;/a&gt;</content:encoded></item></channel></rss>