TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

OCanvas – an object-based canvas drawing library

34 点作者 hakim大约 14 年前

6 条评论

woogley大约 14 年前
Interesting, but it feels like a re-implementation of SVG. What is the advantage of this over something like RaphaelJS[1], where the SVG/VML objects are actual DOM objects already?<p>[1]: <a href="http://raphaeljs.com/" rel="nofollow">http://raphaeljs.com/</a>
nekoZonbi大约 14 年前
Recently, I have been examining various 2D html APIs. I find the oCanvas API to be excellent.<p>In comparison with Raphael, I find that both libraries are good and useful.<p>In computer graphics, there are two main approaches for 2D: vector and bitmap. Each one has their situations where it is the most convenient. Raphael is SVG based, vector graphics. oCanvas is html canvas based, bitmap graphics. So each one will have situations where it is the most convenient.<p>For example, scalable graphics, made of solid lines and shapes, are better suited with the vector approach. While diffuse images and image processing is better suited with the bitmap approach.<p>oCanvas employs object literals to accede to the various graphic operations. I find that makes the code more readable and thus easier to maintain, than the Raphael API, which makes use of plain function parameters for that.<p>Some differences that I found: Raphael have support for paths, vector fonts, and premade charts, which oCanvas doesn’t have.<p>On the other hand, oCanvas have support for animated sprites, scenes and timeline/game loop.
DanielRibeiro大约 14 年前
EaselJS is much easier to write it. <a href="http://easeljs.com/" rel="nofollow">http://easeljs.com/</a><p>And with real classes, and real methods. O canvas seems like the graphics class alone: <a href="http://easeljs.com/docs/Graphics.html" rel="nofollow">http://easeljs.com/docs/Graphics.html</a>
zyang大约 14 年前
Similar to EaselJS, <a href="http://easeljs.com/" rel="nofollow">http://easeljs.com/</a>
fomojola大约 14 年前
Looks nice, but as the first comment says: seems to recreate what RaphaelJS does.<p>And, the demo site fails utterly on IE7: the documentation website says nothing about browser compatibility.
评论 #2373599 未加载
评论 #2373129 未加载
noduerme大约 14 年前
Actually it's very similar to StrikeDisplay (posted a while back, but I don't think anyone saw it): <a href="http://news.ycombinator.com/item?id=1816482" rel="nofollow">http://news.ycombinator.com/item?id=1816482</a> <a href="http://strikedisplay.blogspot.com" rel="nofollow">http://strikedisplay.blogspot.com</a><p>SD tries to handle things like child objects dispatching events up the display chain and implementing an AS3-style pseudolanguage...