regl-arc
š š¹ Draw circular arc with regl in the vertex shader
Install
npmĀ installĀ --saveĀ regl-arc
Usage
Draw a 2D circular arc given starting point p1, ending point p2, the center of the circle, the radius and a clockwise flag. Points (center, p1, p2) are expressed as an array of two numbers, i.e. [x, y] coordinates (see simplicial complex).
Parameters are passed as uniforms to the vertex shader.
An optional parameter could be passed to specify the length of the arc (default is 30).
Ā constĀ reglĀ =Ā constĀ arcĀ =Ā Ā
There is an example you can run with budo:
budoĀ draw-arc.test.jsĀ --openĀ --liveĀ --Ā -tĀ es2020