This commit is contained in:
Kyle
2020-12-16 15:30:48 -08:00
parent 2b931a1fdf
commit 1a9d15d94b
596 changed files with 4053 additions and 1205 deletions

8
js/frames/groupMisc.js Normal file
View File

@@ -0,0 +1,8 @@
loadFramePacks([
{name:'Future Shifted', value:'FutureRegular'},
{name:'Seventh Edition', value:'Seventh'},
{name:'Legends Multicolored', value:'Legends'},
{name:'Misc', value:'disabled'},
{name:'Planechase', value:'Planechase'},
{name:'1/8 Inch Margin', value:'Margin'}
])

4
js/frames/groupModal.js Normal file
View File

@@ -0,0 +1,4 @@
loadFramePacks([
{name:'Regular', value:'ModalShort'},
{name:'Nickname', value:'ModalShortNickname'}
])

View File

@@ -0,0 +1,5 @@
loadFramePacks([
{name:'Regular Frames', value:'PlaneswalkerRegular'},
{name:'Nickname Frames', value:'PlaneswalkerNickname'},
{name:'Tall Frames', value:'PlaneswalkerTall'}
])

4
js/frames/groupPromo.js Normal file
View File

@@ -0,0 +1,4 @@
loadFramePacks([
{name:'Regular Frames', value:'PromoRegular'},
{name:'Nickname Frames', value:'PromoNickname'}
])

3
js/frames/groupSaga.js Normal file
View File

@@ -0,0 +1,3 @@
loadFramePacks([
{name:'Regular Frames', value:'SagaRegular'}
])

View File

@@ -0,0 +1,12 @@
loadFramePacks([
{name:'Generic Showcase', value:'GenericShowcase'},
{name:'Commander Legends', value:'CommanderLegends'},
{name:'Zendikar Rising', value:'ZendikarRising'},
{name:'M21', value:'M21'},
{name:'Eldraine Storybooks', value:'Storybook'},
{name:'Masterpieces/Other', value:'disabled'},
{name:'ZNR Expeditions (2020)', value:'ExpeditionZNR'},
{name:'Ixalan Maps', value:'Ixalan'},
{name:'Kaladesh Inventions', value:'Invention'},
{name:'BFZ Expeditions (2015)', value:'ExpeditionBFZ'},
])

View File

@@ -0,0 +1,15 @@
loadFramePacks([
{name:'Regular Frames', value:'M15Regular'},
{name:'Addons', value:'disabled'},
{name:'Legend Crowns', value:'M15LegendCrowns'},
{name:'Floating Legend Crowns', value:'M15LegendCrownsFloating'},
{name:'Inner Crowns', value:'M15InnerCrowns'},
{name:'Holo Stamps', value:'M15HoloStamps'},
{name:'Dark Power/Toughness', value:'M15DarkPT'},
{name:'Other Frames', value:'disabled'},
{name:'Nyx', value:'M15Nyx'},
{name:'Devoid', value:'M15Devoid'},
{name:'Special', value:'disabled'},
{name:'Nickname', value:'M15Nickname'},
{name:'Box Toppers', value:'M15BoxTopper'}
])

View File

@@ -0,0 +1,6 @@
loadFramePacks([
{name:'Generic Showcase', value:'TextlessGenericShowcase'},
{name:'Inventions', value:'TextlessInvention'},
{name:'Unstable Basics', value:'Unstable'},
{name:'Seventh', value:'SeventhTextless'}
])

10
js/frames/groupToken.js Normal file
View File

@@ -0,0 +1,10 @@
loadFramePacks([
{name:'Regular', value:'TokenRegular'},
{name:'Textless', value:'TokenTextless'},
{name:'Tall', value:'TokenTall'},
{name:'Addons', value:'disabled'},
{name:'Floating Legend Crowns', value:'M15LegendCrownsFloating'},
{name:'Inner Crowns', value:'M15InnerCrowns'},
{name:'Holo Stamps', value:'M15HoloStamps'},
{name:'Dark Power/Toughness', value:'M15DarkPT'},
])

View File

@@ -0,0 +1,7 @@
//checks to see if it needs to run
if (!card.manaSymbols.includes('/js/frames/manaSymbolsFuture.js')) {
card.manaSymbols.push('/js/frames/manaSymbolsFuture.js');
}
if (findManaSymbolIndex('fw') == -1) {
loadManaSymbols(['future/fw.png', 'future/fu.png', 'future/fb.png', 'future/fr.png', 'future/fg.png', 'future/f0.png', 'future/f1.png', 'future/f2.png', 'future/f3.png', 'future/f4.png', 'future/f5.png', 'future/f6.png', 'future/f7.png', 'future/f8.png', 'future/f9.png', 'future/f10.png', 'future/f11.png', 'future/f12.png', 'future/f13.png', 'future/f14.png', 'future/f15.png', 'future/f16.png', 'future/f17.png', 'future/f18.png', 'future/f19.png', 'future/f20.png', 'future/fwu.png', 'future/fwb.png', 'future/fub.png', 'future/fur.png', 'future/fbr.png', 'future/fbg.png', 'future/frg.png', 'future/frw.png', 'future/fgw.png', 'future/fgu.png', 'future/fx.png']);
}

View File

@@ -0,0 +1,7 @@
//checks to see if it needs to run
if (!card.manaSymbols.includes('/js/frames/manaSymbolsM21.js')) {
card.manaSymbols.push('/js/frames/manaSymbolsM21.js');
}
if (findManaSymbolIndex('fw') == -1) {
loadManaSymbols(['m21/m21w.png', 'm21/m21u.png', 'm21/m21b.png', 'm21/m21r.png', 'm21/m21g.png', 'm21/m210.png', 'm21/m211.png', 'm21/m212.png', 'm21/m213.png', 'm21/m214.png', 'm21/m215.png', 'm21/m216.png', 'm21/m217.png', 'm21/m218.png', 'm21/m219.png', 'm21/m21x.png', 'm21/dark/dm21w.png', 'm21/dark/dm21u.png', 'm21/dark/dm21b.png', 'm21/dark/dm21r.png', 'm21/dark/dm21g.png', 'm21/dark/dm210.png', 'm21/dark/dm211.png', 'm21/dark/dm212.png', 'm21/dark/dm213.png', 'm21/dark/dm214.png', 'm21/dark/dm215.png', 'm21/dark/dm216.png', 'm21/dark/dm217.png', 'm21/dark/dm218.png', 'm21/dark/dm219.png', 'm21/dark/dm21x.png']);
}

View File

@@ -0,0 +1,50 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/commanderLegends/m15CommanderLegendsMaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/commanderLegends/m15CommanderLegendsMaskTitle.png', name:'Title'}, {src:'/img/frames/m15/commanderLegends/m15CommanderLegendsMaskType.png', name:'Type'}, {src:'/img/frames/m15/commanderLegends/m15CommanderLegendsMaskRules.png', name:'Rules'}, {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/m15/commanderLegends/m15CommanderLegendsFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsFrameL.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTA.png', bounds:bounds},
{name:'Land Power/Toughness', src:'/img/frames/m15/commanderLegends/m15CommanderLegendsPTL.png', bounds:bounds}
];
//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 = 'commanderLegends';
//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, color:'white', shadowX:0.0014, shadowY:0.001},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362, color:'white', shadowX:0.0014, shadowY:0.001},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,39 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/expedition/bfz/expeditionMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/expedition/bfz/expeditionMaskType.png', name:'Type'}, {src:'/img/frames/expedition/bfz/expeditionMaskTextbox.png', name:'Rules'}, {src:'/img/frames/expedition/bfz/expeditionMaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/expedition/bfz/expeditionFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/expedition/bfz/expeditionFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/expedition/bfz/expeditionFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/expedition/bfz/expeditionFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/expedition/bfz/expeditionFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/expedition/bfz/expeditionFrameM.png', masks:masks},
{name:'Land Frame', src:'/img/frames/expedition/bfz/expeditionFrameL.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/expedition/bfz/expeditionFrameA.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 = 'expeditionBFZ';
//art bounds
card.artBounds = {x:0.0754, y:0.111, width:0.8494, height:0.6991};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9214, y:0.8439, width:0.12, height:0.0381, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
resetWatermark();
//text
loadTextOptions({
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.8196, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.09, y:0.5996, width:0.82, height:0.2072, size:0.0362},
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,39 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/expedition/znr/expeditionNewMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/expedition/znr/expeditionNewMaskType.png', name:'Type'}, {src:'/img/frames/expedition/znr/expeditionNewMaskText.png', name:'Rules'}, {src:'/img/frames/expedition/znr/expeditionNewMaskFrame.png', name:'Frame'}, {src:'/img/frames/expedition/znr/expeditionNewMaskHedrons.png', name:'Hedrons'}, {src:'/img/frames/expedition/znr/expeditionNewMaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/expedition/znr/expeditionNewFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/expedition/znr/expeditionNewFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/expedition/znr/expeditionNewFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/expedition/znr/expeditionNewFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/expedition/znr/expeditionNewFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/expedition/znr/expeditionNewFrameM.png', masks:masks},
{name:'Land Frame', src:'/img/frames/expedition/znr/expeditionNewFrameL.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/expedition/znr/expeditionNewFrameC.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 = 'expeditionZNR';
//art bounds
card.artBounds = {x:0.04, y:0.0667, width:0.92, height:0.7491};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.946, y:0.8439, width:0.12, height:0.0381, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
resetWatermark();
//text
loadTextOptions({
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.8196, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.1, y:0.5648, width:0.8, height:0.2505, size:0.0362},
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,62 @@
//Create objects for common properties across available frames
var mask = [{src:'/img/frames/future/futureMaskBorder.png', name:'Border'}];
var masks = [{src:'/img/frames/future/futureMaskCreature.png', name:'Creature'}, {src:'/img/frames/future/futureMaskInstant.png', name:'Instant'}, {src:'/img/frames/future/futureMaskSorcery.png', name:'Sorcery'}, {src:'/img/frames/future/futureMaskEnchantment.png', name:'Enchantment'}, {src:'/img/frames/future/futureMaskArtifact.png', name:'Artifact'}, {src:'/img/frames/future/futureMaskLand.png', name:'Land'}, {src:'/img/frames/future/futureMaskMulti.png', name:'Multitype'}];
var bounds = {x:0.7621, y:0.8834, width:0.1734, height:0.0781};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/future/regular/futureFrameW.png', masks:mask},
{name:'Blue Frame', src:'/img/frames/future/regular/futureFrameU.png', masks:mask},
{name:'Black Frame', src:'/img/frames/future/regular/futureFrameB.png', masks:mask},
{name:'Red Frame', src:'/img/frames/future/regular/futureFrameR.png', masks:mask},
{name:'Green Frame', src:'/img/frames/future/regular/futureFrameG.png', masks:mask},
{name:'Multicolored Frame', src:'/img/frames/future/regular/futureFrameM.png', masks:mask},
{name:'Artifact Frame', src:'/img/frames/future/regular/futureFrameA.png', masks:mask},
{name:'Land Frame', src:'/img/frames/future/regular/futureFrameL.png', masks:mask},
{name:'Colorless Frame', src:'/img/frames/future/regular/futureFrameC.png', masks:mask},
{name:'White Power/Toughness', src:'/img/frames/future/regular/futurePTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/future/regular/futurePTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/future/regular/futurePTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/future/regular/futurePTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/future/regular/futurePTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/future/regular/futurePTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/future/regular/futurePTA.png', bounds:bounds},
{name:'Land Power/Toughness', src:'/img/frames/future/regular/futurePTL.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/future/regular/futurePTC.png', bounds:bounds},
{name:'White Type Icon', src:'/img/frames/future/futureWhite.png', bounds:{x:0.0659, y:0.0472, width:0.0431, height:0.0308}, masks:masks},
{name:'Gray Type Icon', src:'/img/frames/future/futureGray.png', bounds:{x:0.0659, y:0.0472, width:0.0431, height:0.0308}, 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 = 'futureRegular';
loadScript('/js/frames/manaSymbolsFuture.js');
//art bounds
card.artBounds = {x:0.086, y:0.0843, width:0.8714, height:0.5853};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9114, y:0.5948, width:0.0534, height:0.0381, vertical:'center', horizontal: 'center'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7586, width:0.75, height:0.2305};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', size:119/1638, manaCost:true, manaPlacement:{x:[0.1224, 0.082, 0.0619, 0.0619, 0.0794, 0.1425], y:[0.1348, 0.1993, 0.2705, 0.3427, 0.4206, 0.4928]}, noVerticalCenter:true},
title: {name:'Title', text:'', x:0.176, y:0.0491, width:0.832, height:0.0643, oneLine:true, font:'matrixb', size:0.0448, color:'white'},
type: {name:'Type', text:'', x:0.1214, y:0.5615, width:0.832, height:0.0586, oneLine:true, font:'matrixb', size:0.0362, color:'white'},
rules: {name:'Rules Text', text:'', x:0.1027, y:0.6248, width:0.8074, height:0.2639, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7734, y:0.8953, width:0.14, height:0.0572, size:0.0381, oneLine:true, align:'center', color:'white'}
});
//bottom info
loadBottomInfo({
top: {text:'{ptshift-0.1667,0}\uFFEE {elemidinfo-artist}', x:0.094, y:1898/2100, width:0.8107, height:0.0248, oneLine:true, font:'matrixb', size:0.0248, color:'white', align:'right', shadowX:0.0007, shadowY:0.0005},
wizards: {text:'{ptshift-0.1667,0}\u2122 & \u00a9 1993-' + date.getFullYear() + ' Wizards of the Coast, Inc. {elemidinfo-number}', x:0.094, y:1954/2100, width:0.8107, height:0.0153, oneLine:true, font:'mplantin', size:0.0153, color:'white', align:'right', shadowX:0.0007, shadowY:0.0005},
bottom: {text:'{ptshift-0.1667,0}NOT FOR SALE CardConjurer.com', x:0.094, y:1990/2100, width:0.8107, height:0.0134, oneLine:true, font:'mplantin', size:0.0134, color:'white', align:'right', shadowX:0.0007, shadowY:0.0005}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,50 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {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/m15/genericShowcase/m15GenericShowcaseFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/genericShowcase/m15GenericShowcaseFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/genericShowcase/m15GenericShowcaseFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/genericShowcase/m15GenericShowcaseFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/genericShowcase/m15GenericShowcaseFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/genericShowcase/m15GenericShowcaseFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/genericShowcase/m15GenericShowcaseFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/genericShowcase/m15GenericShowcaseFrameL.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTC.png', bounds:bounds}
];
//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 = 'genericShowcase';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
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, color:'white', shadowX:0.0014, shadowY:0.001},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362, color:'white', shadowX:0.0014, shadowY:0.001},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,33 @@
//defines available frames
availableFrames = [
{name:'Invention Frame', src:'/img/frames/m15/invention/inventionFrameA.png', masks:[{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}]},
{name:'Invention Power/Toughness', src:'/img/frames/m15/invention/inventionPT.png', bounds:{x:0.7573, y:0.8848, width:0.188, height:0.0733}}
];
//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 = 'invention';
//art bounds
card.artBounds = {x:0.04, y:0.0286, width:0.92, height:0.8953};
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, shadow:'white', shadowX:-0.0007, shadowY:0.0005},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, shadow:'white', shadowX:-0.0007, shadowY:0.0005},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

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

@@ -0,0 +1,49 @@
//Create objects for common properties across available frames
var bounds = {x:0.06, y:0.05, width:0.0667, height:0.0481};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/ixalan/ixalanFrameW.png'},
{name:'Blue Frame', src:'/img/frames/ixalan/ixalanFrameU.png'},
{name:'Black Frame', src:'/img/frames/ixalan/ixalanFrameB.png'},
{name:'Red Frame', src:'/img/frames/ixalan/ixalanFrameR.png'},
{name:'Green Frame', src:'/img/frames/ixalan/ixalanFrameG.png'},
{name:'Multicolored Frame', src:'/img/frames/ixalan/ixalanFrameM.png'},
{name:'Colorless Frame', src:'/img/frames/ixalan/ixalanFrameL.png'},
{name:'Creature Icon', src:'/img/frames/ixalan/ixalanIconCreature.png', bounds:bounds},
{name:'Instant Icon', src:'/img/frames/ixalan/ixalanIconInstant.png', bounds:bounds},
{name:'Sorcery Icon', src:'/img/frames/ixalan/ixalanIconSorcery.png', bounds:bounds},
{name:'Enchantment Icon', src:'/img/frames/ixalan/ixalanIconEnchantment.png', bounds:bounds},
{name:'Artifact Icon', src:'/img/frames/ixalan/ixalanIconArtifact.png', bounds:bounds},
{name:'Multitype Icon', src:'/img/frames/ixalan/ixalanIconMulti.png', bounds:bounds}
];
//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 = 'ixalan';
//art bounds
card.artBounds = {x:0.04, y:0.1091, width:0.92, height:0.4543};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.5, y:0.1162, width:0.12, height:0.0410, vertical:'center', horizontal: 'center'};
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.0553, 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.14, y:0.0458, width:0.72, height:0.0543, oneLine:true, font:'belerenbsc', size:0.0386, align:'center'},
type: {name:'Type', text:'', x:0.23, y:0.5662, width:0.54, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, align:'center'},
rules: {name:'Rules Text', text:'', x:0.1167, y:0.6381, width:0.7667, height:0.27, size:0.0362},
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}

38
js/frames/packLegends.js Normal file
View File

@@ -0,0 +1,38 @@
//defines available frames
availableFrames = [
{name:'Multicolored Frame', src:'/img/frames/old/legends/legendsFrameM.png'}
];
//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 = 'legends';
//art bounds
card.artBounds = {x:0.1074, y:0.0924, width:0.7854, height:0.4524};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.8914, y:0.5777, width:0.12, height:0.0334, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.18, y:0.64, width:0.64, height:0.24};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', x:0.108, y:0.0458, width:0.8147, height:72/2100, oneLine:true, size:72/1638, align:'right', manaCost:true, manaSpacing:0.0014},
title: {name:'Title', text:'', x:0.108, y:0.04, width:0.784, height:0.0405, oneLine:true, font:'goudymedieval', size:0.0405, color:'white', shadowX:0.0034, shadowY:0.0024},
type: {name:'Type', text:'', x:0.108, y:0.5524, width:0.784, height:0.0543, oneLine:true, size:0.032, color:'white', shadowX:0.0021, shadowY:0.0015},
rules: {name:'Rules Text', text:'', x:0.126, y:0.6081, width:0.748, height:0.2762, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.8, y:0.9039, width:0.1367, height:0.0453, size:0.0453, oneLine:true, align:'center', color:'white', shadowX:0.0034, shadowY:0.0024}
});
//bottom info
loadBottomInfo({
top: {text:'Illus: {elemidinfo-artist}', x:0.0614, y:0.8972, width:0.8774, height:0.0281, oneLine:true, size:0.0281, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'},
wizards: {text:'\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x:0.0614, y:0.9267, width:0.8774, height:0.0172, oneLine:true, size:0.0172, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'},
bottom: {text:'NOT FOR SALE CardConjurer.com', x:0.0614, y:0.9458, width:0.8774, height:0.0143, oneLine:true, size:0.0143, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,43 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskFrame.png', 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/m15/boxTopper/m15BoxTopperFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameL.png', masks:masks},
{name:'Vehicle Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameV.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 = 'm15BoxTopper';
//art bounds
card.artBounds = {x:0, y:0.081, width:1, height:0.531};
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.0386},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0328, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,19 @@
//Create objects for common properties across available frames
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
//defines available frames
availableFrames = [
{name:'White Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTC.png', bounds:bounds}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = null;
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,24 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/m15/devoid/m15DevoidFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/devoid/m15DevoidFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/devoid/m15DevoidFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/devoid/m15DevoidFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/devoid/m15DevoidFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/devoid/m15DevoidFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/devoid/m15DevoidFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/devoid/m15DevoidFrameL.png', masks:masks},
{name:'Devoid Power/Toughness', src:'/img/frames/m15/devoid/m15DevoidPT.png', bounds:{x:0.7573, y:0.8848, width:0.188, height:0.0733}}
];
//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() {
//art bounds
card.artBounds = {x:0.04, y:0.1039, width:0.92, height:0.9229};
autoFitArt();
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,21 @@
//Create objects for common properties across available frames
var bounds = {x:0.436, y:0.9034, width:0.128, height:0.0458};
//defines available frames
availableFrames = [
{name:'White Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampW.png', bounds:bounds},
{name:'Blue Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampU.png', bounds:bounds},
{name:'Black Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampB.png', bounds:bounds},
{name:'Red Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampR.png', bounds:bounds},
{name:'Green Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampG.png', bounds:bounds},
{name:'Multicolored Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampM.png', bounds:bounds},
{name:'Artifact Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampA.png', bounds:bounds},
{name:'Land Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampL.png', bounds:bounds},
{name:'Artifact (2) Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampA2.png', bounds:bounds},
{name:'Artifact (3) Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampA3.png', bounds:bounds}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = null;
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,25 @@
//Create objects for common properties across available frames
var bounds = {x:0.164, y:0.0239, width:0.672, height:0.0239};
//defines available frames
availableFrames = [
{name:'White Inner Crown (Nyx)', src:'/img/frames/m15/innerCrowns/m15InnerCrownWNyx.png', bounds:bounds},
{name:'Blue Inner Crown (Nyx)', src:'/img/frames/m15/innerCrowns/m15InnerCrownUNyx.png', bounds:bounds},
{name:'Black Inner Crown (Nyx)', src:'/img/frames/m15/innerCrowns/m15InnerCrownBNyx.png', bounds:bounds},
{name:'Red Inner Crown (Nyx)', src:'/img/frames/m15/innerCrowns/m15InnerCrownRNyx.png', bounds:bounds},
{name:'Green Inner Crown (Nyx)', src:'/img/frames/m15/innerCrowns/m15InnerCrownGNyx.png', bounds:bounds},
{name:'Multicolored Inner Crown (Nyx)', src:'/img/frames/m15/innerCrowns/m15InnerCrownMNyx.png', bounds:bounds},
{name:'Artifact Inner Crown (Nyx)', src:'/img/frames/m15/innerCrowns/m15InnerCrownANyx.png', bounds:bounds},
{name:'White Inner Crown (Companion)', src:'/img/frames/m15/innerCrowns/m15InnerCrownWCompanion.png', bounds:bounds},
{name:'Blue Inner Crown (Companion)', src:'/img/frames/m15/innerCrowns/m15InnerCrownUCompanion.png', bounds:bounds},
{name:'Black Inner Crown (Companion)', src:'/img/frames/m15/innerCrowns/m15InnerCrownBCompanion.png', bounds:bounds},
{name:'Red Inner Crown (Companion)', src:'/img/frames/m15/innerCrowns/m15InnerCrownRCompanion.png', bounds:bounds},
{name:'Green Inner Crown (Companion)', src:'/img/frames/m15/innerCrowns/m15InnerCrownGCompanion.png', bounds:bounds},
{name:'Multicolored Inner Crown (Companion)', src:'/img/frames/m15/innerCrowns/m15InnerCrownMCompanion.png', bounds:bounds},
{name:'Artifact Inner Crown (Companion)', src:'/img/frames/m15/innerCrowns/m15InnerCrownACompanion.png', bounds:bounds}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = null;
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,21 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/crowns/m15MaskLegendCrown.png', name:'Crown Without Pinlines'}, {src:'/img/frames/m15/crowns/m15MaskLegendCrownPinline.png', name:'Crown With Pinlines'}];
var bounds = {x:0.0274, y:0.0191, width:0.9454, height:0.1667};
//defines available frames
availableFrames = [
{name:'White Legend Crown', src:'/img/frames/m15/crowns/m15CrownW.png', masks:masks, bounds:bounds},
{name:'Blue Legend Crown', src:'/img/frames/m15/crowns/m15CrownU.png', masks:masks, bounds:bounds},
{name:'Black Legend Crown', src:'/img/frames/m15/crowns/m15CrownB.png', masks:masks, bounds:bounds},
{name:'Red Legend Crown', src:'/img/frames/m15/crowns/m15CrownR.png', masks:masks, bounds:bounds},
{name:'Green Legend Crown', src:'/img/frames/m15/crowns/m15CrownG.png', masks:masks, bounds:bounds},
{name:'Multicolored Legend Crown', src:'/img/frames/m15/crowns/m15CrownM.png', masks:masks, bounds:bounds},
{name:'Artifact Legend Crown', src:'/img/frames/m15/crowns/m15CrownA.png', masks:masks, bounds:bounds},
{name:'Land Legend Crown', src:'/img/frames/m15/crowns/m15CrownL.png', masks:masks, bounds:bounds},
{name:'Legend Crown Border Cover', src:'/img/black.png', bounds:{x:0.0394, y:0.0277, width:0.9214, height:0.0177}}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = null;
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,21 @@
//Create objects for common properties across available frames
var bounds = {x:0.0307, y:0.0191, width:0.9387, height:0.1024};
//defines available frames
availableFrames = [
{name:'White Legend Crown', src:'/img/frames/m15/crowns/m15CrownWFloating.png', bounds:bounds},
{name:'Blue Legend Crown', src:'/img/frames/m15/crowns/m15CrownUFloating.png', bounds:bounds},
{name:'Black Legend Crown', src:'/img/frames/m15/crowns/m15CrownBFloating.png', bounds:bounds},
{name:'Red Legend Crown', src:'/img/frames/m15/crowns/m15CrownRFloating.png', bounds:bounds},
{name:'Green Legend Crown', src:'/img/frames/m15/crowns/m15CrownGFloating.png', bounds:bounds},
{name:'Multicolored Legend Crown', src:'/img/frames/m15/crowns/m15CrownMFloating.png', bounds:bounds},
{name:'Artifact Legend Crown', src:'/img/frames/m15/crowns/m15CrownAFloating.png', bounds:bounds},
{name:'Land Legend Crown', src:'/img/frames/m15/crowns/m15CrownLFloating.png', bounds:bounds},
{name:'Legend Crown Border Cover', src:'/img/black.png', bounds:{x:0.0394, y:0.0277, width:0.9214, height:0.0177}},
{name:'Legend Crown Lower Cutout', src:'/img/black.png', bounds:{x:0.0734, y:0.1096, width:0.8532, height:0.0143}, erase:true}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = null;
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,71 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinlineSuper.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
var masks2 = [{src:'/img/frames/m15/nickname/m15MaskNicknameLegendCrownStrokeless.png', name:'Strokeless Crown'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/nickname/m15NicknameMaskTrueName.png', name:'True Title'}];
var masks3 = [{src:'/img/frames/m15/nickname/m15MaskNicknameTitleStrokeless.png', name:'Strokeless Title'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/nickname/m15NicknameMaskTrueName.png', name:'True Title'}];
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
var bounds2 = {x:0.024, y:0.0172, width:0.952, height:0.1286};
var bounds3 = {x:0.0494, y:0.0405, width:0.9014, height:0.1053};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/m15/nickname/m15NicknameFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/nickname/m15NicknameFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/nickname/m15NicknameFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/nickname/m15NicknameFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/nickname/m15NicknameFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/nickname/m15NicknameFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/nickname/m15NicknameFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/nickname/m15NicknameFrameL.png', masks:masks},
{name:'White Crown', src:'/img/frames/m15/nickname/m15NicknameCrownW.png', masks:masks2, bounds:bounds2},
{name:'Blue Crown', src:'/img/frames/m15/nickname/m15NicknameCrownU.png', masks:masks2, bounds:bounds2},
{name:'Black Crown', src:'/img/frames/m15/nickname/m15NicknameCrownB.png', masks:masks2, bounds:bounds2},
{name:'Red Crown', src:'/img/frames/m15/nickname/m15NicknameCrownR.png', masks:masks2, bounds:bounds2},
{name:'Green Crown', src:'/img/frames/m15/nickname/m15NicknameCrownG.png', masks:masks2, bounds:bounds2},
{name:'Multicolored Crown', src:'/img/frames/m15/nickname/m15NicknameCrownM.png', masks:masks2, bounds:bounds2},
{name:'Artifact Crown', src:'/img/frames/m15/nickname/m15NicknameCrownA.png', masks:masks2, bounds:bounds2},
{name:'Land Crown', src:'/img/frames/m15/nickname/m15NicknameCrownL.png', masks:masks2, bounds:bounds2},
{name:'White Title', src:'/img/frames/m15/nickname/m15NicknameTitleW.png', masks:masks3, bounds:bounds3},
{name:'Blue Title', src:'/img/frames/m15/nickname/m15NicknameTitleU.png', masks:masks3, bounds:bounds3},
{name:'Black Title', src:'/img/frames/m15/nickname/m15NicknameTitleB.png', masks:masks3, bounds:bounds3},
{name:'Red Title', src:'/img/frames/m15/nickname/m15NicknameTitleR.png', masks:masks3, bounds:bounds3},
{name:'Green Title', src:'/img/frames/m15/nickname/m15NicknameTitleG.png', masks:masks3, bounds:bounds3},
{name:'Multicolored Title', src:'/img/frames/m15/nickname/m15NicknameTitleM.png', masks:masks3, bounds:bounds3},
{name:'Artifact Title', src:'/img/frames/m15/nickname/m15NicknameTitleA.png', masks:masks3, bounds:bounds3},
{name:'Land Title', src:'/img/frames/m15/nickname/m15NicknameTitleL.png', masks:masks3, bounds:bounds3},
{name:'White Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTC.png', bounds:bounds}
];
//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 = 'm15Nickname';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
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},
nickname: {name:'Nickname', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, color:'white', shadowX:0.0014, shadowY:0.001},
title: {name:'Title', text:'', x:0.14, y:0.1129, width:0.72, height:0.0243, oneLine:true, font:'mplantini', size:0.0229, color:'white', shadowX:0.0014, shadowY:0.001, align:'center'},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362, color:'white', shadowX:0.0014, shadowY:0.001},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

18
js/frames/packM15Nyx.js Normal file
View File

@@ -0,0 +1,18 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/m15/nyx/m15FrameWNyx.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/nyx/m15FrameUNyx.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/nyx/m15FrameBNyx.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/nyx/m15FrameRNyx.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/nyx/m15FrameGNyx.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/nyx/m15FrameMNyx.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/nyx/m15FrameANyx.png', masks:masks}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = null;
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,55 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskFrame.png', 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/m15/regular/m15FrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/regular/m15FrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/regular/m15FrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/regular/m15FrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/regular/m15FrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/regular/m15FrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/regular/m15FrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/regular/m15FrameL.png', masks:masks},
{name:'Vehicle Frame', src:'/img/frames/m15/regular/m15FrameV.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds}
];
//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 = 'm15Regular';
//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', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}

51
js/frames/packM21.js Normal file
View File

@@ -0,0 +1,51 @@
//Create objects for common properties across available frames
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/m15/m21/m15M21FrameW.png'},
{name:'Blue Frame', src:'/img/frames/m15/m21/m15M21FrameU.png'},
{name:'Black Frame', src:'/img/frames/m15/m21/m15M21FrameB.png'},
{name:'Red Frame', src:'/img/frames/m15/m21/m15M21FrameR.png'},
{name:'Green Frame', src:'/img/frames/m15/m21/m15M21FrameG.png'},
{name:'White Basic Land', src:'/img/frames/m15/m21/m15M21FrameWL.png'},
{name:'Blue Basic Land', src:'/img/frames/m15/m21/m15M21FrameUL.png'},
{name:'Black Basic Land', src:'/img/frames/m15/m21/m15M21FrameBL.png'},
{name:'Red Basic Land', src:'/img/frames/m15/m21/m15M21FrameRL.png'},
{name:'Green Basic Land', src:'/img/frames/m15/m21/m15M21FrameGL.png'},
{name:'White Power/Toughness', src:'/img/frames/m15/m21/m15M21PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/m21/m15M21PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/m21/m15M21PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/m21/m15M21PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/m21/m15M21PTG.png', bounds:bounds},
{name:'Holo Stamp', src:'/img/frames/m15/m21/m15M21Stamp.png', bounds:{x:0.4727, y:0.892, width:0.0547, height:0.0391}},
{name:'Chandra\'s Fire', src:'/img/frames/m15/m21/m15M21Fire.png', bounds:{x:0.0074, y:0.8215, width:0.9867, height:0.1524}}
];
//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 = 'm21';
loadScript('/js/frames/manaSymbolsM21.js');
//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, color:'white', shadowX:0.0014, shadowY:0.001},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.0967, y:0.6453, width:0.8067, height:0.2381, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

40
js/frames/packMargin.js Normal file
View File

@@ -0,0 +1,40 @@
//Create objects for common properties across available frames
var bounds = {x:-0.044, y:-1/35, width:1.088, height:37/35};
//defines available frames
availableFrames = [
{name:'Black Border Extension', src:'/img/frames/margins/blackBorderExtension.png', bounds:bounds},
{name:'Borderless Border Extension', src:'/img/frames/margins/borderlessBorderExtension.png', bounds:bounds},
{name:'Box Topper Border Extension', src:'/img/frames/margins/boxTopperBorderExtension.png', bounds:bounds},
];
//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({canvas:[1500, 2100, 0.044, 1/35], resetOthers:false});
//sets card version
card.version = 'margin';
//art stuff
if (card.artBounds.width == 1) {
card.artBounds.width += 0.044;
}
if (card.artBounds.x == 0) {
card.artBounds.x = -0.044;
card.artBounds.width += 0.044;
}
if (card.artBounds.height == 1) {
card.artBounds.height += 1/35;
}
if (card.artBounds.y == 0) {
card.artBounds.y = -1/35;
card.artBounds.height += 1/35;
}
autoFitArt();
//runs anything that needs to run
drawTextBuffer();
drawFrames();
bottomInfoEdited();
watermarkEdited();
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,55 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/modal/short/shortModalMaskPinline.png', name:'Pinline'}, {src:'/img/frames/modal/modalMaskTitle.png', name:'Title'}, {src:'/img/frames/modal/short/shortMaskType.png', name:'Type'}, {src:'/img/frames/modal/short/shortModalMaskText.png', name:'Rules'}, {src:'/img/frames/modal/modalMaskReminder.png', name:'Flipside'}, {src:'/img/frames/modal/short/shortModalMaskBorder.png', name:'Border'}];
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
//defines available frames
availableFrames = [
{name:'White Frame (Front)', src:'/img/frames/modal/short/shortModalFrameWF.png', masks:masks},
{name:'Blue Frame (Front)', src:'/img/frames/modal/short/shortModalFrameUF.png', masks:masks},
{name:'Black Frame (Front)', src:'/img/frames/modal/short/shortModalFrameBF.png', masks:masks},
{name:'Red Frame (Front)', src:'/img/frames/modal/short/shortModalFrameRF.png', masks:masks},
{name:'Green Frame (Front)', src:'/img/frames/modal/short/shortModalFrameGF.png', masks:masks},
{name:'White Frame (Back)', src:'/img/frames/modal/short/shortModalFrameWB.png', masks:masks},
{name:'Blue Frame (Back)', src:'/img/frames/modal/short/shortModalFrameUB.png', masks:masks},
{name:'Black Frame (Back)', src:'/img/frames/modal/short/shortModalFrameBB.png', masks:masks},
{name:'Red Frame (Back)', src:'/img/frames/modal/short/shortModalFrameRB.png', masks:masks},
{name:'Green Frame (Back)', src:'/img/frames/modal/short/shortModalFrameGB.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds}
];
//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 = 'modalShort';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.7272, 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.1614, y:0.0522, width:0.7534, height:0.0543, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type', text:'', x:0.0854, y:0.7024, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.086, y:0.7647, width:0.828, height:0.1239, size:0.0362},
flipsideType: {name:'Flipside Type', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0234, color:'white', oneLine:true, font:'belerenb'},
flipSideReminder: {name:'Flipside Text', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0258, color:'white', oneLine:true, align:'right'},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}

View File

@@ -0,0 +1,42 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/modal/shortNickname/maskTitle.png', name:'Title'}];
var bounds = {x:0.0247, y:0.0405, width:0.926, height:0.1053};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/modal/shortNickname/titleW.png', masks:masks, bounds:bounds},
{name:'Blue Frame', src:'/img/frames/modal/shortNickname/titleU.png', masks:masks, bounds:bounds},
{name:'Black Frame', src:'/img/frames/modal/shortNickname/titleB.png', masks:masks, bounds:bounds},
{name:'Red Frame', src:'/img/frames/modal/shortNickname/titleR.png', masks:masks, bounds:bounds},
{name:'Green Frame', src:'/img/frames/modal/shortNickname/titleG.png', masks:masks, bounds:bounds}
];
//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 = 'modalShortNickname';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.7272, 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},
nickname: {name:'Nickname', text:'', x:0.1614, y:0.0522, width:0.7534, height:0.0543, oneLine:true, font:'belerenb', size:0.0381},
title: {name:'Title', text:'', x:0.14, y:0.1129, width:0.72, height:0.0243, oneLine:true, font:'mplantini', size:0.0229, color:'white', shadowX:0.0014, shadowY:0.001, align:'center'},
type: {name:'Type', text:'', x:0.0854, y:0.7024, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.086, y:0.7647, width:0.828, height:0.1239, size:0.0362},
flipsideType: {name:'Flipside Type', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0234, color:'white', oneLine:true, font:'belerenb'},
flipSideReminder: {name:'Flipside Text', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0258, color:'white', oneLine:true, align:'right'},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,43 @@
//defines available frames
availableFrames = [
{name:'Planechase Frame', src:'/img/frames/planechase/planechaseFrame.png'}
];
//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({canvas:[2100, 1500, 0, 0]});
//sets card version
card.version = 'planechase';
//rotation
card.landscape = true;
previewContext.translate(0, card.width / 2);
previewContext.rotate(-Math.PI / 2);
previewContext.scale(7/5, 5/7);
//art bounds
card.artBounds = {x:0.031, y:0.0434, width:0.9381, height:0.9147};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.7772, y:0.694, width:0.12, height:0.0334, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
resetWatermark();
//text
loadTextOptions({
title: {name:'Title', text:'', x:0.0854, y:0.0577, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0434, align:'center'},
type: {name:'Type', text:'', x:0.2424, y:0.6667, width:0.5152, height:0.0543, oneLine:true, font:'belerenb', size:0.0339, align:'center'},
rules: {name:'Rules Text', text:'', x:0.1158, y:0.7174, width:0.7684, height:0.2087, size:0.0362},
});
//bottom info
await loadBottomInfo({
top: {text:'\uFFEE{elemidinfo-artist}', x:0.0647, y:0.9434, width:0.8707, height:0.0174, oneLine:true, font:'belerenbsc', size:0.0174, color:'white', outlineWidth:0.003, align:'center'},
wizards: {text:'{elemidinfo-number} {elemidinfo-set} * {elemidinfo-language} {fontmplantin}\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x:0.0647, y:0.9614, width:0.8707, height:0.0167, oneLine:true, font:'gothammedium', size:0.0162, color:'white', align:'center', outlineWidth:0.003},
bottom: {text:'NOT FOR SALE {fontmplantin}CardConjurer.com', x:0.0647, y:0.98, width:0.8707, height:0.0143, oneLine:true, font:'gothammedium', size:0.0143, color:'white', align:'center', outlineWidth:0.003}
});
//runs other necessary functions
drawFrames();
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,47 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/planeswalker/regular/planeswalkerMaskPinline.png', name:'Pinline'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskTitle.png', name:'Title'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskType.png', name:'Type'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameA.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/planeswalker/nickname/planeswalkerNicknameFrameL.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 = 'planeswalkerNickname';
card.onload = '/js/frames/versionPlaneswalker.js';
loadScript('/js/frames/versionPlaneswalker.js');
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9153};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9227, y:0.5891, width:0.12, height:0.0381, 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.0481, width:0.9292, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0},
nickname: {name:'Nickname', text:'', x:0.0867, y:0.0372, width:0.8267, height:0.0548, oneLine:true, font:'belerenb', size:0.0381, color:'white', shadowX:0.0014, shadowY:0.001},
title: {name:'Title', text:'', x:0.14, y:0.1015, width:0.72, height:0.0243, oneLine:true, font:'mplantini', size:0.0229, color:'white', shadowX:0.0014, shadowY:0.001, align:'center'},
type: {name:'Type', text:'', x:0.0867, y:0.5625, width:0.8267, height:0.0548, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
ability0: {name:'Ability 1', text:'', x:0.18, y:0.6239, width:0.7467, height:0.0972, size:0.0353, color:'white', shadowX:0.0014, shadowY:0.001},
ability1: {name:'Ability 2', text:'', x:0.18, y:0, width:0.7467, height:0.0972, size:0.0353, color:'white', shadowX:0.0014, shadowY:0.001},
ability2: {name:'Ability 3', text:'', x:0.18, y:0, width:0.7467, height:0.0972, size:0.0353, color:'white', shadowX:0.0014, shadowY:0.001},
ability3: {name:'Ability 4', text:'', x:0.18, y:0, width:0.7467, height:0, size:0.0353, color:'white', shadowX:0.0014, shadowY:0.001},
loyalty: {name:'Loyalty', text:'', x:0.806, y:0.902, width:0.14, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,45 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/planeswalker/regular/planeswalkerMaskPinline.png', name:'Pinline'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskTitle.png', name:'Title'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskType.png', name:'Type'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskFrame.png', name:'Frame'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/planeswalker/regular/planeswalkerFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/planeswalker/regular/planeswalkerFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/planeswalker/regular/planeswalkerFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/planeswalker/regular/planeswalkerFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/planeswalker/regular/planeswalkerFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/planeswalker/regular/planeswalkerFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/planeswalker/regular/planeswalkerFrameA.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 = 'planeswalkerRegular';
card.onload = '/js/frames/versionPlaneswalker.js';
loadScript('/js/frames/versionPlaneswalker.js');
//art bounds
card.artBounds = {x:0.068, y:0.101, width:0.864, height:0.8143};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9227, y:0.5891, width:0.12, height:0.0381, 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.0481, 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.0867, y:0.0372, width:0.8267, height:0.0548, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type', text:'', x:0.0867, y:0.5625, width:0.8267, height:0.0548, oneLine:true, font:'belerenb', size:0.0324},
ability0: {name:'Ability 1', text:'', x:0.18, y:0.6239, width:0.7467, height:0.0972, size:0.0353},
ability1: {name:'Ability 2', text:'', x:0.18, y:0, width:0.7467, height:0.0972, size:0.0353},
ability2: {name:'Ability 3', text:'', x:0.18, y:0, width:0.7467, height:0.0972, size:0.0353},
ability3: {name:'Ability 4', text:'', x:0.18, y:0, width:0.7467, height:0, size:0.0353},
loyalty: {name:'Loyalty', text:'', x:0.806, y:0.902, width:0.14, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,45 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/planeswalker/tall/planeswalkerTallMaskPinline.png', name:'Pinline'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskTitle.png', name:'Title'}, {src:'/img/frames/planeswalker/tall/planeswalkerTallMaskType.png', name:'Type'}, {src:'/img/frames/planeswalker/tall/planeswalkerTallMaskFrame.png', name:'Frame'}, {src:'/img/frames/planeswalker/regular/planeswalkerMaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/planeswalker/tall/planeswalkerTallW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/planeswalker/tall/planeswalkerTallU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/planeswalker/tall/planeswalkerTallB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/planeswalker/tall/planeswalkerTallR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/planeswalker/tall/planeswalkerTallG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/planeswalker/tall/planeswalkerTallM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/planeswalker/tall/planeswalkerTallA.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 = 'planeswalkerTall';
card.onload = '/js/frames/versionPlaneswalker.js';
loadScript('/js/frames/versionPlaneswalker.js');
//art bounds
card.artBounds = {x:0.068, y:0.101, width:0.864, height:0.8143};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9227, y:0.5234, width:0.12, height:0.0381, 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.0481, 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.0867, y:0.0372, width:0.8267, height:0.0548, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type', text:'', x:0.0867, y:0.4967, width:0.8267, height:0.0548, oneLine:true, font:'belerenb', size:0.0324},
ability0: {name:'Ability 1', text:'', x:0.18, y:0.5581, width:0.7467, height:0.0896, size:0.0353},
ability1: {name:'Ability 2', text:'', x:0.18, y:0, width:0.7467, height:0.0896, size:0.0353},
ability2: {name:'Ability 3', text:'', x:0.18, y:0, width:0.7467, height:0.0896, size:0.0353},
ability3: {name:'Ability 4', text:'', x:0.18, y:0, width:0.7467, height:0.0896, size:0.0353},
loyalty: {name:'Loyalty', text:'', x:0.806, y:0.902, width:0.14, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,71 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/promo/m15PromoMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/promo/m15PromoMaskType.png', name:'Type'}, {src:'/img/frames/promo/m15PromoMaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
var masks2 = [{src:'/img/frames/m15/nickname/m15MaskNicknameLegendCrownStrokeless.png', name:'Strokeless Crown'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/nickname/m15NicknameMaskTrueName.png', name:'True Title'}];
var masks3 = [{src:'/img/frames/m15/nickname/m15MaskNicknameTitleStrokeless.png', name:'Strokeless Title'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/nickname/m15NicknameMaskTrueName.png', name:'True Title'}];
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
var bounds2 = {x:0.024, y:0.0172, width:0.952, height:0.1286};
var bounds3 = {x:0.0494, y:0.0405, width:0.9014, height:0.1053};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/promo/nickname/m15PromoNicknameFrameL.png', masks:masks},
{name:'White Crown', src:'/img/frames/m15/nickname/m15NicknameCrownW.png', masks:masks2, bounds:bounds2},
{name:'Blue Crown', src:'/img/frames/m15/nickname/m15NicknameCrownU.png', masks:masks2, bounds:bounds2},
{name:'Black Crown', src:'/img/frames/m15/nickname/m15NicknameCrownB.png', masks:masks2, bounds:bounds2},
{name:'Red Crown', src:'/img/frames/m15/nickname/m15NicknameCrownR.png', masks:masks2, bounds:bounds2},
{name:'Green Crown', src:'/img/frames/m15/nickname/m15NicknameCrownG.png', masks:masks2, bounds:bounds2},
{name:'Multicolored Crown', src:'/img/frames/m15/nickname/m15NicknameCrownM.png', masks:masks2, bounds:bounds2},
{name:'Artifact Crown', src:'/img/frames/m15/nickname/m15NicknameCrownA.png', masks:masks2, bounds:bounds2},
{name:'Land Crown', src:'/img/frames/m15/nickname/m15NicknameCrownL.png', masks:masks2, bounds:bounds2},
{name:'White Title', src:'/img/frames/m15/nickname/m15NicknameTitleW.png', masks:masks3, bounds:bounds3},
{name:'Blue Title', src:'/img/frames/m15/nickname/m15NicknameTitleU.png', masks:masks3, bounds:bounds3},
{name:'Black Title', src:'/img/frames/m15/nickname/m15NicknameTitleB.png', masks:masks3, bounds:bounds3},
{name:'Red Title', src:'/img/frames/m15/nickname/m15NicknameTitleR.png', masks:masks3, bounds:bounds3},
{name:'Green Title', src:'/img/frames/m15/nickname/m15NicknameTitleG.png', masks:masks3, bounds:bounds3},
{name:'Multicolored Title', src:'/img/frames/m15/nickname/m15NicknameTitleM.png', masks:masks3, bounds:bounds3},
{name:'Artifact Title', src:'/img/frames/m15/nickname/m15NicknameTitleA.png', masks:masks3, bounds:bounds3},
{name:'Land Title', src:'/img/frames/m15/nickname/m15NicknameTitleL.png', masks:masks3, bounds:bounds3},
{name:'White Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTC.png', bounds:bounds}
];
//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 = 'promoNickname';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.6743, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.8177, width:0.75, height:0.1472};
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},
nickname: {name:'Nickname', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, color:'white', shadowX:0.0014, shadowY:0.001},
title: {name:'Title', text:'', x:0.14, y:0.1129, width:0.72, height:0.0243, oneLine:true, font:'mplantini', size:0.0229, color:'white', shadowX:0.0014, shadowY:0.001, align:'center'},
type: {name:'Type', text:'', x:0.0854, y:0.65, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.086, y:0.7143, width:0.828, height:0.2048, size:0.0362, color:'white', shadowX:0.0014, shadowY:0.001},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,50 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/promo/m15PromoMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/promo/m15PromoMaskType.png', name:'Type'}, {src:'/img/frames/promo/m15PromoMaskRules.png', name:'Rules'}, {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/promo/regular/m15PromoFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/promo/regular/m15PromoFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/promo/regular/m15PromoFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/promo/regular/m15PromoFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/promo/regular/m15PromoFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/promo/regular/m15PromoFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/promo/regular/m15PromoFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/promo/regular/m15PromoFrameL.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds}
];
//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 = 'promoRegular';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.6743, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.8177, width:0.75, height:0.1472};
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, color:'white', shadowX:0.0014, shadowY:0.001},
type: {name:'Type', text:'', x:0.0854, y:0.65, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.086, y:0.7143, width:0.828, height:0.2048, size:0.0362, color:'white', shadowX:0.0014, shadowY:0.001},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,44 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/saga/sagaMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/saga/sagaMaskType.png', name:'Type'}, {src:'/img/frames/saga/sagaMaskFrame.png', name:'Frame'}, {src:'/img/frames/saga/sagaMaskBanner.png', name:'Banner'}, {src:'/img/frames/saga/sagaMaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/saga/regular/sagaFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/saga/regular/sagaFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/saga/regular/sagaFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/saga/regular/sagaFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/saga/regular/sagaFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/saga/regular/sagaFrameM.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 = 'sagaRegular';
card.onload = '/js/frames/versionSaga.js';
loadScript('/js/frames/versionSaga.js');
//art bounds
card.artBounds = {x:0.5, y:0.1124, width:0.4247, height:0.7253};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9227, y:0.8739, width:0.12, height:0.0381, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.3027, y:0.4748, width:0.3547, height:0.6767};
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.8481, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
ability0: {name:'Ability 1', text:'', x:0.1334, y:0.2896, width:0.35, height:0.1786, size:0.0305},
ability1: {name:'Ability 2', text:'', x:0.1334, y:0, width:0.35, height:0.1786, size:0.0305},
ability2: {name:'Ability 3', text:'', x:0.1334, y:0, width:0.35, height:0.1786, size:0.0305},
ability3: {name:'Ability 4', text:'', x:0.1334, y:0, width:0.35, height:0, size:0.0305},
reminder: {name:'Reminder Text', text:'{i}(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)', x:0.0867, y:0.1129, width:0.404, height:0.1772, size:0.03, shadowColor:'white'}
});
}
//loads available frames
loadFramePack();

54
js/frames/packSeventh.js Normal file
View File

@@ -0,0 +1,54 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/seventh/regular/seventhMaskPinline.png', name:'Pinline'}, {src:'/img/frames/seventh/regular/seventhMaskRules.png', name:'Rules'}, {src:'/img/frames/seventh/regular/seventhMaskFrame.png', name:'Frame'}, {src:'/img/frames/seventh/regular/seventhMaskBorder.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/seventh/regular/seventhFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/seventh/regular/seventhFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/seventh/regular/seventhFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/seventh/regular/seventhFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/seventh/regular/seventhFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/seventh/regular/seventhFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/seventh/regular/seventhFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/seventh/regular/seventhFrameCL.png', masks:masks},
{name:'White Land Frame', src:'/img/frames/seventh/regular/seventhFrameWL.png', masks:masks},
{name:'Blue Land Frame', src:'/img/frames/seventh/regular/seventhFrameUL.png', masks:masks},
{name:'Black Land Frame', src:'/img/frames/seventh/regular/seventhFrameBL.png', masks:masks},
{name:'Red Land Frame', src:'/img/frames/seventh/regular/seventhFrameRL.png', masks:masks},
{name:'Green Land Frame', src:'/img/frames/seventh/regular/seventhFrameGL.png', masks:masks},
{name:'DCI Star', src:'/img/frames/seventh/seventhFoilStamp.png', bounds:{x:0.1089, y:0.8345, width:0.4033, height:0.1107}}
];
//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 = 'seventh';
//art bounds
card.artBounds = {x:0.117, y:0.0973, width:0.7662, height:0.4466};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.8914, y:0.5748, width:0.12, height:0.0381, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.18, y:0.64, width:0.64, height:0.24};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', x:0.108, y:0.0505, width:0.8147, height:72/2100, oneLine:true, size:72/1638, align:'right', manaCost:true, manaSpacing:0.0014},
title: {name:'Title', text:'', x:0.108, y:0.0448, width:0.784, height:0.0405, oneLine:true, font:'goudymedieval', size:0.0405, color:'white', shadowX:0.0034, shadowY:0.0024},
type: {name:'Type', text:'', x:0.1074, y:0.5486, width:0.7852, height:0.0543, oneLine:true, size:0.032, color:'white', shadowX:0.0021, shadowY:0.0015},
rules: {name:'Rules Text', text:'', x:0.126, y:0.6074, width:0.748, height:0.2724, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.8, y:0.8981, width:0.1367, height:0.0453, size:0.0453, oneLine:true, align:'center', color:'white', shadowX:0.0034, shadowY:0.0024}
});
//bottom info
loadBottomInfo({
top: {text:'Illus: {elemidinfo-artist}', x:0.0614, y:0.8915, width:0.8774, height:0.0281, oneLine:true, size:0.0281, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'},
wizards: {text:'\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x:0.0614, y:0.921, width:0.8774, height:0.0172, oneLine:true, size:0.0172, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'},
bottom: {text:'NOT FOR SALE CardConjurer.com', x:0.0614, y:0.94, width:0.8774, height:0.0143, oneLine:true, size:0.0143, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,49 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/seventh/textless/seventhTextlessMaskPinline.png', name:'Pinline'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/seventh/textless/seventhTextlessFrameL.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 = 'seventhTextless';
//art bounds
card.artBounds = {x:0.116, y:0.0977, width:0.768, height:0.7772};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.8914, y:0.9224, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:-1, y:-1, width:0.0007, height:0.0005};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', x:0.108, y:0.0486, width:0.8147, height:72/2100, oneLine:true, size:72/1638, align:'right', manaCost:true, manaSpacing:0},
title: {name:'Title', text:'', x:0.108, y:0.0448, width:0.784, height:0.0405, oneLine:true, font:'goudymedieval', size:0.0405, color:'white', shadowX:0.0034, shadowY:0.0024},
pt: {name:'Power/Toughness', text:'', x:0.8, y:0.8981, width:0.1367, height:0.0453, size:0.0453, oneLine:true, align:'center', color:'white', shadowX:0.0034, shadowY:0.0024}
});
//bottom info
loadBottomInfo({
top: {text:'Illus: {elemidinfo-artist}', x:0.0614, y:0.8915, width:0.8774, height:0.0281, oneLine:true, size:0.0281, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'},
wizards: {text:'\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x:0.0614, y:0.921, width:0.8774, height:0.0172, oneLine:true, size:0.0172, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'},
bottom: {text:'NOT FOR SALE CardConjurer.com', x:0.0614, y:0.94, width:0.8774, height:0.0143, oneLine:true, size:0.0143, align:'center', shadowX:0.0027, shadowY:0.002, color:'white'}
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}

View File

@@ -0,0 +1,53 @@
//Create objects for common properties across available frames
var bounds = {x:0.7427, y:0.8858, width:0.2213, height:0.0658};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/storybook/storybookFrameW.png'},
{name:'Blue Frame', src:'/img/frames/storybook/storybookFrameU.png'},
{name:'Black Frame', src:'/img/frames/storybook/storybookFrameB.png'},
{name:'Red Frame', src:'/img/frames/storybook/storybookFrameR.png'},
{name:'Green Frame', src:'/img/frames/storybook/storybookFrameG.png'},
{name:'Colorless Frame', src:'/img/frames/storybook/storybookFrameC.png'},
{name:'White Power/Toughness', src:'/img/frames/storybook/storybookPTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/storybook/storybookPTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/storybook/storybookPTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/storybook/storybookPTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/storybook/storybookPTG.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/storybook/storybookPTC.png', bounds:bounds}
];
//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 = 'storybook';
//art bounds
card.artBounds = {x:0.0334, y:0.0258, width:0.9367, height:0.5596};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.8854, y:0.5929, width:0.0494, height:0.0353, vertical:'center', horizontal: 'center'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.72, y:0.7681, width:0.3867, height:0.2358};
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.1454, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type', text:'', x:0.2134, y:0.5667, width:0.5732, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, align:'center'},
rules: {name:'Rules Text', text:'', x:0.0854, y:0.7358, width:0.3947, height:0.15, size:0.0353},
rules2: {name:'Rules Text (Right)', text:'', x:0.5267, y:0.65, width:0.3867, height:0.2358, size:0.0353},
pt: {name:'Power/Toughness', text:'', x:0.7934, y:0.9029, width:0.14, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'},
mana2: {name:'Adventure Mana Cost', text:'', x:0.0814, y:0.6391, width:0.4, height:60/2100, oneLine:true, size:60/1638, color:'white', shadowX:-0.001, shadowY:0.0029, align:'right', manaCost:true},
title2: {name:'Adventure Title', text:'', x:0.0814, y:0.6391, width:0.4, height:0.0296, size:0.0296, color:'white', shadowX:0.0014, shadowY:0.001, oneLine:true, font:'belerenb'},
type2: {name:'Adventure Type', text:'', x:0.0814, y:0.6839, width:0.4, height:0.0296, size:0.0296, color:'white', shadowX:0.0014, shadowY:0.001, oneLine:true, font:'belerenb'},
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}

View File

@@ -0,0 +1,48 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/textless/m15TextlessMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/textless/m15TextlessMaskType.png', name:'Type'}, {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/textless/genericShowcase/m15TextlessGenericShowcaseFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/textless/genericShowcase/m15TextlessGenericShowcaseFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/textless/genericShowcase/m15TextlessGenericShowcaseFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/textless/genericShowcase/m15TextlessGenericShowcaseFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/textless/genericShowcase/m15TextlessGenericShowcaseFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/textless/genericShowcase/m15TextlessGenericShowcaseFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/textless/genericShowcase/m15TextlessGenericShowcaseFrameA.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/textless/genericShowcase/m15TextlessGenericShowcaseFrameL.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTC.png', bounds:bounds}
];
//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 = 'textlessGenericShowcase';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.8439, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:-1, y:-1, width:0.0007, height:0.0005};
resetWatermark();
//text
loadTextOptions({
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, color:'white', shadowX:0.0014, shadowY:0.001},
type: {name:'Type', text:'', x:0.0854, y:0.8196, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, shadowX:0.0014, shadowY:0.001, color:'white'},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,51 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/textless/m15TextlessMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/textless/m15TextlessMaskType.png', name:'Type'}, {src:'/img/frames/textless/invention/m15TextlessMaskInvention.png', 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:'Invention Frame', src:'/img/frames/textless/invention/m15TextlessFrameInvention.png', masks:masks},
{name:'White Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionA.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionL.png', masks:masks},
{name:'Phyrexian Frame', src:'/img/frames/textless/invention/m15TextlessFrameInventionPhyrexian.png', masks:masks},
{name:'Invention Power/Toughness', src:'/img/frames/m15/invention/inventionPT.png', bounds:bounds},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds}
];
//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 = 'textlessInvention';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.8439, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:-1, y:-1, width:0.0007, height:0.0005};
resetWatermark();
//text
loadTextOptions({
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, shadow:'white', shadowX:-0.0007, shadowY:0.0005},
type: {name:'Type', text:'', x:0.0854, y:0.8196, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, shadow:'white', shadowX:-0.0007, shadowY:0.0005},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', shadow:'white', shadowX:-0.0007, shadowY:0.0005}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,49 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/token/tokenMaskRegularPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/token/tokenMaskRegularType.png', name:'Type'}, {src:'/img/frames/token/tokenMaskRegularRules.png', name:'Rules'}, {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/token/regular/tokenFrameWRegular.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/token/regular/tokenFrameURegular.png', masks:masks},
{name:'Black Frame', src:'/img/frames/token/regular/tokenFrameBRegular.png', masks:masks},
{name:'Red Frame', src:'/img/frames/token/regular/tokenFrameRRegular.png', masks:masks},
{name:'Green Frame', src:'/img/frames/token/regular/tokenFrameGRegular.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/token/regular/tokenFrameMRegular.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/token/regular/tokenFrameARegular.png', masks:masks},
{name:'Land Frame', src:'/img/frames/token/regular/tokenFrameLRegular.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds}
];
//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 = 'promoRegular';
//art bounds
card.artBounds = {x:0.04, y:0.0286, width:0.92, height:0.8953};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.6743, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.8177, width:0.75, height:0.1472};
resetWatermark();
//text
loadTextOptions({
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, color:'white', align:'center'},
type: {name:'Type', text:'', x:0.0854, y:0.65, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.086, y:0.7143, width:0.828, height:0.2048, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,49 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {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/token/tall/tokenFrameWTall.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/token/tall/tokenFrameUTall.png', masks:masks},
{name:'Black Frame', src:'/img/frames/token/tall/tokenFrameBTall.png', masks:masks},
{name:'Red Frame', src:'/img/frames/token/tall/tokenFrameRTall.png', masks:masks},
{name:'Green Frame', src:'/img/frames/token/tall/tokenFrameGTall.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/token/tall/tokenFrameMTall.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/token/tall/tokenFrameATall.png', masks:masks},
{name:'Land Frame', src:'/img/frames/token/tall/tokenFrameLTall.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds}
];
//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 = 'promoTall';
//art bounds
card.artBounds = {x:0.04, y:0.0286, width:0.92, height:0.8953};
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({
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, color:'white', align:'center'},
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', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,48 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/token/tokenMaskTextlessPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/token/tokenMaskTextlessType.png', name:'Type'}, {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/token/textless/tokenFrameWTextless.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/token/textless/tokenFrameUTextless.png', masks:masks},
{name:'Black Frame', src:'/img/frames/token/textless/tokenFrameBTextless.png', masks:masks},
{name:'Red Frame', src:'/img/frames/token/textless/tokenFrameRTextless.png', masks:masks},
{name:'Green Frame', src:'/img/frames/token/textless/tokenFrameGTextless.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/token/textless/tokenFrameMTextless.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/token/textless/tokenFrameATextless.png', masks:masks},
{name:'Land Frame', src:'/img/frames/token/textless/tokenFrameLTextless.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds}
];
//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 = 'promoTextless';
//art bounds
card.artBounds = {x:0.04, y:0.0286, width:0.92, height:0.8953};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.8439, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:-1, y:-1, width:0.0007, height:0.0005};
resetWatermark();
//text
loadTextOptions({
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, color:'white', align:'center'},
type: {name:'Type', text:'', x:0.0854, y:0.8196, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

36
js/frames/packUnstable.js Normal file
View File

@@ -0,0 +1,36 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/textless/m15TextlessMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/textless/m15TextlessMaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/unstable/unstableFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/unstable/unstableFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/unstable/unstableFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/unstable/unstableFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/unstable/unstableFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/unstable/unstableFrameM.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/unstable/unstableFrameC.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 = 'unstable';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9196};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.5, y:-0.0639, width:0.12, height:0.0410, vertical:'center', horizontal: 'center'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:-1, y:-1, width:0.0007, height:0.0005};
resetWatermark();
//text
loadTextOptions({
title: {name:'Title', text:'', x:0.0854, y:0.0024, width:0.8292, height:0.0639, oneLine:true, font:'belerenb', size:0.0381, color:'white', align:'center'},
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,73 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/zendikarRising/m15ZendikarRisingMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/zendikarRising/m15ZendikarRisingMaskText.png', name:'Rules'}, {src:'/img/frames/m15/zendikarRising/m15ZendikarRisingMaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/zendikarRising/m15ZendikarRisingMaskBorder.png', name:'Border'}];
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
var bounds2 = {x:0.0294, y:0.0234, width:0.9414, height:0.1167};
var bounds3 = {x:0.0374, y:0.0262, width:0.9254, height:0.1091};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameR.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameA.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameL.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameC.png', masks:masks},
{name:'Colorless Frame (2)', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingFrameCAlt.png', masks:masks},
{name:'White Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleW.png', bounds:bounds3},
{name:'Blue Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleU.png', bounds:bounds3},
{name:'Black Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleB.png', bounds:bounds3},
{name:'Red Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleR.png', bounds:bounds3},
{name:'Green Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleG.png', bounds:bounds3},
{name:'Multicolored Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleM.png', bounds:bounds3},
{name:'Artifact Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleA.png', bounds:bounds3},
{name:'Land Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleL.png', bounds:bounds3},
{name:'Colorless Title', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingTitleC.png', bounds:bounds3},
{name:'White Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownW.png', bounds:bounds2},
{name:'Blue Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownU.png', bounds:bounds2},
{name:'Black Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownB.png', bounds:bounds2},
{name:'Red Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownR.png', bounds:bounds2},
{name:'Green Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownG.png', bounds:bounds2},
{name:'Multicolored Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownM.png', bounds:bounds2},
{name:'Artifact Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownA.png', bounds:bounds2},
{name:'Land Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownL.png', bounds:bounds2},
{name:'Colorless Crown', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingCrownC.png', bounds:bounds2},
{name:'White Power/Toughness', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingPTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingPTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingPTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTA.png', bounds:bounds},
{name:'Land Power/Toughness', src:'/img/frames/m15/nickname/m15NicknamePTC.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/zendikarRising/m15ZendikarRisingPTC.png', bounds:bounds}
];
//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 = 'genericShowcase';
//art bounds
card.artBounds = {x:0.04, y:0.0286, width:0.92, height:0.8648};
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, color:'white', shadowX:0.0014, shadowY:0.001},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362, color:'white', shadowX:0.0014, shadowY:0.001},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,184 @@
//checks to see if it needs to run
if (!loadedVersions.includes('/js/frames/versionPlaneswalker.js')) {
loadedVersions.push('/js/frames/versionPlaneswalker.js');
sizeCanvas('planeswalker');
document.querySelector('#creator-menu-tabs').innerHTML += '<h3 class="selectable readable-background" onclick="toggleCreatorTabs(event, `planeswalker`)">Planeswalker</h3>';
var newHTML = document.createElement('div');
newHTML.id = 'creator-menu-planeswalker';
newHTML.classList.add('hidden');
newHTML.innerHTML = `
<div class='readable-background padding'>
<h5 class='padding margin-bottom input-description'>Adjust the height (first input) and loyalty cost (second input) of each Planeswalker ability</h5>
<h5 class='padding margin-bottom input-description'>First Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='planeswalker-height-0' type='number' class='input' oninput='planeswalkerEdited();' min='0'>
<input id='planeswalker-cost-0' type='text' class='input' oninput='planeswalkerEdited();'>
</div>
<h5 class='padding margin-bottom input-description'>Second Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='planeswalker-height-1' type='number' class='input' oninput='planeswalkerEdited();' min='0'>
<input id='planeswalker-cost-1' type='text' class='input' oninput='planeswalkerEdited();'>
</div>
<h5 class='padding margin-bottom input-description'>Third Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='planeswalker-height-2' type='number' class='input' oninput='planeswalkerEdited();' min='0'>
<input id='planeswalker-cost-2' type='text' class='input' oninput='planeswalkerEdited();'>
</div>
<h5 class='padding margin-bottom input-description'>Fourth Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='planeswalker-height-3' type='number' class='input' oninput='planeswalkerEdited();' min='0'>
<input id='planeswalker-cost-3' type='text' class='input' oninput='planeswalkerEdited();'>
</div>
<h5 class='padding margin-bottom input-description'>Invert textbox colors:</h5>
<input id='planeswalker-invert' class='input margin-bottom' type='checkbox' onchange='invertPlaneswalkerColors();'>
<h5 class='padding margin-bottom input-description'>For two-ability planeswalkers only:</h5>
</div>`;
if (!card.planeswalker) {
card.planeswalker = {abilities:['+1', '0', '-7', ''], count:3, x:0.1167, width:0.8094};
}
window.planeswalkerAbilityLayout = [[[0.7467], [0.6953, 0.822], [0.6639, 0.7467, 0.8362], [0.6505, 0.72, 0.7905, 0.861]],[[0.72], [0.6391, 0.801], [0.5986, 0.72, 0.8415], [0.5986, 0.6796, 0.7605, 0.8415]]];
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var plusIcon = new Image();
plusIcon.src = '/img/frames/planeswalker/planeswalkerPlus.png';
var minusIcon = new Image();
minusIcon.src = '/img/frames/planeswalker/planeswalkerMinus.png';
var neutralIcon = new Image();
neutralIcon.src = '/img/frames/planeswalker/planeswalkerNeutral.png';
var lightToDark = new Image();
lightToDark.src = '/img/frames/planeswalker/abilityLineOdd.png';
var darkToLight = new Image();
darkToLight.src = '/img/frames/planeswalker/abilityLineEven.png';
var planeswalkerTextMask = new Image();
planeswalkerTextMask.onload = function(){fixPlaneswalkerInputs(planeswalkerEdited);}
planeswalkerTextMask.src = '/img/frames/planeswalker/planeswalkerMaskText.png';
var lightColor = 'white';
var darkColor = '#a4a4a4';
}
function planeswalkerEdited() {
var planeswalkerTall = 0;
if (card.version == 'planeswalkerTall') {
planeswalkerTall = 1;
if (!planeswalkerTextMask.src.includes('Tall')) {
planeswalkerTextMask.src = '/img/frames/planeswalker/tall/planeswalkerTallMaskRules.png';
}
} else {
if (planeswalkerTextMask.src.includes('Tall')) {
planeswalkerTextMask.src = '/img/frames/planeswalker/planeswalkerMaskText.png';
}
}
card.planeswalker.abilities[0] = document.querySelector('#planeswalker-cost-0').value;
card.planeswalker.abilities[1] = document.querySelector('#planeswalker-cost-1').value;
card.planeswalker.abilities[2] = document.querySelector('#planeswalker-cost-2').value;
card.planeswalker.abilities[3] = document.querySelector('#planeswalker-cost-3').value;
card.planeswalker.count = 0;
var lastY = card.text.ability0.y;
for (var i = 0; i < 4; i ++) {
card.text['ability' + i].y = lastY;
var height = parseFloat((parseInt(document.querySelector('#planeswalker-height-' + i).value) / card.height).toFixed(4));
if (height > 0) {
card.planeswalker.count ++;
}
card.text['ability' + i].height = height;
lastY += height;
}
fixPlaneswalkerInputs();
var transitionHeight = scaleHeight(0.0048);
planeswalkerContext.clearRect(0, 0, planeswalkerCanvas.width, planeswalkerCanvas.height);
for (var i = 0; i < card.planeswalker.count; i ++) {
var x = scaleX(card.planeswalker.x);
var y = scaleY(card.text['ability' + i].y);
var width = scaleWidth(card.planeswalker.width);
var height = scaleHeight(card.text['ability' + i].height);
if (i == 0) {
y -= scaleHeight(0.1);
height += scaleHeight(0.1);
} else if (i == card.planeswalker.count - 1) {
height += scaleHeight(0.5);
}
if (i % 2 == 0) {
planeswalkerContext.fillStyle = lightColor;
planeswalkerContext.globalAlpha = 0.608;
planeswalkerContext.fillRect(x, y + transitionHeight, width, height - 2 * transitionHeight);
planeswalkerContext.globalAlpha = 1;
if (lightToDark.complete) {
planeswalkerContext.drawImage(lightToDark, x, y + height - transitionHeight, width, 2 * transitionHeight);
}
} else {
planeswalkerContext.fillStyle = darkColor;
planeswalkerContext.globalAlpha = 0.706;
planeswalkerContext.fillRect(x, y + transitionHeight, width, height - 2 * transitionHeight);
planeswalkerContext.globalAlpha = 1;
if (darkToLight.complete) {
planeswalkerContext.drawImage(darkToLight, x, y + height - transitionHeight, width, 2 * transitionHeight);
}
}
}
planeswalkerContext.globalCompositeOperation = 'destination-in';
if (planeswalkerTextMask.complete) {
planeswalkerContext.drawImage(planeswalkerTextMask, scaleX(0), scaleY(0), scaleWidth(1), scaleHeight(1));
}
planeswalkerContext.globalCompositeOperation = 'source-over';
planeswalkerContext.fillStyle = 'white'
planeswalkerContext.font = scaleHeight(0.0286) + 'px belerenbsc';
planeswalkerContext.textAlign = 'center';
for (var i = 0; i < card.planeswalker.count; i ++) {
var planeswalkerIconValue = card.planeswalker.abilities[i];
var planeswalkerPlacement = scaleY(planeswalkerAbilityLayout[planeswalkerTall][card.planeswalker.count - 1][i])
if (planeswalkerIconValue.includes('+')) {
if (plusIcon.complete) {
planeswalkerContext.drawImage(plusIcon, scaleX(0.0294), planeswalkerPlacement - scaleHeight(0.0258), scaleWidth(0.14), scaleHeight(0.0724));
}
planeswalkerContext.fillText(planeswalkerIconValue, scaleX(0.1027), planeswalkerPlacement + scaleHeight(0.0172));
} else if (planeswalkerIconValue.includes('-')) {
if (minusIcon.complete) {
planeswalkerContext.drawImage(minusIcon, scaleX(0.028), planeswalkerPlacement - scaleHeight(0.0153), scaleWidth(0.1414), scaleHeight(0.0705));
}
planeswalkerContext.fillText(planeswalkerIconValue, scaleX(0.1027), planeswalkerPlacement + scaleHeight(0.0181));
} else if (planeswalkerIconValue != '') {
if (neutralIcon.complete) {
planeswalkerContext.drawImage(neutralIcon, scaleX(0.028), planeswalkerPlacement - scaleHeight(0.0153), scaleWidth(0.1414), scaleHeight(0.061));
}
planeswalkerContext.fillText(planeswalkerIconValue, scaleX(0.1027), planeswalkerPlacement + scaleHeight(0.0191));
}
}
drawTextBuffer();
drawCard();
}
function fixPlaneswalkerInputs(callback) {
document.querySelector('#planeswalker-height-0').value = scaleHeight(card.text.ability0.height);
document.querySelector('#planeswalker-cost-0').value = card.planeswalker.abilities[0];
document.querySelector('#planeswalker-height-1').value = scaleHeight(card.text.ability1.height);
document.querySelector('#planeswalker-cost-1').value = card.planeswalker.abilities[1];
document.querySelector('#planeswalker-height-2').value = scaleHeight(card.text.ability2.height);
document.querySelector('#planeswalker-cost-2').value = card.planeswalker.abilities[2];
document.querySelector('#planeswalker-height-3').value = scaleHeight(card.text.ability3.height);
document.querySelector('#planeswalker-cost-3').value = card.planeswalker.abilities[3];
if (callback) {
callback();
}
}
function invertPlaneswalkerColors(reverse = false) {
if (reverse) {
document.querySelector('#planeswalker-invert').checked = card.planeswalker.invert;
} else {
card.planeswalker.invert = document.querySelector('#planeswalker-invert').checked;
}
if (!lightToDark.onload) {
lightToDark.onload = planeswalkerEdited;
darkToLight.onload = planeswalkerEdited;
}
if (card.planeswalker.invert) {
darkColor = '#5b5b5b';
lightColor = 'black';
lightToDark.src = '/img/frames/planeswalker/abilityLineOddDarkened.png';
darkToLight.src = '/img/frames/planeswalker/abilityLineEvenDarkened.png';
} else {
darkColor = '#a4a4a4';
lightColor = 'white';
lightToDark.src = '/img/frames/planeswalker/abilityLineOdd.png';
darkToLight.src = '/img/frames/planeswalker/abilityLineEven.png';
}
}

126
js/frames/versionSaga.js Normal file
View File

@@ -0,0 +1,126 @@
//checks to see if it needs to run
if (!loadedVersions.includes('/js/frames/versionSaga.js')) {
loadedVersions.push('/js/frames/versionSaga.js');
sizeCanvas('saga');
document.querySelector('#creator-menu-tabs').innerHTML += '<h3 class="selectable readable-background" onclick="toggleCreatorTabs(event, `saga`)">Saga</h3>';
var newHTML = document.createElement('div');
newHTML.id = 'creator-menu-saga';
newHTML.classList.add('hidden');
newHTML.innerHTML = `
<div class='readable-background padding'>
<h5 class='padding margin-bottom input-description'>Adjust the height (first input) and loyalty chapter count (second input) of each Saga ability</h5>
<h5 class='padding margin-bottom input-description'>First Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='saga-height-0' type='number' class='input' oninput='sagaEdited();' min='0'>
<input id='saga-chapters-0' type='number' class='input' oninput='sagaEdited();' min='0' max='2' step='1'>
</div>
<h5 class='padding margin-bottom input-description'>Second Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='saga-height-1' type='number' class='input' oninput='sagaEdited();' min='0'>
<input id='saga-chapters-1' type='number' class='input' oninput='sagaEdited();' min='0' max='2' step='1'>
</div>
<h5 class='padding margin-bottom input-description'>Third Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='saga-height-2' type='number' class='input' oninput='sagaEdited();' min='0'>
<input id='saga-chapters-2' type='number' class='input' oninput='sagaEdited();' min='0' max='2' step='1'>
</div>
<h5 class='padding margin-bottom input-description'>Fourth Ability:</h5>
<div class='padding input-grid margin-bottom'>
<input id='saga-height-3' type='number' class='input' oninput='sagaEdited();' min='0'>
<input id='saga-chapters-3' type='number' class='input' oninput='sagaEdited();' min='0' max='2' step='1'>
</div>
</div>`;
if (!card.saga) {
card.saga = {abilities:[1, 1, 1, 0], count:3, x:0.1, width:0.3947};
}
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var sagaChapter = new Image();
sagaChapter.src = '/img/frames/saga/sagaChapter.png';
var sagaDivider = new Image();
sagaDivider.src = '/img/frames/saga/sagaDivider.png';
sagaChapter.onload = sagaDivider.onload = sagaEdited;
fixSagaInputs(sagaEdited);
}
function sagaEdited() {
//gather data
card.saga.abilities[0] = document.querySelector('#saga-chapters-0').value;
card.saga.abilities[1] = document.querySelector('#saga-chapters-1').value;
card.saga.abilities[2] = document.querySelector('#saga-chapters-2').value;
card.saga.abilities[3] = document.querySelector('#saga-chapters-3').value;
card.saga.count = 0;
var lastY = card.text.ability0.y;
for (var i = 0; i < 4; i ++) {
card.text['ability' + i].y = lastY;
var height = parseFloat((parseInt(document.querySelector('#saga-height-' + i).value) / card.height).toFixed(4));
if (height > 0) {
card.saga.count ++;
}
card.text['ability' + i].height = height;
lastY += height;
}
fixSagaInputs();
//draw to saga canvas
sagaContext.clearRect(0, 0, sagaCanvas.width, sagaCanvas.height);
sagaContext.font = 'normal normal 550 ' + scaleHeight(0.0324) + 'px plantinsemibold';
sagaContext.textAlign = 'center';
var sagaCount = 1;
for (var i = 0; i < card.saga.count; i ++) {
var x = scaleX(card.saga.x);
var y = scaleY(card.text['ability' + i].y);
var width = scaleWidth(card.saga.width);
var height = scaleHeight(card.text['ability' + i].height);
if (sagaDivider.complete) {
sagaContext.drawImage(sagaDivider, x, y - scaleHeight(0.0029) / 2, width, scaleHeight(0.0029));
}
if (sagaChapter.complete) {
var numeralX = x - scaleWidth(0.0614);
var numeralWidth = scaleWidth(0.0787);
var numeralHeight = scaleHeight(0.0629);
var numeralY = y + (height - numeralHeight) / 2;
var numeralTextX = numeralX + scaleWidth(0.0394);
var numeralTextY = numeralY + scaleHeight(0.0429);
if (card.saga.abilities[i] == 1) {
sagaContext.drawImage(sagaChapter, numeralX, numeralY, numeralWidth, numeralHeight);
sagaContext.fillText(romanNumeral(sagaCount), numeralTextX, numeralTextY);
sagaCount ++;
} else {
var numeralSpread = scaleHeight(0.0358);
var numeralTextSpread = scaleHeight(0.0358);
sagaContext.drawImage(sagaChapter, numeralX, numeralY - numeralSpread, numeralWidth, numeralHeight);
sagaContext.drawImage(sagaChapter, numeralX, numeralY + numeralSpread, numeralWidth, numeralHeight);
sagaContext.fillText(romanNumeral(sagaCount), numeralTextX, numeralTextY - numeralTextSpread);
sagaContext.fillText(romanNumeral(sagaCount + 1), numeralTextX, numeralTextY + numeralTextSpread);
sagaCount += 2;
}
}
}
drawTextBuffer();
drawCard();
}
function fixSagaInputs(callback) {
document.querySelector('#saga-height-0').value = scaleHeight(card.text.ability0.height);
document.querySelector('#saga-chapters-0').value = card.saga.abilities[0];
document.querySelector('#saga-height-1').value = scaleHeight(card.text.ability1.height);
document.querySelector('#saga-chapters-1').value = card.saga.abilities[1];
document.querySelector('#saga-height-2').value = scaleHeight(card.text.ability2.height);
document.querySelector('#saga-chapters-2').value = card.saga.abilities[2];
document.querySelector('#saga-height-3').value = scaleHeight(card.text.ability3.height);
document.querySelector('#saga-chapters-3').value = card.saga.abilities[3];
if (callback) {
callback();
}
}
function romanNumeral(input) {
switch(input) {
case 1: return 'I';
case 2: return 'II';
case 3: return 'III';
case 4: return 'IV';
case 5: return 'V';
case 6: return 'VI';
default: return input;
}
}