+ 2
what does mean "ctx" in drawing shapes
the defined for ctx"
2 Réponses
+ 13
context
+ 10
canvas = document.getElementById("canvas");
ctx = canvas.getContext("2d");
So it usually is used to render the canvas in two dimensions, like in the example above or 3d using this code.
ctx = canvas.getContext("webgl");
Hope this helps ! *_*