This commit is contained in:
Kyle
2021-06-22 20:26:53 -07:00
parent 6c5b86af69
commit 0924f7a4fd
21 changed files with 88 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="1500" height="2100" viewBox="0 0 1500 2100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<rect id="Card" x="0" y="0" width="1500" height="2100" style="fill:none;"/>
<g id="Card1" serif:id="Card">
<path id="Artspace" d="M86,1837.71C68.822,1814.64 60.493,1784.83 60,1765L60,85C62.855,71.038 71.263,62.781 85,60L1415,60C1428.74,62.781 1437.14,71.038 1440,85L1440,1765C1439.53,1783.79 1432.03,1811.55 1416.62,1834.04C1416.9,1830.18 1417.02,1826.17 1417,1822L1417,1822C1417.12,1797.32 1412.13,1778.18 1400,1761.36L1400,1674.64C1412.13,1657.82 1417.13,1638.68 1417,1614L1417,1614C1417.12,1589.32 1412.13,1570.18 1400,1553.36L1400,1476.64C1412.13,1459.82 1417.13,1440.68 1417,1416L1417,1416C1417.12,1391.32 1412.13,1372.18 1400,1355.36L1400,1308.21C1411.64,1294.83 1421.59,1270.28 1422,1242C1421.59,1213.72 1411.64,1189.17 1400,1175.79L1400,227.213C1411.64,213.828 1421.59,189.276 1422,161C1421.52,127.948 1408,99.984 1394,89L106,89C91.996,99.984 78.481,127.948 78,161C78.412,189.278 88.364,213.833 100,227.213L100,1175.79C88.362,1189.17 78.412,1213.72 78,1242C78.412,1270.28 88.362,1294.83 100,1308.21L100,1541L86,1541L86,1684.72L100,1684.72L100,1755L86,1755L86,1837.71ZM1399.75,1761.02L1399.79,1761.08L1399.69,1760.93L1399.75,1761.02ZM1399.5,1760.68L1399.55,1760.74L1399.38,1760.51L1399.5,1760.68ZM1399.28,1760.37C1399.23,1760.31 1399.18,1760.25 1399.14,1760.19C1399.09,1760.12 1399.05,1760.06 1399,1760L1399.28,1760.37ZM1399.51,1675.32L1399.38,1675.49L1399.55,1675.26L1399.51,1675.32ZM1399.75,1674.98L1399.69,1675.07L1399.8,1674.92L1399.75,1674.98ZM1399.75,1553.02L1399.79,1553.08L1399.69,1552.93L1399.75,1553.02ZM1399.5,1552.68L1399.55,1552.74L1399.38,1552.51L1399.5,1552.68ZM1399.28,1552.37C1399.23,1552.31 1399.18,1552.25 1399.14,1552.19C1399.09,1552.12 1399.05,1552.06 1399,1552L1399.28,1552.37ZM1399.51,1477.32L1399.38,1477.49L1399.55,1477.26L1399.51,1477.32ZM1399.75,1476.98L1399.69,1477.07L1399.8,1476.92L1399.75,1476.98ZM1399.75,1355.02L1399.79,1355.08L1399.69,1354.93L1399.75,1355.02ZM1399.5,1354.68L1399.55,1354.74L1399.38,1354.51L1399.5,1354.68ZM1399.28,1354.37C1399.23,1354.31 1399.18,1354.25 1399.14,1354.19C1399.09,1354.12 1399.05,1354.06 1399,1354L1399.28,1354.37Z" style="fill:rgb(0,123,67);"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="1500" height="2100" viewBox="0 0 1500 2100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<rect id="Card" x="0" y="0" width="1500" height="2100" style="fill:none;"/>
<g id="Card1" serif:id="Card">
<path id="Textbox--Regular-" serif:id="Textbox (Regular)" d="M1400,1882.64L1400,1948L100,1948L100,1898.72L111,1898.72L111,1937L1389,1937L1389,1884L1399,1884C1399.34,1883.55 1399.67,1883.1 1400,1882.64ZM1400,1674.64L1400,1761.36C1399.67,1760.9 1399.34,1760.45 1399,1760L1389,1760L1389,1676L1399,1676C1399.34,1675.55 1399.67,1675.1 1400,1674.64ZM111,1755L100,1755L100,1684.72L111,1684.72L111,1755ZM1400,1476.64L1400,1553.36C1399.67,1552.9 1399.34,1552.45 1399,1552L1389,1552L1389,1478L1399,1478C1399.34,1477.55 1399.67,1477.1 1400,1476.64ZM100,1541L100,1308.21C88.362,1294.83 78.412,1270.28 78,1242C78.412,1213.72 88.362,1189.17 100,1175.79L100,227.213C88.364,213.833 78.412,189.278 78,161C78.481,127.948 91.996,99.984 106,89L1394,89C1408,99.984 1421.52,127.948 1422,161C1421.59,189.276 1411.64,213.828 1400,227.213L1400,1175.79C1411.64,1189.17 1421.59,1213.72 1422,1242C1421.59,1270.28 1411.64,1294.83 1400,1308.21L1400,1355.36C1399.67,1354.9 1399.34,1354.45 1399,1354L1389,1354L1389,1314L111,1314L111,1541L100,1541ZM1388.24,1181.01C1389.44,1181.08 1390.56,1181.69 1391.26,1182.68C1405.33,1202.45 1410.29,1222.23 1410.29,1242C1410.29,1261.77 1405.33,1281.55 1391.26,1301.32C1390.51,1302.37 1389.29,1303 1388,1303L112,1303C110.706,1303 109.492,1302.37 108.741,1301.32C94.667,1281.55 89.714,1261.77 89.714,1242C89.714,1222.23 94.667,1202.45 108.741,1182.68C109.492,1181.63 110.706,1181 112,1181L1388,1181L1388.24,1181.01ZM111,233L111,1170L1389,1170L1389,233L111,233ZM112,100L1388,100C1389.29,100 1390.51,100.626 1391.26,101.68C1405.33,121.453 1410.29,141.227 1410.29,161C1410.29,180.773 1405.33,200.547 1391.26,220.32C1390.51,221.374 1389.29,222 1388,222L112,222C110.706,222 109.492,221.374 108.741,220.32C94.667,200.547 89.714,180.773 89.714,161C89.714,141.227 94.667,121.453 108.741,101.68C109.492,100.626 110.706,100 112,100Z" style="fill:rgb(239,56,39);"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="1500" height="2100" viewBox="0 0 1500 2100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<rect id="Card" x="0" y="0" width="1500" height="2100" style="fill:none;"/>
<g id="Card1" serif:id="Card">
<path id="PT" d="M86,1755L229,1755L295.604,1826.6L228.484,1898.72L86,1898.72L86,1755ZM1165,1822C1164.87,1796.66 1170.14,1777.15 1183,1760L1399,1760C1411.86,1777.15 1417.13,1796.66 1417,1822L1417,1822C1417.13,1847.34 1411.86,1866.85 1399,1884L1183,1884C1170.15,1866.85 1164.88,1847.34 1165,1822L1165,1822ZM86,1541L229,1541L295.604,1612.6L228.484,1684.72L86,1684.72L86,1541ZM1165,1614C1164.87,1588.66 1170.14,1569.15 1183,1552L1399,1552C1411.86,1569.15 1417.13,1588.66 1417,1614L1417,1614C1417.13,1639.34 1411.86,1658.85 1399,1676L1183,1676C1170.15,1658.85 1164.88,1639.34 1165,1614L1165,1614ZM1165,1416C1164.87,1390.66 1170.14,1371.15 1183,1354L1399,1354C1411.86,1371.15 1417.13,1390.66 1417,1416L1417,1416C1417.13,1441.34 1411.86,1460.85 1399,1478L1183,1478C1170.15,1460.85 1164.88,1441.34 1165,1416L1165,1416Z" style="fill:rgb(0,123,67);"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="1500" height="2100" viewBox="0 0 1500 2100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<rect id="Card" x="0" y="0" width="1500" height="2100" style="fill:none;"/>
<g id="Card1" serif:id="Card">
<path id="Textbox" d="M1389,1354L1183,1354C1170.14,1371.15 1164.87,1390.66 1165,1416L1165,1416C1164.88,1441.34 1170.15,1460.85 1183,1478L1389,1478L1389,1552L1183,1552C1170.14,1569.15 1164.87,1588.66 1165,1614L1165,1614C1164.88,1639.34 1170.15,1658.85 1183,1676L1389,1676L1389,1760L1183,1760C1170.14,1777.15 1164.87,1796.66 1165,1822L1165,1822C1164.88,1847.34 1170.15,1866.85 1183,1884L1389,1884L1389,1937L111,1937L111,1898.72L228.484,1898.72L295.604,1826.6L229,1755L111,1755L111,1684.72L228.484,1684.72L295.604,1612.6L229,1541L111,1541L111,1314L1389,1314L1389,1354Z" style="fill:rgb(0,117,190);"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,6 +1,4 @@
loadFramePacks([ loadFramePacks([
{name:'Aftermath (Amonkhet)', value:'Aftermath'},
{name:'Flip (Kamigawa)', value:'Flip'},
{name:'Future Shifted', value:'FutureRegular'}, {name:'Future Shifted', value:'FutureRegular'},
{name:'Seventh Edition', value:'Seventh'}, {name:'Seventh Edition', value:'Seventh'},
{name:'Fifth Edition', value:'SeventhButFifth'}, {name:'Fifth Edition', value:'SeventhButFifth'},

View File

@@ -9,13 +9,13 @@ loadFramePacks([
{name:'Colored Borders', value:'M15Borders'}, {name:'Colored Borders', value:'M15Borders'},
{name:'Other Frames', value:'disabled'}, {name:'Other Frames', value:'disabled'},
{name:'Lands', value:'M15Lands'}, {name:'Lands', value:'M15Lands'},
{name:'Snow', value:'M15Snow'}, {name:'Snow (Kaldheim)', value:'M15Snow'},
{name:'Mutate', value:'M15Mutate'}, {name:'Mutate (Ikoria)', value:'M15Mutate'},
{name:'Nyx', value:'M15Nyx'}, {name:'Nyx (Theros)', value:'M15Nyx'},
{name:'Devoid', value:'M15Devoid'}, {name:'Devoid (Zendikar)', value:'M15Devoid'},
{name:'Special', value:'disabled'}, {name:'Aftermath (Amonkhet)', value:'Aftermath'},
{name:'Nickname', value:'M15Nickname'}, {name:'Flip (Kamigawa)', value:'Flip'},
{name:'Extended Art (Box Topper)', value:'M15BoxTopper'}, {name:'Levelers (Zendikar)', value:'Levelers'},
{name:'Custom Addons', value:'disabled'}, {name:'Custom Addons', value:'disabled'},
{name:'Brawl Legend Crowns', value:'Brawl'} {name:'Brawl Legend Crowns', value:'Brawl'}
]) ])

49
js/frames/packLevelers.js Normal file
View File

@@ -0,0 +1,49 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/levelers/regular/pinline.svg', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/levelers/regular/text.svg', name:'Rules'}, {src:'/img/frames/levelers/regular/pt.svg', name:'Boxes'}, {src:'/img/frames/levelers/regular/frame.svg', name:'Frame'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
// var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/levelers/regular/w.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/levelers/regular/u.png', masks:masks},
{name:'Black Frame', src:'/img/frames/levelers/regular/b.png', masks:masks},
{name:'Red Frame', src:'/img/frames/levelers/regular/r.png', masks:masks},
{name:'Green Frame', src:'/img/frames/levelers/regular/g.png', masks:masks}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = async function() {
//resets things so that every frame doesn't have to
await resetCardIrregularities();
//sets card version
card.version = 'levelers';
//art bounds
card.artBounds = {x:0.0767, y:0.1129, width:0.8476, height:0.4429};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.5910, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', y:0.0613, width:0.9292, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0},
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text 1', text:'Level up {1}{c} {i}({1}{c}: Put a level counter on this. Level up only as a sorcery.){/i}', x:0.086, y:0.6303, width:0.6834, height:0.0905, size:0.0296},
rules2: {name:'Rules Text 2', text:'', x:0.2067, y:0.7229, width:0.5627, height:0.0953, size:0.0296},
rules3: {name:'Rules Text 3', text:'', x:0.2067, y:0.8220, width:0.5627, height:0.0953, size:0.0296},
pt: {name:'Power/Toughness 1', text:'', x:0.7928, y:0.6591, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'},
pt2: {name:'Power/Toughness 2', text:'', x:0.7928, y:0.7524, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'},
pt3: {name:'Power/Toughness 3', text:'', x:0.7928, y:0.8515, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'},
level2: {name:'Level 2', text:`LEVEL\n{fontsize${scaleHeight(0.0162)}}1-5`, x:0.0727, y:0.7420, width:0.08, height:0.0572, size:0.0139, font:'belerenbsc', align:'center'},
level3: {name:'Level 3', text:`LEVEL\n{fontsize${scaleHeight(0.0162)}}6+`, x:0.0727, y:0.8448, width:0.08, height:0.0572, size:0.0139, font:'belerenbsc', align:'center'}
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}