diff options
Diffstat (limited to 'drawing')
-rw-r--r-- | drawing/index.html | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drawing/index.html b/drawing/index.html new file mode 100644 index 0000000..2340823 --- /dev/null +++ b/drawing/index.html @@ -0,0 +1 @@ +<canvas id=v><script>d=document,d.body.style.margin=0,P="onpointer",c=v.getContext`2d`,v.width=innerWidth,v.height=innerHeight,c.lineWidth=2,f=0,d[P+"down"]=e=>{f=e.pointerId+1;e.preventDefault();c.beginPath();c.moveTo(e.x,e.y)};d[P+"move"]=e=>{f==e.pointerId+1&&c.lineTo(e.x,e.y);c.stroke()},d[P+"up"]=_=>f=0</script></canvas> |