+ 2

what does mean "ctx" in drawing shapes

the defined for ctx"

4th Apr 2017, 5:58 PM
trad
2 Réponses
+ 13
context
4th Apr 2017, 5:59 PM
Tashi N
Tashi N - avatar
+ 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 ! *_*
4th Apr 2017, 8:26 PM
Gami
Gami - avatar