开发者

Primitive Shapes Library in HTML Canvas

开发者 https://www.devze.com 2023-03-08 14:26 出处:网络
Are there any libraries out there that provide some limited functionality for primitive shapes. I tried getting my feet wet with EaselJS and although it has some amazing properties, basic shapes is no

Are there any libraries out there that provide some limited functionality for primitive shapes. I tried getting my feet wet with EaselJS and although it has some amazing properties, basic shapes is not one of them. Tests for inside a shape are carried out by pixel testing which is incredibly slow compared to for example ray testing.

I imagine the rectangle and the circle gets used the most, and I can create collision detection for the two of them, but things get more complicated with polygons. Are there any libraries out there for this? I know JQuery has one, but it seems like it is f开发者_运维百科or HTML elements and not the canvas


You might want to take a look at CAKE or processingjs. I'm not sure if these are particuarly suited to your needs, but they seem the most developed library's for canvas at the moment.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号