MasonEffect – 基于粒子的文本变形库(现已支持 Svelte)
我一直在尝试基于粒子的文本渲染,最终构建了一个小型库,可以将文本转换为粒子,并实现平滑过渡。现在它支持原生 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!