mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
fix
This commit is contained in:
@@ -8,6 +8,17 @@ function initiate() {
|
|||||||
window.version = {}
|
window.version = {}
|
||||||
window.cardWidth = 744;
|
window.cardWidth = 744;
|
||||||
window.cardHeight = 1039;
|
window.cardHeight = 1039;
|
||||||
|
if (window.location.search != "") {
|
||||||
|
var parameters = window.location.search.replace('?', '').split('&');
|
||||||
|
for (var i = 0; i < parameters.length; i ++) {
|
||||||
|
var targetParameter = parameters[i].split('=');
|
||||||
|
if (targetParameter[0] == 'width') {
|
||||||
|
cardWidth = parseInt(targetParameter[1]);
|
||||||
|
} else if (targetParameter[0] == 'height') {
|
||||||
|
cardHeight = parseInt(targetParameter[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
window.whichTextIndex = 0;
|
window.whichTextIndex = 0;
|
||||||
window.frameList = new Array();
|
window.frameList = new Array();
|
||||||
window.maskNameList = [];
|
window.maskNameList = [];
|
||||||
|
@@ -4,13 +4,23 @@ var svgStroke = svg.children[1]
|
|||||||
var svgFill = svg.children[2]
|
var svgFill = svg.children[2]
|
||||||
svg.setAttribute('width', svgWidth);
|
svg.setAttribute('width', svgWidth);
|
||||||
svg.setAttribute('height', svgHeight);
|
svg.setAttribute('height', svgHeight);
|
||||||
fetchSVGData('rtr');
|
var imageType = 'svg';
|
||||||
|
var canvas = document.getElementById('displayCanvas');
|
||||||
|
canvas.width = svgWidth
|
||||||
|
canvas.height = svgHeight
|
||||||
|
var context = canvas.getContext('2d');
|
||||||
|
var setSymbolImage = new Image();
|
||||||
|
setSymbolImage.onload = drawSetSymbol;
|
||||||
|
var setSymbolPath = '';
|
||||||
|
fetchSVGData('https://raw.githubusercontent.com/andrewgioia/Keyrune/master/svg/rtr.svg');
|
||||||
|
|
||||||
function fetchSVGData(setCode) {
|
|
||||||
var url = 'https://raw.githubusercontent.com/andrewgioia/Keyrune/master/svg/' + setCode + '.svg';
|
function fetchSVGData(url) {
|
||||||
|
hideShow();
|
||||||
var xhttp = new XMLHttpRequest();
|
var xhttp = new XMLHttpRequest();
|
||||||
xhttp.onreadystatechange = function() {
|
xhttp.onreadystatechange = function() {
|
||||||
if (this.readyState == 4) {
|
if (this.readyState == 4 && xhttp.status != 404) {
|
||||||
|
imageType = 'svg'
|
||||||
setSymbolPath = xhttp.responseText.split('d="')[1].split('"></path>')[0];
|
setSymbolPath = xhttp.responseText.split('d="')[1].split('"></path>')[0];
|
||||||
svgStroke.setAttribute('d', setSymbolPath);
|
svgStroke.setAttribute('d', setSymbolPath);
|
||||||
svgFill.setAttribute('d', setSymbolPath);
|
svgFill.setAttribute('d', setSymbolPath);
|
||||||
@@ -30,35 +40,95 @@ function fetchSVGData(setCode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function decorateSVG() {
|
function decorateSVG() {
|
||||||
var setSymbolGradient = document.getElementById('inputSetSymbolRarity').value;
|
if (imageType == 'svg') {
|
||||||
var setSymbolStrokeColor = 'black';
|
var setSymbolGradient = document.getElementById('inputSetSymbolRarity').value;
|
||||||
if (setSymbolGradient == 'Common') {
|
var setSymbolStrokeColor = 'black';
|
||||||
setSymbolStrokeColor = 'white'
|
if (setSymbolGradient == 'Common') {
|
||||||
|
setSymbolStrokeColor = 'white'
|
||||||
|
}
|
||||||
|
svgStroke.setAttribute('stroke', setSymbolStrokeColor)
|
||||||
|
svgFill.setAttribute('fill', 'url(#grad' + setSymbolGradient + ')');
|
||||||
|
} else {
|
||||||
|
drawSetSymbol()
|
||||||
}
|
}
|
||||||
svgStroke.setAttribute('stroke', setSymbolStrokeColor)
|
|
||||||
svgFill.setAttribute('fill', 'url(#grad' + setSymbolGradient + ')');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadSetSymbolImage(linkElement) {
|
function downloadSetSymbolImage(linkElement) {
|
||||||
// var setSymbolDownload = cardFinalCanvas.toDataURL()
|
linkElement.download = 'setSymbol.' + imageType
|
||||||
// linkElement.href = setSymbolDownload
|
if (imageType == 'svg') {
|
||||||
var serializer = new XMLSerializer();
|
var serializer = new XMLSerializer();
|
||||||
var source = serializer.serializeToString(svg);
|
var source = serializer.serializeToString(svg);
|
||||||
|
|
||||||
//add name spaces.
|
//add name spaces.
|
||||||
if(!source.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)){
|
if(!source.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)){
|
||||||
source = source.replace(/^<svg/, '<svg xmlns="http://www.w3.org/2000/svg"');
|
source = source.replace(/^<svg/, '<svg xmlns="http://www.w3.org/2000/svg"');
|
||||||
|
}
|
||||||
|
if(!source.match(/^<svg[^>]+"http\:\/\/www\.w3\.org\/1999\/xlink"/)){
|
||||||
|
source = source.replace(/^<svg/, '<svg xmlns:xlink="http://www.w3.org/1999/xlink"');
|
||||||
|
}
|
||||||
|
|
||||||
|
//add xml declaration
|
||||||
|
source = '<?xml version="1.0" standalone="no"?>\r\n' + source;
|
||||||
|
|
||||||
|
//convert svg source to URI data scheme.
|
||||||
|
var url = "data:image/svg+xml;charset=utf-8,"+encodeURIComponent(source);
|
||||||
|
|
||||||
|
//set url value to a element's href attribute.
|
||||||
|
linkElement.href = url;
|
||||||
|
} else {
|
||||||
|
var setSymbolDownload = canvas.toDataURL();
|
||||||
|
linkElement.href = setSymbolDownload;
|
||||||
}
|
}
|
||||||
if(!source.match(/^<svg[^>]+"http\:\/\/www\.w3\.org\/1999\/xlink"/)){
|
|
||||||
source = source.replace(/^<svg/, '<svg xmlns:xlink="http://www.w3.org/1999/xlink"');
|
|
||||||
}
|
|
||||||
|
|
||||||
//add xml declaration
|
|
||||||
source = '<?xml version="1.0" standalone="no"?>\r\n' + source;
|
|
||||||
|
|
||||||
//convert svg source to URI data scheme.
|
|
||||||
var url = "data:image/svg+xml;charset=utf-8,"+encodeURIComponent(source);
|
|
||||||
|
|
||||||
//set url value to a element's href attribute.
|
|
||||||
linkElement.href = url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function uploadImage(event) {
|
||||||
|
var input = event.target;
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function() {
|
||||||
|
imageType = 'png';
|
||||||
|
hideShow();
|
||||||
|
setSymbolImage.src = reader.result;
|
||||||
|
}
|
||||||
|
reader.readAsDataURL(input.files[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawSetSymbol() {
|
||||||
|
var scaleAmount;
|
||||||
|
if (setSymbolImage.width > setSymbolImage.height) {
|
||||||
|
scaleAmount = setSymbolWidth / setSymbolImage.width;
|
||||||
|
} else {
|
||||||
|
scaleAmount = setSymbolHeight / setSymbolImage.height;
|
||||||
|
}
|
||||||
|
context.globalCompositeOperation = 'source-over';
|
||||||
|
context.clearRect(0, 0, svgWidth, svgHeight);
|
||||||
|
var x1 = (svgWidth - setSymbolImage.width * scaleAmount) / 2, y1 = (svgHeight - setSymbolImage.height * scaleAmount) / 2, x2 = x1 + setSymbolImage.width * scaleAmount, y2 = y1 + setSymbolImage.height * scaleAmount;
|
||||||
|
context.drawImage(setSymbolImage, x1, y1, x2 - x1, y2 - y1);
|
||||||
|
context.globalCompositeOperation = 'source-in';
|
||||||
|
var gradient = context.createLinearGradient(x1, y1, x2, y1);
|
||||||
|
var gradientColors = document.getElementById('grad' + document.getElementById('inputSetSymbolRarity').value).innerHTML.split('stop-color:');
|
||||||
|
gradient.addColorStop(0, gradientColors[1].split(';')[0]);
|
||||||
|
gradient.addColorStop(0.5, gradientColors[2].split(';')[0]);
|
||||||
|
gradient.addColorStop(1, gradientColors[3].split(';')[0]);
|
||||||
|
context.fillStyle = gradient;
|
||||||
|
context.fillRect(x1, y1, x2 - x1, y2 - y1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideShow() {
|
||||||
|
if (imageType == 'svg') {
|
||||||
|
if (svg.classList.contains('hidden')) {
|
||||||
|
svg.classList.remove('hidden');
|
||||||
|
}
|
||||||
|
if (!canvas.classList.contains('hidden')) {
|
||||||
|
canvas.classList.add('hidden');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (canvas.classList.contains('hidden')) {
|
||||||
|
canvas.classList.remove('hidden');
|
||||||
|
}
|
||||||
|
if (!svg.classList.contains('hidden')) {
|
||||||
|
svg.classList.add('hidden');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
if (version.currentVersion != "expedition") {
|
if (version.currentVersion != "expedition") {
|
||||||
//Name, text, x, y, width, height, font, size, color, other, alternative-function
|
//Name, text, x, y, width, height, font, size, color, other, alternative-function
|
||||||
version.textList = [
|
version.textList = [
|
||||||
["Title", "", scale(64), scale(77), scale(630), 0, "belerenb", 37, "black", "oneLine=true"],
|
["Title", "", scale(64), scale(77), scale(630), 0, "belerenb", scale(37), "black", "oneLine=true"],
|
||||||
["Type", "", scale(64), scale(875), scale(630), 0, "belerenb", 37, "black", "oneLine=true"],
|
["Type", "", scale(64), scale(875), scale(630), 0, "belerenb", scale(37), "black", "oneLine=true"],
|
||||||
["Rules Text", "", scale(64), scale(729), scale(616), scale(0), "mplantin", 38, "black", "lineSpace=0.97"],
|
["Rules Text", "", scale(64), scale(729), scale(616), 0, "mplantin", scale(38), "black", "lineSpace=0.97"],
|
||||||
["Power Toughness", "", scale(587), scale(958), scale(110), 0, "belerenb", 38, "black", "oneLine=true,textAlign='center'"]
|
["Power Toughness", "", scale(587), scale(958), scale(110), 0, "belerenb", scale(38), "black", "oneLine=true,textAlign='center'"]
|
||||||
]
|
]
|
||||||
version.frameIndexToInsert = 7;
|
version.frameIndexToInsert = 7;
|
||||||
}
|
}
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
if (version.currentVersion != "future") {
|
if (version.currentVersion != "future") {
|
||||||
//Name, text, x, y, width, height, font, size, color, other
|
//Name, text, x, y, width, height, font, size, color, other
|
||||||
version.textList = [
|
version.textList = [
|
||||||
["Title", "", scale(131), scale(87), scale(550), 0, "matrixb", 45, "white", "oneLine=true"],
|
["Title", "", scale(131), scale(87), scale(550), 0, "matrixb", scale(45), "white", "oneLine=true"],
|
||||||
["Type", "", scale(91), scale(615), scale(557), 0, "matrixb", 37, "white", "oneLine=true"],
|
["Type", "", scale(91), scale(615), scale(557), 0, "matrixb", scale(37), "white", "oneLine=true"],
|
||||||
["Rules Text", "", scale(76), scale(650), scale(594), scale(278), "mplantin", 36, "black", "lineSpace=0.97"],
|
["Rules Text", "", scale(76), scale(650), scale(594), scale(278), "mplantin", scale(36), "black", "lineSpace=0.97"],
|
||||||
["Power Toughness", "", scale(574), scale(960), scale(106), 0, "mplantin", 42, "white", "oneLine=true,textAlign='center'"]
|
["Power Toughness", "", scale(574), scale(960), scale(106), 0, "mplantin", scale(42), "white", "oneLine=true,textAlign='center'"]
|
||||||
];
|
];
|
||||||
if (!version.addedFuture) {
|
if (!version.addedFuture) {
|
||||||
version.addedFuture = true;
|
version.addedFuture = true;
|
||||||
@@ -34,7 +34,7 @@ version.manaCostX = scale(91)
|
|||||||
version.manaCostY = scale(140)
|
version.manaCostY = scale(140)
|
||||||
version.manaCostDiameter = scale(59)
|
version.manaCostDiameter = scale(59)
|
||||||
version.manaCostDistance = scale(-38)
|
version.manaCostDistance = scale(-38)
|
||||||
version.manaCostDirection = [[91, 140], [61, 207], [46, 281], [46, 356], [59, 437], [106, 512]];
|
version.manaCostDirection = [[scale(91), scale(140)], [scale(61), scale(207)], [scale(46), scale(281)], [scale(46), scale(356)], [scale(59), scale(437)], [scale(106), scale(512)]];
|
||||||
version.manaCostVersion = "future";
|
version.manaCostVersion = "future";
|
||||||
version.watermarkWidth = scale(520)
|
version.watermarkWidth = scale(520)
|
||||||
version.watermarkHeight = scale(250)
|
version.watermarkHeight = scale(250)
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
if (version.currentVersion != "m15") {
|
if (version.currentVersion != "m15") {
|
||||||
//Name, text, x, y, width, height, font, size, color, other
|
//Name, text, x, y, width, height, font, size, color, other
|
||||||
version.textList = [
|
version.textList = [
|
||||||
["Title", "", scale(64), scale(83), scale(630), 0, "belerenb", 37, "black", "oneLine=true"],
|
["Title", "", scale(64), scale(83), scale(630), 0, "belerenb", scale(37), "black", "oneLine=true"],
|
||||||
["Type", "", scale(64), scale(615), scale(630), 0, "belerenb", 33, "black", "oneLine=true"],
|
["Type", "", scale(64), scale(615), scale(630), 0, "belerenb", scale(33), "black", "oneLine=true"],
|
||||||
["Rules Text", "", scale(64), scale(662), scale(616), scale(292), "mplantin", 38, "black", "lineSpace=0.97"],
|
["Rules Text", "", scale(64), scale(662), scale(616), scale(292), "mplantin", scale(38), "black", "lineSpace=0.97"],
|
||||||
["Power Toughness", "", scale(587), scale(958), scale(110), 0, "belerenb", 38, "black", "oneLine=true,textAlign='center'"]/*,
|
["Power Toughness", "", scale(587), scale(958), scale(110), 0, "belerenb", scale(38), "black", "oneLine=true,textAlign='center'"]/*,
|
||||||
["Flip PT", "", scale(588), scale(902), scale(100), 0, "belerenb", 28, "#666", "oneLine=true,textAlign='right'"]*/
|
["Flip PT", "", scale(588), scale(902), scale(100), 0, "belerenb", 28, "#666", "oneLine=true,textAlign='right'"]*/
|
||||||
]
|
]
|
||||||
version.frameIndexToInsert = 5;
|
version.frameIndexToInsert = 5;
|
||||||
@@ -28,10 +28,6 @@ version.manaCostDiameter = scale(34)
|
|||||||
version.manaCostDistance = scale(-38)
|
version.manaCostDistance = scale(-38)
|
||||||
version.manaCostDirection = "horizontal"
|
version.manaCostDirection = "horizontal"
|
||||||
version.manaCostVersion = "m15"
|
version.manaCostVersion = "m15"
|
||||||
// version.rareStampX = scale(340)
|
|
||||||
// version.rareStampY = scale(965)
|
|
||||||
// version.rareStampWidth = scale(70)
|
|
||||||
// version.rareStampHeight = scale(38)
|
|
||||||
version.watermarkWidth = scale(520)
|
version.watermarkWidth = scale(520)
|
||||||
version.watermarkHeight = scale(250)
|
version.watermarkHeight = scale(250)
|
||||||
version.watermarkY = scale(800)
|
version.watermarkY = scale(800)
|
||||||
@@ -42,15 +38,15 @@ filterFramePicker("frameClassRegular");
|
|||||||
function m15BottomInfo() {
|
function m15BottomInfo() {
|
||||||
//remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values!
|
//remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values!
|
||||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||||
bottomInfoContext.writeText(document.getElementById("inputInfoNumber").value + " " + document.getElementById("inputInfoRarity").value + " *Not For Sale*", scale(46), scale(980), scale(329), 0, "gothammedium", 17, "white", "oneLine=true")
|
bottomInfoContext.writeText(document.getElementById("inputInfoNumber").value + " " + document.getElementById("inputInfoRarity").value + " *Not For Sale*", scale(46), scale(980), scale(329), 0, "gothammedium", scale(17), "white", "oneLine=true")
|
||||||
bottomInfoContext.writeText(document.getElementById("inputInfoSet").value + " \u2022 " + document.getElementById("inputInfoLanguage").value + " {font:belerenbsc}{artistBrush}{fontsize1}" + document.getElementById("inputInfoArtist").value, scale(46), scale(1000), scale(375), 0, "gothammedium", 17, "white", "oneLine=true")
|
bottomInfoContext.writeText(document.getElementById("inputInfoSet").value + " \u2022 " + document.getElementById("inputInfoLanguage").value + " {font:belerenbsc}{artistBrush}{fontsize1}" + document.getElementById("inputInfoArtist").value, scale(46), scale(1000), scale(375), 0, "gothammedium", scale(17), "white", "oneLine=true")
|
||||||
var copyrightShift = 0;
|
var copyrightShift = 0;
|
||||||
for (var i = 0; i < cardMaster.children.length; i++) {
|
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")) {
|
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 = 19;
|
copyrightShift = scale(19);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bottomInfoContext.writeText("\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast", cardWidth / 2, scale(980 + copyrightShift), scale(322), 0, "mplantin", 17, "white", "oneLine=true,textAlign='right'")
|
bottomInfoContext.writeText("\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast", cardWidth / 2, scale(980 + copyrightShift), scale(322), 0, "mplantin", scale(17), "white", "oneLine=true,textAlign='right'")
|
||||||
cardImageUpdated()
|
cardImageUpdated()
|
||||||
}
|
}
|
||||||
// setTimeout(m15BottomInfo, 250)
|
// setTimeout(m15BottomInfo, 250)
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
if (version.currentVersion != "m15") {
|
if (version.currentVersion != "m15") {
|
||||||
//Name, text, x, y, width, height, font, size, color, other
|
//Name, text, x, y, width, height, font, size, color, other
|
||||||
version.textList = [
|
version.textList = [
|
||||||
["Title", "", scale(64), scale(83), scale(630), 0, "belerenb", 37, "black", "oneLine=true"],
|
["Title", "", scale(64), scale(83), scale(630), 0, "belerenb", scale(37), "black", "oneLine=true"],
|
||||||
["Type", "", scale(64), scale(615), scale(630), 0, "belerenb", 33, "black", "oneLine=true"],
|
["Type", "", scale(64), scale(615), scale(630), 0, "belerenb", scale(33), "black", "oneLine=true"],
|
||||||
["Rules Text", "", scale(64), scale(662), scale(616), scale(292), "mplantin", 38, "black", "lineSpace=0.97"],
|
["Rules Text", "", scale(64), scale(662), scale(616), scale(292), "mplantin", scale(38), "black", "lineSpace=0.97"],
|
||||||
["Power Toughness", "", scale(587), scale(958), scale(110), 0, "belerenb", 38, "black", "oneLine=true,textAlign='center'"]/*,
|
["Power Toughness", "", scale(587), scale(958), scale(110), 0, "belerenb", scale(38), "black", "oneLine=true,textAlign='center'"]/*,
|
||||||
["Flip PT", "", scale(588), scale(902), scale(100), 0, "belerenb", 28, "#666", "oneLine=true,textAlign='right'"]*/
|
["Flip PT", "", scale(588), scale(902), scale(100), 0, "belerenb", 28, "#666", "oneLine=true,textAlign='right'"]*/
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ filterFramePicker("frameClassPlaneswalker")
|
|||||||
function m15PlaneswalkerBottomInfo() { //remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values!
|
function m15PlaneswalkerBottomInfo() { //remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values!
|
||||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||||
bottomInfoContext.writeText(document.getElementById("inputInfoNumber").value + " " + document.getElementById("inputInfoRarity").value + " *Not For Sale*", scale(46), scale(982), scale(329), 0, "gothammedium", scale(17), "white", "oneLine=true")
|
bottomInfoContext.writeText(document.getElementById("inputInfoNumber").value + " " + document.getElementById("inputInfoRarity").value + " *Not For Sale*", scale(46), scale(982), scale(329), 0, "gothammedium", scale(17), "white", "oneLine=true")
|
||||||
bottomInfoContext.writeText(document.getElementById("inputInfoSet").value + " \u2022 " + document.getElementById("inputInfoLanguage").value + " {font:belerenbsc}{artistBrush}{fontsize1}" + document.getElementById("inputInfoArtist").value, scale(46), scale(1002), scale(375), 0, "gothammedium", 17, "white", "oneLine=true")
|
bottomInfoContext.writeText(document.getElementById("inputInfoSet").value + " \u2022 " + document.getElementById("inputInfoLanguage").value + " {font:belerenbsc}{artistBrush}{fontsize1}" + document.getElementById("inputInfoArtist").value, scale(46), scale(1002), scale(375), 0, "gothammedium", scale(17), "white", "oneLine=true")
|
||||||
bottomInfoContext.writeText("\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast", cardWidth / 2, scale(1001), scale(322), 0, "mplantin", scale(17), "white", "oneLine=true,textAlign='right'")
|
bottomInfoContext.writeText("\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast", cardWidth / 2, scale(1001), scale(322), 0, "mplantin", scale(17), "white", "oneLine=true,textAlign='right'")
|
||||||
cardImageUpdated()
|
cardImageUpdated()
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ function planeswalkerTextFunction() {
|
|||||||
planeswalkerContext.drawImage(maskList[maskNameList.indexOf("Rules Text Planeswalker")], 0, 0, cardWidth, cardHeight)
|
planeswalkerContext.drawImage(maskList[maskNameList.indexOf("Rules Text Planeswalker")], 0, 0, cardWidth, cardHeight)
|
||||||
planeswalkerContext.globalCompositeOperation = "source-over"
|
planeswalkerContext.globalCompositeOperation = "source-over"
|
||||||
planeswalkerContext.fillStyle = "white"
|
planeswalkerContext.fillStyle = "white"
|
||||||
planeswalkerContext.font = "30px belerenbsc"
|
planeswalkerContext.font = scale(30) + "px belerenbsc"
|
||||||
planeswalkerContext.textAlign = "center"
|
planeswalkerContext.textAlign = "center"
|
||||||
for (var i = 1; i < planeswalkerAbilityCount + 1; i++) {
|
for (var i = 1; i < planeswalkerAbilityCount + 1; i++) {
|
||||||
var planeswalkerIconValue = document.getElementById("inputPlaneswalker" + i + "Icon").value
|
var planeswalkerIconValue = document.getElementById("inputPlaneswalker" + i + "Icon").value
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
if (version.currentVersion != "seventh") {
|
if (version.currentVersion != "seventh") {
|
||||||
//Name, text, x, y, width, height, font, size, color, other
|
//Name, text, x, y, width, height, font, size, color, other
|
||||||
version.textList = [
|
version.textList = [
|
||||||
["Title", "", scale(82), scale(70), scale(630), 0, "goudymedieval", 42, "white", "oneLine=true,shadow=2"],
|
["Title", "", scale(82), scale(70), scale(630), 0, "goudymedieval", scale(42), "white", "oneLine=true,shadow=2"],
|
||||||
["Type", "", scale(82), scale(600), scale(630), 0, "mplantin", 33, "white", "oneLine=true,shadow=2"],
|
["Type", "", scale(82), scale(600), scale(630), 0, "mplantin", scale(33), "white", "oneLine=true,shadow=2"],
|
||||||
["Rules Text", "", scale(97), scale(630), scale(554), scale(292), "mplantin", 36, "black", "lineSpace=0.97"],
|
["Rules Text", "", scale(97), scale(630), scale(554), scale(292), "mplantin", scale(36), "black", "lineSpace=0.97"],
|
||||||
["Power Toughness", "", scale(592), scale(959), scale(110), 0, "mplantin", 47, "white", "oneLine=true,textAlign='center',shadow=2"]
|
["Power Toughness", "", scale(592), scale(959), scale(110), 0, "mplantin", scale(47), "white", "oneLine=true,textAlign='center',shadow=2"]
|
||||||
];
|
];
|
||||||
version.frameIndexToInsert = 6;
|
version.frameIndexToInsert = 6;
|
||||||
}
|
}
|
||||||
@@ -37,8 +37,8 @@ filterFramePicker("frameClassSeventh");
|
|||||||
function seventhBottomInfo() {
|
function seventhBottomInfo() {
|
||||||
//remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values!
|
//remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values!
|
||||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||||
bottomInfoContext.writeText("{center}{shadow2}Illus: " + document.getElementById("inputInfoArtist").value, scale(46), scale(948), scale(651), 0, "mplantin", 29, "white", "oneLine=true")
|
bottomInfoContext.writeText("{center}{shadow2}Illus: " + document.getElementById("inputInfoArtist").value, scale(46), scale(948), scale(651), 0, "mplantin", scale(29), "white", "oneLine=true")
|
||||||
bottomInfoContext.writeText("{center}\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast *Not For Sale*", scale(46), scale(972), scale(651), 0, "mplantin", 18, "white", "oneLine=true,textAlign='right'")
|
bottomInfoContext.writeText("{center}\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast *Not For Sale*", scale(46), scale(972), scale(651), 0, "mplantin", scale(18), "white", "oneLine=true,textAlign='right'")
|
||||||
cardImageUpdated()
|
cardImageUpdated()
|
||||||
}
|
}
|
||||||
setTimeout(seventhBottomInfo, 250)
|
setTimeout(seventhBottomInfo, 250)
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
if (version.currentVersion != "unhinged") {
|
if (version.currentVersion != "unhinged") {
|
||||||
//Name, text, x, y, width, height, font, size, color, other
|
//Name, text, x, y, width, height, font, size, color, other
|
||||||
version.textList = [
|
version.textList = [
|
||||||
["Title", "", scale(280), scale(56), scale(174), 0, "belerenb", 37, "black", "oneLine=true,textAlign='center'"]
|
["Title", "", scale(280), scale(56), scale(174), 0, "belerenb", scale(37), "black", "oneLine=true,textAlign='center'"]
|
||||||
]
|
]
|
||||||
version.frameIndexToInsert = 4;
|
version.frameIndexToInsert = 4;
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,12 @@
|
|||||||
<link rel="stylesheet" href="data/site/styles.css">
|
<link rel="stylesheet" href="data/site/styles.css">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style>
|
||||||
|
canvas {
|
||||||
|
width: 500px;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="mainDiv">
|
<div class="mainDiv">
|
||||||
@@ -45,10 +51,11 @@
|
|||||||
<path stroke-width="2" stroke-linejoin="arcs"></path>
|
<path stroke-width="2" stroke-linejoin="arcs"></path>
|
||||||
<path></path>
|
<path></path>
|
||||||
</svg>
|
</svg>
|
||||||
|
<canvas id="displayCanvas">
|
||||||
</div>
|
</div>
|
||||||
<div class="cardMenu">
|
<div class="cardMenu">
|
||||||
Enter a set code and select a rarity:
|
Enter a set code and select a rarity:
|
||||||
<input type="text" class="input text" value="rtr" onchange="fetchSVGData(this.value)" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
|
<input type="text" class="input text" value="rtr" onchange="fetchSVGData('https://raw.githubusercontent.com/andrewgioia/Keyrune/master/svg/' + this.value + '.svg')" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
|
||||||
<select class="select" id="inputSetSymbolRarity" onchange="decorateSVG()">
|
<select class="select" id="inputSetSymbolRarity" onchange="decorateSVG()">
|
||||||
<option>Common</option>
|
<option>Common</option>
|
||||||
<option>Uncommon</option>
|
<option>Uncommon</option>
|
||||||
@@ -56,6 +63,8 @@
|
|||||||
<option>Mythic</option>
|
<option>Mythic</option>
|
||||||
<option>Timeshifted</option>
|
<option>Timeshifted</option>
|
||||||
</select>
|
</select>
|
||||||
|
Or upload your own image/svg:
|
||||||
|
<input type="file" class="input file" accept="image/*" onchange="uploadImage(event)" placeholder="Via File Upload">
|
||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="download">
|
<div class="download">
|
||||||
|
Reference in New Issue
Block a user