Answer the question
In order to leave comments, you need to log in
Should I use WebGl for 2d graphics?
I want to make small mini toys on canvas 2d, I started looking for plugins for better development and now I got to webGL. Do you think it's worth using it if I'm only dealing with 2d? If not, then maybe there are more suitable analogues of the genus 2d?
Answer the question
In order to leave comments, you need to log in
if the deal i will only have with 2d
WebGL increases performance, this is its only plus.
And the actual disadvantages - at the moment there is no good api, no effects.
Not all browsers support it, and those that do do
so, as always, in different ways. One is 60fps and the other is 30fps. You need to have
knowledge of raster rendering, and this will take a lot of time.
Context2d is definitely simpler and more convenient, the only advantage of WebGL is good rendering speed, i.e. on WebGL resources will eat less.
But a significant disadvantage of WebGL is complexity. WebGL is much more complex than regular context.
Look at
1. The webgl-2d library, it's a standard 2D context API on WebGL.
2. Libraries with WebGL rendering, at the moment I know Pixi.js, in easeljs there was something like that. May appear in Graphics2D.js.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question