梅森效应 – 基于粒子的文本变形库(现已支持 Svelte)
1 分•作者: fe-hyunsu•7 个月前
我一直在尝试基于粒子的文本渲染,最终构建了一个小型库,可以将文本平滑地转换为粒子。
它现在支持原生 JavaScript、React、Vue 以及最近的 Svelte。
渲染管线使用 Canvas 2D 而非 WebGL,以保持轻量级。我最近添加了自动调整大小和多行支持,以便更好地处理动态布局。
如果你正在探索创意文本效果或构建着陆页,欢迎试用——我很乐意听取反馈、性能方面的建议,或者任何我应该测试的边缘情况。
演示:https://masoneffect.com
npm:https://www.npmjs.com/package/masoneffect
GitHub:https://github.com/fe-hyunsu/masoneffect
如果你觉得它有用,在 GitHub 上点个星会很有帮助!
查看原文
I've been experimenting with particle-based text rendering and ended up building a small library that morphs text into particles with smooth transitions.
It now works with Vanilla JS, React, Vue, and recently Svelte.<p>The rendering pipeline uses Canvas 2D instead of WebGL to stay lightweight, and I recently added auto-resizing and multiline support to better handle dynamic layouts.<p>If you're exploring creative text effects or building landing pages, feel free to give it a try — I'd love to hear feedback, performance ideas, or any edge cases I should test.<p>Demo: https://masoneffect.com<p>npm: https://www.npmjs.com/package/masoneffect<p>GitHub: https://github.com/fe-hyunsu/masoneffect<p>If you find it useful, a GitHub star would mean a lot!