原文
| ||||||||||
| ||||||||||
![]() |
原始链接: https://news.ycombinator.com/item?id=43410988
Konva.js,一个用于React、Vue和Svelte的声明式2D画布库,正在Hacker News上引起关注。一位用户sebdufbeau分享了他们在Angular项目中使用Konva的积极体验,强调了它在画布编程方面的易学性。他们遇到了一个性能问题,因为默认情况下所有形状都监听鼠标事件,但通过切换到一种选择加入的方法解决了这个问题。其他评论者称赞Konva网站和文档设计精良,并注意到了不同寻常的“价格”链接。几位用户也表达了对其在他们项目中潜在用途的兴趣。总的来说,评论表明Konva.js是一个很有前景且用户友好的基于画布的应用程序工具。
| ||||||||||
| ||||||||||
![]() |
We're working on performance-sensitive project, so one lesson we learned is that all shapes listen to all mouse events by default. We didn't even have lots of shapes, but this was enough to have a noticeable performance hit due to all the event handlers being registered. We pivoted to an opt-in approach instead and that fixed most of our problems.
reply