diff --git a/img/frames/token/dayNight/dayNight.png b/img/frames/token/dayNight/dayNight.png new file mode 100644 index 00000000..7c1a472f Binary files /dev/null and b/img/frames/token/dayNight/dayNight.png differ diff --git a/img/frames/token/dayNight/dayNightThumb.png b/img/frames/token/dayNight/dayNightThumb.png new file mode 100644 index 00000000..a3b86315 Binary files /dev/null and b/img/frames/token/dayNight/dayNightThumb.png differ diff --git a/img/frames/token/old/a.png b/img/frames/token/old/a.png new file mode 100644 index 00000000..39ba8769 Binary files /dev/null and b/img/frames/token/old/a.png differ diff --git a/img/frames/token/old/aThumb.png b/img/frames/token/old/aThumb.png new file mode 100644 index 00000000..d7467735 Binary files /dev/null and b/img/frames/token/old/aThumb.png differ diff --git a/img/frames/token/old/b.png b/img/frames/token/old/b.png new file mode 100644 index 00000000..e363c3f4 Binary files /dev/null and b/img/frames/token/old/b.png differ diff --git a/img/frames/token/old/bThumb.png b/img/frames/token/old/bThumb.png new file mode 100644 index 00000000..559ace9d Binary files /dev/null and b/img/frames/token/old/bThumb.png differ diff --git a/img/frames/token/old/border.svg b/img/frames/token/old/border.svg new file mode 100644 index 00000000..506ead4f --- /dev/null +++ b/img/frames/token/old/border.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/frames/token/old/borderThumb.png b/img/frames/token/old/borderThumb.png new file mode 100644 index 00000000..31722426 Binary files /dev/null and b/img/frames/token/old/borderThumb.png differ diff --git a/img/frames/token/old/frame.svg b/img/frames/token/old/frame.svg new file mode 100644 index 00000000..4407495a --- /dev/null +++ b/img/frames/token/old/frame.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/frames/token/old/frame2.svg b/img/frames/token/old/frame2.svg new file mode 100644 index 00000000..9ccb842d --- /dev/null +++ b/img/frames/token/old/frame2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/frames/token/old/frame2Thumb.png b/img/frames/token/old/frame2Thumb.png new file mode 100644 index 00000000..a7a34587 Binary files /dev/null and b/img/frames/token/old/frame2Thumb.png differ diff --git a/img/frames/token/old/frameThumb.png b/img/frames/token/old/frameThumb.png new file mode 100644 index 00000000..f6d3f3b7 Binary files /dev/null and b/img/frames/token/old/frameThumb.png differ diff --git a/img/frames/token/old/g.png b/img/frames/token/old/g.png new file mode 100644 index 00000000..7db6a56b Binary files /dev/null and b/img/frames/token/old/g.png differ diff --git a/img/frames/token/old/gThumb.png b/img/frames/token/old/gThumb.png new file mode 100644 index 00000000..61c5d4ee Binary files /dev/null and b/img/frames/token/old/gThumb.png differ diff --git a/img/frames/token/old/l.png b/img/frames/token/old/l.png new file mode 100644 index 00000000..92937b98 Binary files /dev/null and b/img/frames/token/old/l.png differ diff --git a/img/frames/token/old/lThumb.png b/img/frames/token/old/lThumb.png new file mode 100644 index 00000000..94fcf288 Binary files /dev/null and b/img/frames/token/old/lThumb.png differ diff --git a/img/frames/token/old/m.png b/img/frames/token/old/m.png new file mode 100644 index 00000000..fd6ee81d Binary files /dev/null and b/img/frames/token/old/m.png differ diff --git a/img/frames/token/old/mThumb.png b/img/frames/token/old/mThumb.png new file mode 100644 index 00000000..40a9912d Binary files /dev/null and b/img/frames/token/old/mThumb.png differ diff --git a/img/frames/token/old/r.png b/img/frames/token/old/r.png new file mode 100644 index 00000000..2292416d Binary files /dev/null and b/img/frames/token/old/r.png differ diff --git a/img/frames/token/old/rThumb.png b/img/frames/token/old/rThumb.png new file mode 100644 index 00000000..af9c7752 Binary files /dev/null and b/img/frames/token/old/rThumb.png differ diff --git a/img/frames/token/old/text.svg b/img/frames/token/old/text.svg new file mode 100644 index 00000000..4a30b08b --- /dev/null +++ b/img/frames/token/old/text.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/token/old/textThumb.png b/img/frames/token/old/textThumb.png new file mode 100644 index 00000000..abf2c8c7 Binary files /dev/null and b/img/frames/token/old/textThumb.png differ diff --git a/img/frames/token/old/u.png b/img/frames/token/old/u.png new file mode 100644 index 00000000..4c9d9c51 Binary files /dev/null and b/img/frames/token/old/u.png differ diff --git a/img/frames/token/old/uThumb.png b/img/frames/token/old/uThumb.png new file mode 100644 index 00000000..f4a40404 Binary files /dev/null and b/img/frames/token/old/uThumb.png differ diff --git a/img/frames/token/old/w.png b/img/frames/token/old/w.png new file mode 100644 index 00000000..5c29c1f6 Binary files /dev/null and b/img/frames/token/old/w.png differ diff --git a/img/frames/token/old/wThumb.png b/img/frames/token/old/wThumb.png new file mode 100644 index 00000000..027f6c6a Binary files /dev/null and b/img/frames/token/old/wThumb.png differ diff --git a/js/creator-23.js b/js/creator-23.js index 91e24461..1db152b0 100644 --- a/js/creator-23.js +++ b/js/creator-23.js @@ -821,7 +821,7 @@ function writeText(textObject, targetContext) { //Finish prepping canvases paragraphContext.clearRect(0, 0, paragraphCanvas.width, paragraphCanvas.height); lineContext.clearRect(0, 0, lineCanvas.width, lineCanvas.height); - lineCanvas.style.letterSpacing = textObject.kerning || '0px'; + lineCanvas.style.letterSpacing = (scaleWidth(textObject.kerning) || 0) + 'px'; // if (textFont == 'goudymedieval') { // lineCanvas.style.letterSpacing = '3.5px'; // } diff --git a/js/frames/groupToken-2.js b/js/frames/groupToken-2.js index aad2d284..12ec4d77 100644 --- a/js/frames/groupToken-2.js +++ b/js/frames/groupToken-2.js @@ -2,11 +2,13 @@ loadFramePacks([ {name:'Regular', value:'TokenRegular-1'}, {name:'Textless', value:'TokenTextless-1'}, {name:'Tall', value:'TokenTall-1'}, + {name:'Day/Night Marker', value:'TokenDayNight'}, {name:'Jumpstart Front Cards', value:'JMPFront'}, {name:'Planeswalker Emblems', value:'Emblem'}, - {name:'Old Tokens (Bordered M15)', value:'disabled'}, + {name:'Older Tokens', value:'disabled'}, {name:'Regular (Bordered M15)', value:'TokenRegularM15'}, {name:'Textless (Bordered M15)', value:'TokenTextlessM15'}, + {name:'Original (Old Bordered)', value:'TokenOld'}, {name:'Addons', value:'disabled'}, {name:'Floating Legend Crowns', value:'M15LegendCrownsFloating'}, {name:'Inner Crowns', value:'M15InnerCrowns'}, diff --git a/js/frames/packTokenDayNight.js b/js/frames/packTokenDayNight.js new file mode 100644 index 00000000..cc5a58eb --- /dev/null +++ b/js/frames/packTokenDayNight.js @@ -0,0 +1,30 @@ +//defines available frames +availableFrames = [ + {name:'White Frame', src:'/img/frames/token/dayNight/dayNight.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 = 'tokenDayNight'; + //art bounds + card.artBounds = {x:0.04, y:0.0286, width:0.92, height:0.8905}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.5, y:0.9524, 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.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenbsc', size:0.0381, color:'white', align:'center'}, + reminder: {name:'Reminder Text', text:'', x:0.06, y:0.1267, width:0.88, height:0.3733, size:0.0343, align:'center', color:'white', noVerticalCenter:true, font:'mplantini'}, + rules: {name:'Rules Text', text:'', x:0.06, y:0.6191, width:0.88, height:0.3, size:0.0362, align:'center', color:'white'} + }); +} +//loads available frames +loadFramePack(); \ No newline at end of file diff --git a/js/frames/packTokenOld.js b/js/frames/packTokenOld.js new file mode 100644 index 00000000..7ead9571 --- /dev/null +++ b/js/frames/packTokenOld.js @@ -0,0 +1,46 @@ +//Create objects for common properties across available frames +var masks = [{src:'/img/frames/token/old/frame2.svg', name:'Colored Frame'}, {src:'/img/frames/token/old/text.svg', name:'Rules'}, {src:'/img/frames/token/old/frame.svg', name:'Generic Frame'}, {src:'/img/frames/token/old/border.svg', name:'Border'}]; +//defines available frames +availableFrames = [ + {name:'White Frame', src:'/img/frames/token/old/w.png', masks:masks}, + {name:'Blue Frame', src:'/img/frames/token/old/u.png', masks:masks}, + {name:'Black Frame', src:'/img/frames/token/old/b.png', masks:masks}, + {name:'Red Frame', src:'/img/frames/token/old/r.png', masks:masks}, + {name:'Green Frame', src:'/img/frames/token/old/g.png', masks:masks}, + {name:'Multicolored Frame', src:'/img/frames/token/old/m.png', masks:masks}, + {name:'Artifact Frame', src:'/img/frames/token/old/a.png', masks:masks}, + {name:'Land Frame', src:'/img/frames/token/old/l.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 = 'tokenOld'; + //art bounds + card.artBounds = {x:0.1154, y:0.1105, width:0.7694, height:0.51}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.8494, y:0.6781, 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({ + title: {name:'Title', text:'', x:0.1134, y:0.0505, width:0.7734, height:0.0477, oneLine:true, font:'mplantin', size:0.0477, color:'white', shadowX:0.002, shadowY:0.0015, kerning:0.0134, align:'center'}, + type: {name:'Type', text:'', x:0.156, y:0.6539, width:0.688, height:0.0543, oneLine:true, size:0.032, color:'white', shadowX:0.002, shadowY:0.0015}, + rules: {name:'Rules Text', text:'', x:0.18, y:0.7124, width:0.64, height:0.14, size:0.0358}, + pt: {name:'Power/Toughness', text:'', x:0.75, y:0.8753, 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:0.8648, 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:0.8929, 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:0.912, 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