From 2f1fbd34ac850edc604ac3cf72125f12597e5b03 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Mon, 7 Mar 2022 11:36:05 -0800 Subject: [PATCH] floating old borders --- js/frames/groupCustom.js | 1 + js/frames/packOldFloating.js | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 js/frames/packOldFloating.js diff --git a/js/frames/groupCustom.js b/js/frames/groupCustom.js index 30077deb..6e025dcc 100644 --- a/js/frames/groupCustom.js +++ b/js/frames/groupCustom.js @@ -5,6 +5,7 @@ loadFramePacks([ {name:'Tapped (Horizontal M15)', value:'Tapped'}, {name:'Textless Duals', value:'CustomDualLands'}, {name:'Seventh Edition Planeswalkers', value:'PlaneswalkerSeventh'}, + {name:'Floating Old Border', value:'OldFloating'}, {name:'Classicshifted Series', value:'disabled'}, {name:'Classicshifted', value:'Classicshifted'}, {name:'Classicshifted Lands', value:'ClassicshiftedLands'}, diff --git a/js/frames/packOldFloating.js b/js/frames/packOldFloating.js new file mode 100644 index 00000000..854c29b9 --- /dev/null +++ b/js/frames/packOldFloating.js @@ -0,0 +1,48 @@ +//Create objects for common properties across available frames +var masks = [{src:'/img/frames/seventh/regular/pinline.svg', name:'Pinline'}, {src:'/img/frames/seventh/regular/rules.svg', name:'Rules'}, {src:'/img/frames/seventh/regular/frame.svg', name:'Frame'}]; +//defines available frames +availableFrames = [ + {name:'White Frame', src:'/img/frames/old/floating/w.png', masks:masks}, + {name:'Blue Frame', src:'/img/frames/old/floating/u.png', masks:masks}, + {name:'Black Frame', src:'/img/frames/old/floating/b.png', masks:masks}, + {name:'Red Frame', src:'/img/frames/old/floating/r.png', masks:masks}, + {name:'Green Frame', src:'/img/frames/old/floating/g.png', masks:masks}, + {name:'Multicolored Frame', src:'/img/frames/old/floating/m.png', masks:masks}, + {name:'Artifact Frame', src:'/img/frames/old/floating/a.png', masks:masks}, + {name:'DCI Star', src:'/img/frames/seventh/foilStar.svg'}, + {name:'Foil Layer', src:'/img/frames/effects/foil.png', opacity:20, masks:[{src:'/img/frames/seventh/foil.svg', name:'With Star'}, {src:'/img/frames/seventh/foil2.svg', name:'Without Star'}]}, +]; +//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 = 'oldFloating'; + //art bounds + card.artBounds = {x:0, y:0, width:1, height:1}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.9, y:0.5739, width:0.12, height:0.0372, 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.1067, y:0.0539, width:0.8174, height:72/2100, oneLine:true, size:72/1638, align:'right', manaCost:true}, + title: {name:'Title', text:'', x:0.1134, y:0.0481, width:0.7734, height:0.041, oneLine:true, font:'goudymedieval', size:0.041, color:'white', shadowX:0.002, shadowY:0.0015}, + 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.002, shadowY:0.0015}, + rules: {name:'Rules Text', text:'', x:0.128, y:0.6067, width:0.744, height:0.2724, size:0.0358}, + pt: {name:'Power/Toughness', text:'', x:0.8074, y:0.9043, width:0.1367, height:0.0429, size:0.0429, oneLine:true, align:'center', color:'white', shadowX:0.002, shadowY:0.0015} + }); + //bottom info + loadBottomInfo({ + top: {text:'Illus: {elemidinfo-artist}', x:0.1, y:1872/2100, width:0.8, height:0.0267, oneLine:true, size:0.0267, align:'center', shadowX:0.0021, shadowY:0.0015, color:'white'}, + wizards: {name:'wizards', text:'\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast, Inc. {elemidinfo-number}', x:0.1, y:1933/2100, width:0.8, height:0.0172, oneLine:true, size:0.0172, align:'center', shadowX:0.0014, shadowY:0.001, color:'white'}, + bottom: {text:'NOT FOR SALE CardConjurer.com', x:0.1, y:1973/2100, width:0.8, height:26/2100, oneLine:true, size:26/2100, align:'center', shadowX:0.0014, shadowY:0.001, color:'white'} + }); +} +//loads available frames +loadFramePack(); \ No newline at end of file