kopia lustrzana https://github.com/miguelvaca/vk3cpu
rodzic
8f6eb1a1ae
commit
3f52e67f8d
|
@ -295,7 +295,8 @@
|
|||
}
|
||||
|
||||
function drawInductor(ctx, x, y, angle) {
|
||||
const l1 = 15.0;
|
||||
const l1 = 12.0;
|
||||
/*
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x + l1*Math.cos(angle-0.25*Math.PI), y + l1*Math.sin(angle-0.25*Math.PI));
|
||||
ctx.lineTo(x + l1*Math.cos(angle+0.25*Math.PI), y + l1*Math.sin(angle+0.25*Math.PI));
|
||||
|
@ -303,6 +304,18 @@
|
|||
ctx.lineTo(x + l1*Math.cos(angle+1.25*Math.PI), y + l1*Math.sin(angle+1.25*Math.PI));
|
||||
ctx.lineTo(x + l1*Math.cos(angle-0.25*Math.PI), y + l1*Math.sin(angle-0.25*Math.PI));
|
||||
ctx.stroke();
|
||||
*/
|
||||
ctx.clearRect(x-l1,y-l1,2*l1,2*l1);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x , y - l1);
|
||||
ctx.arcTo(x + l1, y - l1, x + l1, y - 0.33 * l1, 0.5*l1);
|
||||
ctx.arcTo(x + l1, y + 0.33 * l1, x, y + 0.33 * l1, 0.5*l1);
|
||||
ctx.arcTo(x - l1, y + 0.33 * l1, x - l1, y, 0.25*l1);
|
||||
ctx.arcTo(x - l1, y - 0.33 * l1, x , y - 0.33 * l1, 0.25*l1);
|
||||
ctx.arcTo(x + l1, y - 0.33 * l1, x + l1, y + 0.33 * l1, 0.5*l1);
|
||||
ctx.arcTo(x + l1, y + l1, x, y + l1, 0.5*l1);
|
||||
ctx.lineTo(x, y + l1);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
function drawArrow(ctx, x, y, angle) {
|
||||
|
|
Ładowanie…
Reference in New Issue