diff --git a/img/frames/m15/aftermath/a.png b/img/frames/m15/aftermath/a.png new file mode 100644 index 00000000..db8e90ae Binary files /dev/null and b/img/frames/m15/aftermath/a.png differ diff --git a/img/frames/m15/aftermath/aThumb.png b/img/frames/m15/aftermath/aThumb.png new file mode 100644 index 00000000..a934e348 Binary files /dev/null and b/img/frames/m15/aftermath/aThumb.png differ diff --git a/img/frames/m15/aftermath/b.png b/img/frames/m15/aftermath/b.png new file mode 100644 index 00000000..e7753aa4 Binary files /dev/null and b/img/frames/m15/aftermath/b.png differ diff --git a/img/frames/m15/aftermath/bThumb.png b/img/frames/m15/aftermath/bThumb.png new file mode 100644 index 00000000..6e900395 Binary files /dev/null and b/img/frames/m15/aftermath/bThumb.png differ diff --git a/img/frames/m15/aftermath/g.png b/img/frames/m15/aftermath/g.png new file mode 100644 index 00000000..25408d74 Binary files /dev/null and b/img/frames/m15/aftermath/g.png differ diff --git a/img/frames/m15/aftermath/gThumb.png b/img/frames/m15/aftermath/gThumb.png new file mode 100644 index 00000000..9a75b66d Binary files /dev/null and b/img/frames/m15/aftermath/gThumb.png differ diff --git a/img/frames/m15/aftermath/l.png b/img/frames/m15/aftermath/l.png new file mode 100644 index 00000000..c4b2d75e Binary files /dev/null and b/img/frames/m15/aftermath/l.png differ diff --git a/img/frames/m15/aftermath/lThumb.png b/img/frames/m15/aftermath/lThumb.png new file mode 100644 index 00000000..057d8854 Binary files /dev/null and b/img/frames/m15/aftermath/lThumb.png differ diff --git a/img/frames/m15/aftermath/m.png b/img/frames/m15/aftermath/m.png new file mode 100644 index 00000000..cdf638ca Binary files /dev/null and b/img/frames/m15/aftermath/m.png differ diff --git a/img/frames/m15/aftermath/mThumb.png b/img/frames/m15/aftermath/mThumb.png new file mode 100644 index 00000000..688cdd71 Binary files /dev/null and b/img/frames/m15/aftermath/mThumb.png differ diff --git a/img/frames/m15/aftermath/r.png b/img/frames/m15/aftermath/r.png new file mode 100644 index 00000000..3825d59c Binary files /dev/null and b/img/frames/m15/aftermath/r.png differ diff --git a/img/frames/m15/aftermath/rThumb.png b/img/frames/m15/aftermath/rThumb.png new file mode 100644 index 00000000..1d3aa4b7 Binary files /dev/null and b/img/frames/m15/aftermath/rThumb.png differ diff --git a/img/frames/m15/aftermath/u.png b/img/frames/m15/aftermath/u.png new file mode 100644 index 00000000..3561bb2a Binary files /dev/null and b/img/frames/m15/aftermath/u.png differ diff --git a/img/frames/m15/aftermath/uThumb.png b/img/frames/m15/aftermath/uThumb.png new file mode 100644 index 00000000..d87db624 Binary files /dev/null and b/img/frames/m15/aftermath/uThumb.png differ diff --git a/img/frames/m15/aftermath/w.png b/img/frames/m15/aftermath/w.png new file mode 100644 index 00000000..ae24c1bb Binary files /dev/null and b/img/frames/m15/aftermath/w.png differ diff --git a/img/frames/m15/aftermath/wThumb.png b/img/frames/m15/aftermath/wThumb.png new file mode 100644 index 00000000..be2bb6ca Binary files /dev/null and b/img/frames/m15/aftermath/wThumb.png differ diff --git a/js/creator-18.js b/js/creator-18.js index 927d43ed..8d05dc1c 100644 --- a/js/creator-18.js +++ b/js/creator-18.js @@ -922,14 +922,11 @@ function writeText(textObject, targetContext) { if (textRotation) { targetContext.save(); targetContext - const shapeX = textX + ptShift[0] + permaShift[0]; - if (!textOneLine) { - verticalAdjust *= (textRotation / 180 * -1); - } - const shapeY = textY + verticalAdjust + ptShift[1] + permaShift[1]; + const shapeX = textX + ptShift[0]; + const shapeY = textY + ptShift[1]; targetContext.translate(shapeX, shapeY); targetContext.rotate(Math.PI * textRotation / 180); - targetContext.drawImage(paragraphCanvas, -canvasMargin, -canvasMargin); + targetContext.drawImage(paragraphCanvas, permaShift[0] - canvasMargin, verticalAdjust - canvasMargin + permaShift[1]); targetContext.restore(); } else { targetContext.drawImage(paragraphCanvas, textX - canvasMargin + ptShift[0] + permaShift[0], textY - canvasMargin + verticalAdjust + ptShift[1] + permaShift[1]); diff --git a/js/frames/groupMisc-1.js b/js/frames/groupMisc-1.js index 82d937a8..766d6f02 100644 --- a/js/frames/groupMisc-1.js +++ b/js/frames/groupMisc-1.js @@ -1,4 +1,5 @@ loadFramePacks([ + {name:'Aftermath (Amonkhet)', value:'Aftermath'}, {name:'Flip (Kamigawa)', value:'Flip'}, {name:'Future Shifted', value:'FutureRegular'}, {name:'Seventh Edition', value:'Seventh'}, diff --git a/js/frames/packAftermath.js b/js/frames/packAftermath.js new file mode 100644 index 00000000..4e963176 --- /dev/null +++ b/js/frames/packAftermath.js @@ -0,0 +1,45 @@ +//Create objects for common properties across available frames +// var masks = [{src:'/img/frames/m15/aftermath/pinline.svg', name:'Pinline'}]; +//defines available frames +availableFrames = [ + {name:'White Frame', src:'/img/frames/m15/aftermath/w.png'}, + {name:'Blue Frame', src:'/img/frames/m15/aftermath/u.png'}, + {name:'Black Frame', src:'/img/frames/m15/aftermath/b.png'}, + {name:'Red Frame', src:'/img/frames/m15/aftermath/r.png'}, + {name:'Green Frame', src:'/img/frames/m15/aftermath/g.png'}, + {name:'Multicolored Frame', src:'/img/frames/m15/aftermath/m.png'}, + {name:'Artifact Frame', src:'/img/frames/m15/aftermath/a.png'}, + {name:'Land Frame', src:'/img/frames/m15/aftermath/l.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() { + // Notification + notify('At this time, adding the second piece of art is not an option, unless added manually with external software. Apologies for the inconvenience!', 15); + //resets things so that every frame doesn't have to + await resetCardIrregularities(); + //sets card version + card.version = 'aftermath'; + //art bounds + card.artBounds = {x:0.076, y:0.1124, width:0.848, height:0.2234}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.9213, y:0.371, 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 1', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381}, + type: {name:'Type 1', text:'', x:0.0854, y:0.3467, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324}, + rules: {name:'Rules Text 1', text:'', x:0.086, y:0.4139, width:0.828, height:0.12, size:0.0362}, + title2: {name:'Title 2', text:'', x:0.92, y:0.5648, width:0.48, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, rotation:90}, + type2: {name:'Type 2', text:'', x:0.7247, y:0.5648, width:0.48, height:0.3239, oneLine:true, font:'belerenb', size:0.0324, rotation:90}, + rules2: {name:'Rules Text 2', text:'', x:0.4494, y:0.57, width:0.47, height:0.2715, size:0.0362, rotation:90}, + }); +} +//loads available frames +loadFramePack(); \ No newline at end of file diff --git a/js/frames/packFlip.js b/js/frames/packFlip.js index d40d6311..84f1b336 100644 --- a/js/frames/packFlip.js +++ b/js/frames/packFlip.js @@ -49,10 +49,10 @@ document.querySelector('#loadFrameVersion').onclick = async function() { 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} + title2: {name:'Title 2', text:'', x:0.9147, y:0.8848, 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.6886, 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.821, width:0.828, height:0.12, size:0.0362, rotation:180}, + pt2: {name:'Power/Toughness 2', text:'', x:0.1734, y:0.6791, width:0.0967, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center', rotation:180} }); } //loads available frames