This commit is contained in:
Kyle
2021-12-30 13:47:40 -08:00
parent 4f839ebe4b
commit f1cafbdb4a
47 changed files with 70 additions and 0 deletions

View File

@@ -19,6 +19,10 @@
font-family: matrixb;
src: url("/fonts/matrix-b.ttf");
}
@font-face {
font-family: matrixbsc;
src: url("/fonts/Matrix Bold Small Caps.ttf");
}
@font-face {
font-family: mplantin;
src: url("/fonts/mplantin.ttf");

Binary file not shown.

BIN
img/frames/8th/a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
img/frames/8th/aThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
img/frames/8th/b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

BIN
img/frames/8th/bThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
img/frames/8th/frame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
img/frames/8th/g.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
img/frames/8th/gThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
img/frames/8th/l.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
img/frames/8th/lThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
img/frames/8th/m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
img/frames/8th/mThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
img/frames/8th/pinline.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
img/frames/8th/pt/a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
img/frames/8th/pt/b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
img/frames/8th/pt/g.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
img/frames/8th/pt/l.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
img/frames/8th/pt/m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
img/frames/8th/pt/r.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/frames/8th/pt/u.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
img/frames/8th/pt/w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
img/frames/8th/r.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
img/frames/8th/rThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
img/frames/8th/rules.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
img/frames/8th/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
img/frames/8th/type.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
img/frames/8th/u.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
img/frames/8th/uThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
img/frames/8th/w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
img/frames/8th/wThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1026,6 +1026,15 @@ function writeText(textObject, targetContext) {
textJustify = 'center';
} else if (possibleCode == 'justify-right') {
textJustify = 'right';
} else if (possibleCode.includes('conditionalcolor')) {
var codeParams = possibleCode.split(":");
for (var eligibleFrame of codeParams[1].split(",")) {
eligibleFrame = eligibleFrame.replace(/_/g, " ");
if (card.frames.findIndex(element => element.name.toLowerCase().includes(eligibleFrame)) != -1) {
textColor = codeParams[2];
lineContext.fillStyle = textColor;
}
}
} else if (possibleCode.includes('fontcolor')) {
textColor = possibleCode.replace('fontcolor', '');
lineContext.fillStyle = textColor;

View File

@@ -1,6 +1,7 @@
loadFramePacks([
{name:'Old', value:'disabled'},
{name:'Future Shifted', value:'FutureRegular'},
{name:'8th Edition', value:'8th'},
{name:'Seventh Edition', value:'Seventh'},
{name:'Fifth Edition', value:'SeventhButFifth'},
{name:'Fourth Edition', value:'Fourth'},

56
js/frames/pack8th.js Normal file
View File

@@ -0,0 +1,56 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/8th/pinline.png', name:'Pinline'}, {src:'/img/frames/8th/title.png', name:'Title'}, {src:'/img/frames/8th/type.png', name:'Type'}, {src:'/img/frames/8th/rules.png', name:'Rules'}, {src:'/img/frames/8th/frame.png', name:'Frame'}];
var bounds = {x:0.7227, y:0.8796, width:0.2147, height:0.0839};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/8th/w.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/8th/u.png', masks:masks},
{name:'Black Frame', src:'/img/frames/8th/b.png', masks:masks},
{name:'Red Frame', src:'/img/frames/8th/r.png', masks:masks},
{name:'Green Frame', src:'/img/frames/8th/g.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/8th/m.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/8th/a.png', masks:masks},
{name:'Land Frame', src:'/img/frames/8th/l.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/8th/pt/w.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/8th/pt/u.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/8th/pt/b.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/8th/pt/r.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/8th/pt/g.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/8th/pt/m.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/8th/pt/a.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/8th/pt/l.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 = '8th';
//art bounds
card.artBounds = {x:0.088, y:0.12, width:0.824, height:0.4348};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9047, y:0.5886, width:0.12, height:0.0391, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7605, width:0.75, height:0.2305};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', y:0.0705, width:0.9147, height:65/2100, oneLine:true, size:65/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0},
title: {name:'Title', text:'', x:0.09, y:0.0629, width:0.824, height:0.0429, oneLine:true, font:'matrixb', size:0.0429},
type: {name:'Type', text:'', x:0.1, y:0.572, width:0.8, height:0.0358, oneLine:true, font:'matrixb', size:0.0358},
rules: {name:'Rules Text', text:'', x:0.1, y:0.6277, width:0.8, height:0.2691, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7667, y:0.8953, width:0.1367, height:0.0443, size:0.0443, font:'matrixbsc', oneLine:true, align:'center'}
});
//bottom info
loadBottomInfo({
top: {text:'{conditionalcolor:Black_Frame,Land_Frame:white}\uFFEE {elemidinfo-artist}', x:0.094, y:1904/2100, width:0.8107, height:0.0248, oneLine:true, font:'matrixb', size:0.0248, color:'black', shadowX:0.0007, shadowY:0.0005},
wizards: {name:'wizards', text:'{conditionalcolor:Black_Frame,Land_Frame:white}\u2122 & \u00a9 1993-' + date.getFullYear() + ' Wizards of the Coast, Inc. {elemidinfo-number}', x:0.094, y:1958/2100, width:0.8107, height:0.0153, oneLine:true, font:'mplantin', size:0.0153, color:'black', shadowX:0.0007, shadowY:0.0005},
bottom: {text:'{conditionalcolor:Black_Frame,Land_Frame:white}NOT FOR SALE CardConjurer.com', x:0.094, y:1994/2100, width:0.8107, height:0.0134, oneLine:true, font:'mplantin', size:0.0134, color:'black', shadowX:0.0007, shadowY:0.0005}
});
}
//loads available frames
loadFramePack();