X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=_tmp%2Fhexaboard_test.html;fp=hexaboard_test.html;h=86abc2e0a1317820fc0705acd8eb5b1b60c6125d;hp=800e1896cbe624fdc7f9bb31532a2ca12a927a48;hb=582df3497b0f91dd4b645386a059eac9e98da1bb;hpb=59d58d7da742c937bca80c2102c2e72cc7d6e840 diff --git a/hexaboard_test.html b/_tmp/hexaboard_test.html similarity index 76% rename from hexaboard_test.html rename to _tmp/hexaboard_test.html index 800e1896..86abc2e0 100644 --- a/hexaboard_test.html +++ b/_tmp/hexaboard_test.html @@ -37,13 +37,21 @@ for(var a=0;a<8;a++) { }} }} +let x=100, y=100, size=40; +ctx.beginPath(); +ctx.moveTo(x + size * Math.cos(0), y + size * Math.sin(0)); +for (let side=0; side < 7; side++) { + ctx.lineTo(x + size * Math.cos(side * 2 * Math.PI / 6), y + size * Math.sin(side * 2 * Math.PI / 6)); +} +ctx.fillStyle = "#333333"; +ctx.fill(); + var img = new Image(); img.onload = function() { ctx.drawImage(img, 0, 0, 60, 60); } img.src = "public/images/pieces/wb.svg"; -