HTML5硬件中的canvas元素加速了吗? [英] Is canvas element in html5 hardware accelerated?
问题描述
我对web开发很陌生,实际上我正在考虑潜入html和js来开发游戏。
所以,在做任何事之前,我需要知道html5中的canvas元素是否是硬件加速的。如果不是,那么我需要使用像webgl的东西?我不知道是否重要,但我使用的浏览器是firefox(也许它在不同的浏览器之间)
这可能看起来很愚蠢,但这是一个重要的问题,特别是在游戏中,你有一大堆2d的精灵在四处画。
提前致谢!HTML5 Canvas是硬件加速的,但它需要一个硬件加速浏览器。如果你使用chrome,你可以通过转到 chrome:// gpu /
来查看。如何看起来:
相同:
I'm pretty new to web development, in fact I'm thinking of diving into html and js for game developing.
So, before doing anything, I need to know whether or not the "canvas" element in html5 is hardware accelerated. If it's not, then I would need to use something like webgl? I don't know if it matters, but the browser I'm using is firefox(maybe it varies between browsers)
It might seem stupid, but it's an important question, specially since in games you have a bunch of 2d sprites being drawed all around. Thanks in advance!
Yes HTML5 Canvas is hardware accelerated but it require a Hardware Accelerated Browser. If you use chrome you can check this out by going to chrome://gpu/
Here is an example on how it looks:
A few articles on the same:
这篇关于HTML5硬件中的canvas元素加速了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!