HTML5 canvas 是否能够像 Flash 一样丰富复杂的游戏?
另外,由于 HTML 之类的标准需要很长时间才能出来,HTML5 中的 虽然在规范中可能不会被替换,但是否会经常更新以便它能够像 Flash 在其各种迭代中所做的那样变得越来越好?
换句话说,十年后我们可能会有 但今天的画布不会是五年后的画布,除了名义上?
Also, since it takes so long for a standard to come out for things like HTML, is it possible that the <canvas>
in HTML5, though it may not be replaced in specs, will be updated often in the browser so that it can get better and better like Flash did/does in its various iterations?
In other words, we may have <canvas>
ten years from now but the canvas of today will not be the canvas of five years from now, except in name?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简短的回答是,目前以及在可预见的将来,不会。
首先,您需要意识到我们在这里讨论的不仅仅是 HTML5。动画、游戏逻辑、2D/3D 引擎等也需要 Javascript。尽管 Actionscript 性能很差,但与 那个相比,Javascript 性能却很糟糕。此外,Flash拥有成熟且发达的IDE和一套绘图工具,可以创建复杂的矢量图形和动画。据我所知,
不存在这样的东西。
至于规格部分,同样是不可能的。 Adobe 控制 Flash 的 IDE、语言规范和客户端播放器。这基本上意味着他们可以用它做任何他们想做的事。如果您不喜欢任何更改,请不要购买/使用他们的产品。这意味着他们可以按照他们认为合适的任何方向开发产品,并且开发速度是 W3C 永远无法比拟的。
另一方面,HTML 则非常不同。 W3C 必须与主要浏览器供应商坐下来,并听取网络开发人员和最终用户的意见。尽管
和
等华而不实、有趣的功能是每个 Web 开发人员的愿望清单中的首要内容,但向后兼容性对于规范来说也非常重要。这就是规范开发如此缓慢的原因之一——规范不仅仅取决于 W3C 的推出——还取决于浏览器供应商采用规范、Web 开发人员使用这些功能以及最终用户升级浏览器。 HTML5 不会改变这一切,那么您为什么期望开发速度会加快呢?
The short answer is, currently, and in the foreseeable future, no.
First, you need to realize that it's not just HTML5 we're talking about here. Javascript is also needed for the animation, game logic, 2D/3D engine, etc. And although Actionscript performance is very poor, Javascript performance is abysmal compared to that. In addition, Flash has a mature and developed IDE and a set of drawing tools that allow the creation of complex vector graphics and animation. No such things exist for
<canvas>
as far as I'm aware of.As for the specifications part, again, impossible. Adobe controls the IDE, the language specifications and the client-side player for Flash. This basically means that they can do whatever they want with it. If you don't like any of the changes, don't buy/use their product. This means that they can develop their product in whatever direction they see fit, and at a pace the W3C will never be able to match.
HTML on the other hand, is very different. The W3C has to sit down with the major browser vendors, as well as listen to the web developers and end users. And even though flashy, interesting features like
<audio>
and<canvas>
are at the top of every web developer's wishlist, backwards compatibility is also incredibly important to the specifications. This is one of the reason why development on the specifications is so slow - the specifications do not just depend on the W3C rolling out them out - it's also browser vendors adopting the specs, web developers using the features, and end users upgrading their browsers. None of that is going to change with HTML5, so why do you expect the speed of development to pick up?不。
如果您必须在 Flash 上使用画布,那么非常值得查看 Grant Skinner 使用 Create.js 套件所做的工作 - Easel.js 是对 Flash 显示模型(容器、参数等)进行建模或近似的很好的尝试),并且使用一个像样的 JS IDE(嗯)你可以得到一些好东西,但如果你是一个 Flash 开发人员,这种体验往往是相当令人沮丧的,就像回到十年前,用 JavaScript 编写复杂的程序?准备好承受一些严重的疼痛吧。
就纯粹的性能而言,canvas 已经取得了长足的进步,但您仍然需要使用 JS 进行编码,您缺少 Flash IDE,它可以缩短开发时间。希望,如果我们真的不得不采用 Flash 的这种大混乱,Adobe Edge 会帮助解决这个问题。
此外,HTML5 声音支持也很糟糕。同样,Grant Skinner 和 Audio.JS 可以消除很多痛苦,但与显示一样,HTML5 中根本不存在大部分 Flash 功能集,而且还没有办法近似它们,正如 Yi Jiang 所言指出(您可以安全地忽略其他答案)任何重大变化都需要很长时间才能实现!
No.
If you have to use canvas over Flash, it's well worth checking out what Grant Skinner's done with the Create.js suite - Easel.js is a very good attempt to model, or approximate, the Flash display model (containers, parameters etc), and with a decent JS IDE (hmmm) you can get some good stuff going, but if you're a Flash developer the experience is often quite depressing, it's like going back ten years, and writing complex programs in JavaScript? Get ready for some serious pain.
In sheer performance, canvas has come on a long way, but you still have to code in JS, you're missing the Flash IDE which shaves weeks off development. Hopefully, if we really have to adopt this big mess over Flash, Adobe Edge will help with this.
Also, HTML5 sound support is pathetic. Again, Grant Skinner and Audio.JS can take a lot of the pain out, but as with display, large chunks of the flash feature set simply do not exist in HTML5, and there is no way to approximate them yet, and as Yi Jiang points out (you can safely disregard the other answer) any significant changes take a long time to come about!