flip frames and lands

This commit is contained in:
Kyle
2021-05-14 17:54:41 -07:00
parent ad0d0efa8e
commit 6c74db5a09
100 changed files with 183 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ loadFramePacks([
{name:'Classic-Shifted', value:'Classicshifted'},
{name:'Ixalan - @feuer_ameise', value:'FeuerAmeiseIxalan'},
{name:'Tapped (Horizontal M15)', value:'Tapped'},
{name:'Simple Inventions', value:'SimpleInventions'},
{name:'Custom Addons', value:'disabled'},
{name:'Brawl Legend Crowns', value:'Brawl'}
])

View File

@@ -1,6 +1,6 @@
loadFramePacks([
{name:'Standard 1/8 Inch Margin', value:'Margin-1'},
{name:'Mystical Archive 1/8 Inch Margin', value:'MarginMysticalArchive'}
{name:'Generic Margins', value:'Margin-1'},
{name:'Mystical Archive Margin', value:'MarginMysticalArchive'}
])
//For multiple Margin packs

View File

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

View File

@@ -1,5 +1,5 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/custom/classicshifted/maskFrame.png', name:'Frame'}, {src:'/img/frames/custom/classicshifted/maskText.png', name:'Textbox'}];
var masks = [{src:'/img/frames/custom/classicshifted/maskFrame.png', name:'Frame'}, {src:'/img/frames/custom/classicshifted/maskText.png', name:'Textbox'}, {src:'/img/frames/custom/classicshifted/pinline.svg', name:'Pinline'}];
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
var bounds2 = {x:0.026, y:0.0129, width:0.948, height:0.1015};
//defines available frames
@@ -12,6 +12,11 @@ availableFrames = [
{name:'Multicolored Frame', src:'/img/frames/custom/classicshifted/m.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/custom/classicshifted/a.png', masks:masks},
{name:'Land Frame', src:'/img/frames/custom/classicshifted/l.png', masks:masks},
{name:'White Land Frame', src:'/img/frames/custom/classicshifted/wl.png', masks:masks},
{name:'Blue Land Frame', src:'/img/frames/custom/classicshifted/ul.png', masks:masks},
{name:'Black Land Frame', src:'/img/frames/custom/classicshifted/bl.png', masks:masks},
{name:'Red Land Frame', src:'/img/frames/custom/classicshifted/rl.png', masks:masks},
{name:'Green Land Frame', src:'/img/frames/custom/classicshifted/gl.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/custom/classicshifted/ptW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/custom/classicshifted/ptU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/custom/classicshifted/ptB.png', bounds:bounds},

59
js/frames/packFlip.js Normal file
View File

@@ -0,0 +1,59 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/flip/pinline.svg', name:'Pinline'}, {src:'/img/frames/m15/flip/twins.svg', name:'Twins'}, {src:'/img/frames/m15/flip/rules.svg', name:'Rules'}];
var masks2 = [{src:'/img/frames/topHalfSharp.svg', name:'Top PT'}, {src:'/img/frames/bottomHalfSharp.svg', name:'Bottom PT'}]
var bounds = {x:0.0374, y:0.2277, width:0.9067, height:0.4762};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/m15/flip/w.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/m15/flip/u.png', masks:masks},
{name:'Black Frame', src:'/img/frames/m15/flip/b.png', masks:masks},
{name:'Red Frame', src:'/img/frames/m15/flip/r.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/flip/g.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/flip/m.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/m15/flip/a.png', masks:masks},
{name:'Land Frame', src:'/img/frames/m15/flip/l.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/m15/flip/c.png', masks:masks},
{name:'Vehicle Frame', src:'/img/frames/m15/flip/v.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/m15/flip/wpt.png', bounds:bounds, masks:masks2},
{name:'Blue Power/Toughness', src:'/img/frames/m15/flip/upt.png', bounds:bounds, masks:masks2},
{name:'Black Power/Toughness', src:'/img/frames/m15/flip/bpt.png', bounds:bounds, masks:masks2},
{name:'Red Power/Toughness', src:'/img/frames/m15/flip/rpt.png', bounds:bounds, masks:masks2},
{name:'Green Power/Toughness', src:'/img/frames/m15/flip/gpt.png', bounds:bounds, masks:masks2},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/flip/mpt.png', bounds:bounds, masks:masks2},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/flip/apt.png', bounds:bounds, masks:masks2},
{name:'Land Power/Toughness', src:'/img/frames/m15/flip/lpt.png', bounds:bounds, masks:masks2},
{name:'Colorless Power/Toughness', src:'/img/frames/m15/flip/cpt.png', bounds:bounds, masks:masks2},
{name:'Vehicle Power/Toughness', src:'/img/frames/m15/flip/vpt.png', bounds:bounds, masks:masks2}
];
//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 = 'flip';
//art bounds
card.artBounds = {x:0.0754, y:0.2962, width:0.8494, height:0.3315};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.784, y:0.26, 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.0477, 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 1', text:'', x:0.0854, y:0.0386, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type 1', text:'', x:0.0854, y:0.2353, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text 1', text:'', x:0.086, y:0.102, width:0.828, height:0.12, size:0.0362},
pt: {name:'Power/Toughness 1', text:'', x:0.8267, y:0.2448, width:0.0967, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'},
title2: {name:'Title 2', text:'', x:0.9147, y:0.8643, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, rotation:180},
type2: {name:'Type 2', text:'', x:0.9147, y:0.662, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, rotation:180},
rules2: {name:'Rules Text 2', text:'', x:0.914, y:0.82, width:0.828, height:0.12, size:0.0362, rotation:180},
pt2: {name:'Power/Toughness 2', text:'', x:0.1734, y:0.6739, width:0.0967, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', rotation:180}
});
}
//loads available frames
loadFramePack();

View File

@@ -1,5 +1,6 @@
//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.3267, y:0.6491, width:0.3474, height:0.2496}
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/m15/regular/lw.png', masks:masks},
@@ -8,7 +9,13 @@ availableFrames = [
{name:'Red Frame', src:'/img/frames/m15/regular/lr.png', masks:masks},
{name:'Green Frame', src:'/img/frames/m15/regular/lg.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/m15/regular/lm.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/m15/regular/ll.png', masks:masks}
{name:'Colorless Frame', src:'/img/frames/m15/regular/ll.png', masks:masks},
{name:'Plains Watermark', src:'/img/frames/m15/basics/w.png', bounds:bounds},
{name:'Island Watermark', src:'/img/frames/m15/basics/u.png', bounds:bounds},
{name:'Swamp Watermark', src:'/img/frames/m15/basics/b.png', bounds:bounds},
{name:'Mountain Watermark', src:'/img/frames/m15/basics/r.png', bounds:bounds},
{name:'Forest Watermark', src:'/img/frames/m15/basics/g.png', bounds:bounds},
{name:'Wastes Watermark', src:'/img/frames/m15/basics/c.png', bounds:bounds}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;

View File

@@ -0,0 +1,48 @@
//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/custom/simpleInvention/w.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/custom/simpleInvention/u.png', masks:masks},
{name:'Black Frame', src:'/img/frames/custom/simpleInvention/b.png', masks:masks},
{name:'Red Frame', src:'/img/frames/custom/simpleInvention/r.png', masks:masks},
{name:'Green Frame', src:'/img/frames/custom/simpleInvention/g.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/custom/simpleInvention/m.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/custom/simpleInvention/a.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}
];
//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 = 'simpleInventions';
//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();