inventions + gridlines

This commit is contained in:
Kyle
2021-08-04 16:03:41 -07:00
parent 01b7d2f744
commit de50dc285c
6 changed files with 28 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1812,6 +1812,31 @@ function drawNewGuidelines() {
} }
guidelinesContext.fillStyle = 'red'; guidelinesContext.fillStyle = 'red';
guidelinesContext.fillRect(setSymbolX, setSymbolY, setSymbolWidth, setSymbolHeight); guidelinesContext.fillRect(setSymbolX, setSymbolY, setSymbolWidth, setSymbolHeight);
// grid
guidelinesContext.globalAlpha = 1;
guidelinesContext.beginPath();
guidelinesContext.strokeStyle = 'gray';
guidelinesContext.lineWidth = 1;
const boxPadding = 25;
for (var x = 0; x <= card.width; x += boxPadding) {
guidelinesContext.moveTo(x, 0);
guidelinesContext.lineTo(x, card.height);
}
for (var y = 0; y <= card.height; y += boxPadding) {
guidelinesContext.moveTo(0, y);
guidelinesContext.lineTo(card.width, y);
}
guidelinesContext.stroke();
//center lines
guidelinesContext.beginPath();
guidelinesContext.strokeStyle = 'black';
guidelinesContext.lineWidth = 3;
guidelinesContext.moveTo(card.width / 2, 0);
guidelinesContext.lineTo(card.width / 2, card.height);
guidelinesContext.moveTo(0, card.height / 2);
guidelinesContext.lineTo(card.width, card.height / 2);
guidelinesContext.stroke();
//draw to card
drawCard(); drawCard();
} }
//Various loaders //Various loaders

View File

@@ -6,7 +6,9 @@ availableFrames = [
{name:'Invention Frame', src:'/img/frames/m15/invention/inventionFrameA.png', masks:masks}, {name:'Invention Frame', src:'/img/frames/m15/invention/inventionFrameA.png', masks:masks},
{name:'Invention Power/Toughness', src:'/img/frames/m15/invention/inventionPT.png', bounds:bounds}, {name:'Invention Power/Toughness', src:'/img/frames/m15/invention/inventionPT.png', bounds:bounds},
{name:'Silver Frame', src:'/img/frames/m15/invention/a.png', masks:masks}, {name:'Silver Frame', src:'/img/frames/m15/invention/a.png', masks:masks},
{name:'Silver Power/Toughness', src:'/img/frames/m15/invention/apt.png', bounds:bounds} {name:'Silver Power/Toughness', src:'/img/frames/m15/invention/apt.png', bounds:bounds},
{name:'Phyrexian Frame', src:'/img/frames/m15/invention/phyrexian.png', masks:masks},
{name:'Phyrexian Power/Toughness', src:'/img/frames/m15/invention/phyrexianPT.png', bounds:bounds}
]; ];
//disables/enables the "Load Frame Version" button //disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false; document.querySelector('#loadFrameVersion').disabled = false;