This commit is contained in:
Kyle
2020-01-04 10:38:44 -08:00
parent 03f44981f2
commit 021c475429
71 changed files with 128 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,22 @@
displayName,imagePath,maskOptions,framePickerOptions
White,future/futureWFull.png,Full-0-0-744-1039,Future
Blue,future/futureUFull.png,Full-0-0-744-1039,Future
Black,future/futureBFull.png,Full-0-0-744-1039,Future
Red,future/futureRFull.png,Full-0-0-744-1039,Future
Green,future/futureGFull.png,Full-0-0-744-1039,Future
Multicolored,future/futureMFull.png,Full-0-0-744-1039,Future
Artifact,future/futureAFull.png,Full-0-0-744-1039,Future
Land,future/futureLFull.png,Full-0-0-744-1039,Future
Colorless,future/futureCFull.png,Full-0-0-744-1039,Future
White Icon,future/futureWhite.png,Icon Future Creature-49-49-32-32;Icon Future Instant-49-49-32-32;Icon Future Sorcery-49-49-32-32;Icon Future Enchantment-49-49-32-32;Icon Future Artifact-49-49-32-32;Icon Future Land-49-49-32-32;Icon Future Multi-49-49-32-32,Future
Gray Icon,future/futureGray.png,Icon Future Creature-49-49-32-32;Icon Future Instant-49-49-32-32;Icon Future Sorcery-49-49-32-32;Icon Future Enchantment-49-49-32-32;Icon Future Artifact-49-49-32-32;Icon Future Land-49-49-32-32;Icon Future Multi-49-49-32-32,Future
White PT,future/futureWPT.png,Full-567-918-129-81,Future
Blue PT,future/futureUPT.png,Full-567-918-129-81,Future
Black PT,future/futureBPT.png,Full-567-918-129-81,Future
Red PT,future/futureRPT.png,Full-567-918-129-81,Future
Green PT,future/futureGPT.png,Full-567-918-129-81,Future
Multicolored PT,future/futureMPT.png,Full-567-918-129-81,Future
Artifact PT,future/futureAPT.png,Full-567-918-129-81,Future
Land PT,future/futureLPT.png,Full-567-918-129-81,Future
Colorless PT,future/futureCPT.png,Full-567-918-129-81,Future
Black Border,masks/BorderFuture.png,Full-0-0-744-1039;Border Future-0-0-744-1039,Future
1 displayName imagePath maskOptions framePickerOptions
2 White future/futureWFull.png Full-0-0-744-1039 Future
3 Blue future/futureUFull.png Full-0-0-744-1039 Future
4 Black future/futureBFull.png Full-0-0-744-1039 Future
5 Red future/futureRFull.png Full-0-0-744-1039 Future
6 Green future/futureGFull.png Full-0-0-744-1039 Future
7 Multicolored future/futureMFull.png Full-0-0-744-1039 Future
8 Artifact future/futureAFull.png Full-0-0-744-1039 Future
9 Land future/futureLFull.png Full-0-0-744-1039 Future
10 Colorless future/futureCFull.png Full-0-0-744-1039 Future
11 White Icon future/futureWhite.png Icon Future Creature-49-49-32-32;Icon Future Instant-49-49-32-32;Icon Future Sorcery-49-49-32-32;Icon Future Enchantment-49-49-32-32;Icon Future Artifact-49-49-32-32;Icon Future Land-49-49-32-32;Icon Future Multi-49-49-32-32 Future
12 Gray Icon future/futureGray.png Icon Future Creature-49-49-32-32;Icon Future Instant-49-49-32-32;Icon Future Sorcery-49-49-32-32;Icon Future Enchantment-49-49-32-32;Icon Future Artifact-49-49-32-32;Icon Future Land-49-49-32-32;Icon Future Multi-49-49-32-32 Future
13 White PT future/futureWPT.png Full-567-918-129-81 Future
14 Blue PT future/futureUPT.png Full-567-918-129-81 Future
15 Black PT future/futureBPT.png Full-567-918-129-81 Future
16 Red PT future/futureRPT.png Full-567-918-129-81 Future
17 Green PT future/futureGPT.png Full-567-918-129-81 Future
18 Multicolored PT future/futureMPT.png Full-567-918-129-81 Future
19 Artifact PT future/futureAPT.png Full-567-918-129-81 Future
20 Land PT future/futureLPT.png Full-567-918-129-81 Future
21 Colorless PT future/futureCPT.png Full-567-918-129-81 Future
22 Black Border masks/BorderFuture.png Full-0-0-744-1039;Border Future-0-0-744-1039 Future

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -5,8 +5,8 @@
function testFunction() {
cardMaster.insertBefore(frameList[5].cardMasterElement("Full"), cardMaster.children[newFrameInsertionLocation]);
cardMasterUpdated();
// changeVersionTo("seventh")
// setTimeout(function() {cardMaster.insertBefore(frameList[40].cardMasterElement("Full"), cardMaster.children[newFrameInsertionLocation]);cardMasterUpdated();}, 1000);
// changeVersionTo("future")
// setTimeout(function() {cardMaster.insertBefore(frameList[37].cardMasterElement("Full"), cardMaster.children[newFrameInsertionLocation]);cardMasterUpdated();}, 1000);
// console.log("First frame manually loaded")
}
@@ -45,7 +45,7 @@ function initiate() {
newCanvas("temp");
newCanvas("cardFinal");
//Mana symbol Array setup
window.manaSymbolCodeList = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "w", "u", "b", "r", "g", "2w", "2u", "2b", "2r", "2g", "pw", "pu", "pb", "pr", "pg", "wu", "wb", "ub", "ur", "br", "bg", "rg", "rw", "gw", "gu", "x", "s", "c", "t","untap", "e", "y", "z", "1/2", "inf", "chaos", "plane", "l+", "l-", "l0", "oldtap", "artistbrush", "bar"];
window.manaSymbolCodeList = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "w", "u", "b", "r", "g", "2w", "2u", "2b", "2r", "2g", "pw", "pu", "pb", "pr", "pg", "wu", "wb", "ub", "ur", "br", "bg", "rg", "rw", "gw", "gu", "x", "s", "c", "t","untap", "e", "y", "z", "1/2", "inf", "chaos", "plane", "l+", "l-", "l0", "oldtap", "artistbrush", "bar", "whiteBrush", "blackBrush"];
window.manaSymbolImageList = [];
//Manually create a few important images
window.cardArt = new Image();
@@ -454,6 +454,10 @@ function updateSetSymbol() {
setSymbolX = version.setSymbolRight - setSymbolWidth
setSymbolY = version.setSymbolVertical - setSymbolHeight / 2
}
if (version.currentVersion == "future") {
//Also center the set symbol horizontally
setSymbolX = version.setSymbolRight - setSymbolWidth / 2;
}
setSymbolContext.drawImage(setSymbol, setSymbolX, setSymbolY, setSymbolWidth, setSymbolHeight)
cardImageUpdated()
}
@@ -569,7 +573,15 @@ CanvasRenderingContext2D.prototype.writeText = function(text = "", textX = 0, te
var artistBrushWidth = textSize * 1.2
lineContext.drawImage(manaSymbolImageList[62], currentLineX, currentLineY - artistBrushWidth * 0.58, artistBrushWidth, artistBrushWidth * 13 / 21)
currentLineX += artistBrushWidth * 1.1
} else if (possibleCodeLower.includes("fontcolor")) {
} else if (possibleCodeLower == "oldartistbrush") {
var artistBrushWidth = textSize * 2.4
if (lineContext.fillStyle == "#ffffff" || lineContext.fillStyle == "white") {
lineContext.drawImage(manaSymbolImageList[64], currentLineX, currentLineY - artistBrushWidth * 13 / 63, artistBrushWidth, artistBrushWidth * 13 / 63);
} else {
lineContext.drawImage(manaSymbolImageList[65], currentLineX, currentLineY - artistBrushWidth * 13 / 63, artistBrushWidth, artistBrushWidth * 13 / 63);
}
currentLineX += artistBrushWidth * 1.1
} else if (possibleCodeLower.includes("fontcolor")) {
lineContext.fillStyle = possibleCodeLower.slice(9, possibleCodeLower.length)
} else if (possibleCodeLower.includes("font")) {
textFont = possibleCodeLower.slice(5, possibleCodeLower.length)
@@ -663,14 +675,19 @@ function loadManaSymbolImages() {
//Draws a mana cost
CanvasRenderingContext2D.prototype.drawManaCost = function(text, symbolsX, symbolsY, diameter = 50, distance = -50, direction = "horizontal", version = "m15") {
var splitManaCost = text.toLowerCase().replace(/{/g, " ").replace(/}/g, " ").split("/").join("").split(" ")
if (version == "future") {
splitManaCost.reverse();
}
var currentSymbolIndex = 0
var currentX = symbolsX
var currentY = symbolsY
var realManaCostIndex = 0;
for (var i = splitManaCost.length - 1; i >= 0; i --) {
if (manaSymbolCodeList.includes(splitManaCost[i])) {
if (Array.isArray(direction) && i < direction.length) {
currentX = direction[i][0]
currentY = direction[i][1]
// console.log(realManaCostIndex, splitManaCost[i])
if (Array.isArray(direction) && realManaCostIndex < direction.length) {
currentX = direction[realManaCostIndex][0]
currentY = direction[realManaCostIndex][1]
}
if (version == "m15") {
this.fillStyle = "black"
@@ -680,12 +697,21 @@ CanvasRenderingContext2D.prototype.drawManaCost = function(text, symbolsX, symbo
this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter)
} else if (version == "seventh") {
this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter)
} else if (version == "future") {
if (realManaCostIndex < direction.length) {
if (window.version.futureManaSymbolNameList.includes(splitManaCost[i]) && window.version.futureManaSymbolImageList[window.version.futureManaSymbolNameList.indexOf(splitManaCost[i])]) {
this.drawImage(window.version.futureManaSymbolImageList[window.version.futureManaSymbolNameList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter)
} else {
this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter)
}
}
}
if (direction == "horizontal") {
currentX += distance
} else if (direction == "vertical") {
currentY += distance
}
}
realManaCostIndex += 1;
}
}
}
@@ -1040,7 +1066,7 @@ function inputCardNameNumberTextImport(index) {
document.getElementById("inputCardArtName").value = beforeAfter(importCardTextResponse, '"name":"', '",');
document.getElementById("inputSetCode").value = beforeAfter(importCardTextResponse, '"set":"', '",');
document.getElementById("inputSetRarity").value = beforeAfter(importCardTextResponse, '"rarity":"', '",')[0];
whiteToTransparent(setSymbol, "https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=" + document.getElementById("inputSetCode").value + "&size=large&rarity=" + document.getElementById("inputSetRarity").value);
autocrop(setSymbol, "https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=" + document.getElementById("inputSetCode").value + "&size=large&rarity=" + document.getElementById("inputSetRarity").value);
inputCardArtName(beforeAfter(importCardTextResponse, '"name":"', '",'));
}
function importText(text, target) {

66
data/versions/future.js Normal file
View File

@@ -0,0 +1,66 @@
//============================================//
// Card Conjurer, by Kyle Burton //
//============================================//
if (version.currentVersion != "future") {
//Name, text, x, y, width, height, font, size, color, other
version.textList = [
["Title", "", scale(131), scale(87), scale(550), 0, "matrixb", 45, "white", "oneLine=true"],
["Type", "", scale(91), scale(615), scale(557), 0, "matrixb", 37, "white", "oneLine=true"],
["Rules Text", "", scale(76), scale(650), scale(594), scale(278), "mplantin", 36, "black", "lineSpace=0.97"],
["Power Toughness", "", scale(574), scale(960), scale(106), 0, "mplantin", 42, "white", "oneLine=true,textAlign='center'"]
];
if (!version.addedFuture) {
version.addedFuture = true;
version.futureManaSymbolNameList = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "w", "u", "b", "r", "g", "wu", "wb", "ub", "ur", "br", "bg", "rg", "rw", "gw", "gu", "x"]
version.futureManaSymbolImageList = []
for (var i = 0; i < version.futureManaSymbolNameList.length; i++) {
version.futureManaSymbolImageList[i] = new Image();
version.futureManaSymbolImageList[i].src = "data/images/manaSymbols/future/" + i + ".png"
}
}
}
version.currentVersion = "future"
version.artX = scale(64)
version.artY = scale(88)
version.artWidth = scale(648)
version.artHeight = scale(608)
version.setSymbolRight = scale(678)
version.setSymbolVertical = scale(618)
version.setSymbolWidth = scale(40)
version.setSymbolHeight = scale(40)
version.bottomInfoFunction = "futureBottomInfo"
version.manaCostX = scale(91)
version.manaCostY = scale(140)
version.manaCostDiameter = scale(59)
version.manaCostDistance = scale(-38)
version.manaCostDirection = [[91, 140], [61, 207], [46, 281], [46, 356], [59, 437], [106, 512]];
version.manaCostVersion = "future";
version.watermarkWidth = scale(520)
version.watermarkHeight = scale(250)
version.watermarkY = scale(800)
version.masksToAdd = ["Border Future", "Icon Future Creature", "Icon Future Instant", "Icon Future Sorcery", "Icon Future Enchantment", "Icon Future Artifact", "Icon Future Land", "Icon Future Multi"];
filterFramePicker("frameClassFuture");
function futureBottomInfo() {
var colorToFill = "white"
var copyrightShift = 0;
for (var i = 0; i < cardMaster.children.length; i++) {
if (parseInt(cardMaster.children[i].id.replace("frameIndex", "")) >= 0 && frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].image.src.includes("PT") && !frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].framePickerClasses.includes("frameClassCustom")) {
copyrightShift = scale(-124);
}
if (parseInt(cardMaster.children[i].id.replace("frameIndex", "")) >= 0 && !frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].framePickerClasses.includes("frameClassCustom")) {
var frameColorSource = frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].image.src;
if (frameColorSource.includes("WFull") || frameColorSource.includes("AFull") || frameColorSource.includes("CFull")) {
colorToFill = "black";
}
}
}
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
bottomInfoContext.writeText("{right}{oldArtistBrush}" + document.getElementById("inputInfoArtist").value, scale(70), scale(952), scale(604) + copyrightShift, 0, "matrixb", scale(26), colorToFill, "oneLine=true")
bottomInfoContext.writeText("\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast *Not For Sale*", scale(70), scale(975), scale(604) + copyrightShift, 0, "mplantin", scale(18), colorToFill, "oneLine=true,textAlign='right'")
cardImageUpdated()
}
setTimeout(futureBottomInfo, 250)
finishChangingVersion("data/images/future/futureCSV.csv")

View File

@@ -89,9 +89,9 @@
<div class="tabContent mainEditor" id="set">
<div class="autoGrid">
<input type="file" class="input file" accept="image/*" onchange="uploadImage(event, setSymbol)" placeholder="Via File Upload">
<input type="text" class="input text" placeholder="Via URL" onchange="whiteToTransparent(setSymbol, 'https://cors-anywhere.herokuapp.com/' + this.value)">
<input type="text" class="input text" id="inputSetCode" placeholder="Via Set Code" onchange="whiteToTransparent(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + this.value + '&size=large&rarity=' + document.getElementById('inputSetRarity').value)">
<input type="text" class="input text" id="inputSetRarity" placeholder="Rarity" onchange="whiteToTransparent(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + document.getElementById('inputSetCode').value + '&size=large&rarity=' + this.value)">
<input type="text" class="input text" placeholder="Via URL" onchange="autocrop(setSymbol, 'https://cors-anywhere.herokuapp.com/' + this.value)">
<input type="text" class="input text" id="inputSetCode" placeholder="Via Set Code" onchange="autocrop(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + this.value + '&size=large&rarity=' + document.getElementById('inputSetRarity').value)">
<input type="text" class="input text" id="inputSetRarity" placeholder="Rarity" onchange="autocrop(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + document.getElementById('inputSetCode').value + '&size=large&rarity=' + this.value)">
<button class="button" onclick="randomSet()">Random</button>
</div>
</div>
@@ -129,8 +129,9 @@
Click on one of the following buttons to load the described image frame set:
</div>
<button onclick="changeVersionTo('moreMasks')" class="button">More Masks</button>
<button onclick="changeVersionTo('planeswalker')" class="button">Planeswalker</button>
<button onclick="changeVersionTo('expedition')" class="button">Expeditions</button>
<button onclick="changeVersionTo('planeswalker')" class="button">Planeswalker</button>
<button onclick="changeVersionTo('future')" class="button">Future Shifted</button>
<button onclick="changeVersionTo('unhinged')" class="button">Unhinged Basics</button>
<button onclick="changeVersionTo('seventh')" class="button">Seventh Edition</button>
<button onclick="changeVersionTo('m15extras')" class="button">M15 Extras</button>