planechase

This commit is contained in:
Kyle
2021-03-06 17:54:07 -08:00
parent eacfd24a43
commit 755a075dde
16 changed files with 13 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -58,9 +58,10 @@ async function resetCardIrregularities({canvas = [1500, 2100, 0, 0], resetOthers
card.margins = false; card.margins = false;
//rotation //rotation
if (card.landscape) { if (card.landscape) {
previewContext.scale(5/7, 7/5); // previewContext.scale(card.width/card.height, card.height/card.width);
previewContext.rotate(Math.PI / 2); // previewContext.rotate(Math.PI / 2);
previewContext.translate(0, -card.width / 2); // previewContext.translate(0, -card.width / 2);
previewContext.setTransform(1, 0, 0, 1, 0, 0);
card.landscape = false; card.landscape = false;
} }
//card size //card size

View File

@@ -1,18 +1,24 @@
//defines available frames //defines available frames
availableFrames = [ availableFrames = [
{name:'Planechase Frame', src:'/img/frames/planechase/planechaseFrame.png'} {name:'Planar Frame (1)', src:'/img/frames/planechase/tallest.png'},
{name:'Planar Frame (2)', src:'/img/frames/planechase/taller.png'},
{name:'Planar Frame (3)', src:'/img/frames/planechase/tall.png'},
{name:'Planar Frame (4)', src:'/img/frames/planechase/short.png'},
{name:'Planar Frame (5)', src:'/img/frames/planechase/shorter.png'},
{name:'Planar Frame (6)', src:'/img/frames/planechase/shortest.png'}
]; ];
//disables/enables the "Load Frame Version" button //disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false; document.querySelector('#loadFrameVersion').disabled = false;
//defines process for loading this version, if applicable //defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = async function() { document.querySelector('#loadFrameVersion').onclick = async function() {
//resets things so that every frame doesn't have to //resets things so that every frame doesn't have to
await resetCardIrregularities({canvas:[2100, 1500, 0, 0]}); var previousCardHeight = card.height
await resetCardIrregularities({canvas:[3000, 2100, 0, 0]});
//sets card version //sets card version
card.version = 'planechase'; card.version = 'planechase';
//rotation //rotation
card.landscape = true; card.landscape = true;
previewContext.translate(0, card.width / 2); previewContext.translate(0, previousCardHeight / 2);
previewContext.rotate(-Math.PI / 2); previewContext.rotate(-Math.PI / 2);
previewContext.scale(7/5, 5/7); previewContext.scale(7/5, 5/7);
//art bounds //art bounds