forked from GithubMirrors/cardconjurer
		
	planar cards
This commit is contained in:
		| @@ -2,6 +2,7 @@ | |||||||
| //Sets the correct values to anything that may have been changed from an out of the ordinary border | //Sets the correct values to anything that may have been changed from an out of the ordinary border | ||||||
| var eighthInfo = false | var eighthInfo = false | ||||||
| var m15Info = false | var m15Info = false | ||||||
|  | var planechaseInfo = false | ||||||
| var legendaryBorder = false | var legendaryBorder = false | ||||||
| var nyxBorder = false | var nyxBorder = false | ||||||
| var miracleBorder = false | var miracleBorder = false | ||||||
|   | |||||||
| @@ -23,20 +23,8 @@ var textX = 124 | |||||||
| var textY = 535 | var textY = 535 | ||||||
| var textWidth = 925 | var textWidth = 925 | ||||||
| document.getElementById("textSize").value = 26 | document.getElementById("textSize").value = 26 | ||||||
| // //Power Toughness |  | ||||||
| // var ptFont = "39px belerenb" |  | ||||||
| // var ptFontSpacing = "0.3px" |  | ||||||
| // var ptTextX = 645 |  | ||||||
| // var ptTextY = 936 |  | ||||||
| // var ptX = 571 |  | ||||||
| // var ptY = 929 |  | ||||||
| // var ptWidth = 137 |  | ||||||
| // var ptHeight = 75 |  | ||||||
| //Bottom Info | //Bottom Info | ||||||
| var eighthInfo = false | var planechaseInfo = true | ||||||
| var eighthInfoY = 992 |  | ||||||
| var m15Info = true |  | ||||||
| var m15InfoY = 993 |  | ||||||
| //Set Symbol | //Set Symbol | ||||||
| var setSymbolY = 519 | var setSymbolY = 519 | ||||||
| var setSymbolRight = 814 | var setSymbolRight = 814 | ||||||
| @@ -66,3 +54,44 @@ transparentBorder = true | |||||||
| //With all the new values in place, the program will update it's border images | //With all the new values in place, the program will update it's border images | ||||||
| finishTemplate() | finishTemplate() | ||||||
| //Any special functions go at the bottom | //Any special functions go at the bottom | ||||||
|  | function bottomInfoPlanechase() { | ||||||
|  | 	card.textAlign = "left" | ||||||
|  | 	if (document.getElementById("checkboxArtistColor").checked == true) { | ||||||
|  | 		card.fillStyle = "black" | ||||||
|  | 	} else { | ||||||
|  | 		card.fillStyle = "white" | ||||||
|  | 	} | ||||||
|  | 	var bottomLineFirst = document.getElementById("inputNumber").value + " " + document.getElementById("inputSet").value + " \u00b7 " + document.getElementById("inputLanguage").value | ||||||
|  | 	var bottomLineSecond | ||||||
|  | 	var artistBrushShift = 0 | ||||||
|  | 	if (document.getElementById("inputInfo").value != "") { | ||||||
|  | 		bottomLineSecond = "CC \u2014 " + document.getElementById("inputInfo").value | ||||||
|  | 		if (bottomLineSecond == "CC \u2014 secretcode") { | ||||||
|  | 			var date = new Date() | ||||||
|  | 			var year = date.getFullYear() | ||||||
|  | 			bottomLineSecond = "\u2122 & \u00a9 " + year + " Wizards of the Coast" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	var artist = document.getElementById("inputArtist").value | ||||||
|  | 	//Artist | ||||||
|  | 	canvas.style.letterSpacing = "-0.2px" | ||||||
|  | 	card.font = "16px matrixbsc" | ||||||
|  | 	var artistLineWidth = (card.measureText(artist).width + 18) / 2 | ||||||
|  | 	drawMask(card.fillStyle, canvas.width / 2 - artistLineWidth, 706, 15, 10, card, imgArtistBrush, false, false) | ||||||
|  | 	card.fillText(artist, canvas.width / 2 - artistLineWidth + 18, 704) | ||||||
|  | 	//Left and Right side | ||||||
|  | 	canvas.style.letterSpacing = "0px" | ||||||
|  | 	card.font = "16px relaymedium" | ||||||
|  | 	var firstWidth = card.measureText(bottomLineFirst).width + 15 | ||||||
|  | 	canvas.style.letterSpacing = "-0.7px" | ||||||
|  | 	card.font = "13px mplantin" | ||||||
|  | 	var secondWidth = card.measureText(bottomLineSecond).width | ||||||
|  |  | ||||||
|  | 	canvas.style.letterSpacing = "0px" | ||||||
|  | 	card.font = "16px relaymedium" | ||||||
|  | 	card.fillText(bottomLineFirst, canvas.width / 2 - ((secondWidth + firstWidth) / 2) - 8, 717) | ||||||
|  |  | ||||||
|  | 	canvas.style.letterSpacing = "-0.7px" | ||||||
|  | 	card.font = "14px mplantin" | ||||||
|  | 	card.fillText(bottomLineSecond, canvas.width / 2 - ((secondWidth + firstWidth) / 2) + firstWidth - 8, 718) | ||||||
|  | } | ||||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.8 KiB | 
							
								
								
									
										18
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								index.html
									
									
									
									
									
								
							| @@ -1,7 +1,7 @@ | |||||||
| <!DOCTYPE html5> | <!DOCTYPE html5> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 	<title>Card Conjurer v1.3.4</title> | 	<title>Card Conjurer</title> | ||||||
| 	<script src="data/scripts/loadScript.js"></script> | 	<script src="data/scripts/loadScript.js"></script> | ||||||
| 	<script src="data/scripts/loadImage.js"></script> | 	<script src="data/scripts/loadImage.js"></script> | ||||||
| 	<script src="data/scripts/loadColors.js"></script> | 	<script src="data/scripts/loadColors.js"></script> | ||||||
| @@ -111,6 +111,8 @@ | |||||||
| 					Image | 					Image | ||||||
| 					<input type="file" accept="image/*" onchange="loadImage(event, imgArt, true)" id="inputPicture"></input> | 					<input type="file" accept="image/*" onchange="loadImage(event, imgArt, true)" id="inputPicture"></input> | ||||||
| 					<br/> | 					<br/> | ||||||
|  | 					<input type="text" placeholder="Or use a URL" onchange="imageURL(this, imgArt)"></input> | ||||||
|  | 					<br/> | ||||||
| 					Image Zoom | 					Image Zoom | ||||||
| 					<input id="imageSize" type="number" value="100" step="0.1"></input> | 					<input id="imageSize" type="number" value="100" step="0.1"></input> | ||||||
| 					<br/> | 					<br/> | ||||||
| @@ -159,6 +161,8 @@ | |||||||
| 					Custom Set Symbol | 					Custom Set Symbol | ||||||
| 					<input type="file" accept="image/*" onchange="loadImage(event, imgSetSymbol, true)" id="inputSetSymbol"></input> | 					<input type="file" accept="image/*" onchange="loadImage(event, imgSetSymbol, true)" id="inputSetSymbol"></input> | ||||||
| 					<br/> | 					<br/> | ||||||
|  | 					<input type="text" placeholder="Or use a URL" onchange="imageURL(this, imgSetSymbol)"></input> | ||||||
|  | 					<br/> | ||||||
| 					Scale Set Symbol | 					Scale Set Symbol | ||||||
| 					<input id="setSymbolSize" type="number" value="100" step="0.5"></input> | 					<input id="setSymbolSize" type="number" value="100" step="0.5"></input> | ||||||
| 					<br/><br/> | 					<br/><br/> | ||||||
| @@ -167,6 +171,8 @@ | |||||||
| 					<br/> | 					<br/> | ||||||
| 					<input type="file" accept="image/*" onchange="loadImage(event, imgWatermark, true)" id="inputWatermark"></input> | 					<input type="file" accept="image/*" onchange="loadImage(event, imgWatermark, true)" id="inputWatermark"></input> | ||||||
| 					<br/> | 					<br/> | ||||||
|  | 					<input type="text" placeholder="Or use a URL" onchange="imageURL(this, imgWatermark)"></input> | ||||||
|  | 					<br/> | ||||||
| 					Watermark Color | 					Watermark Color | ||||||
| 					<br/> | 					<br/> | ||||||
| 					<select id="watermarkColorSelection"> | 					<select id="watermarkColorSelection"> | ||||||
| @@ -519,9 +525,10 @@ function cardClock() { | |||||||
| 		//m15 and 8th edition have different info at the bottom of the cards and require completely different functions | 		//m15 and 8th edition have different info at the bottom of the cards and require completely different functions | ||||||
| 		if (m15Info == true) { | 		if (m15Info == true) { | ||||||
| 			bottomInfoM15() | 			bottomInfoM15() | ||||||
| 		} | 		} else if (eighthInfo == true) { | ||||||
| 		if (eighthInfo == true) { |  | ||||||
| 			bottomInfo8th() | 			bottomInfo8th() | ||||||
|  | 		}else if (planechaseInfo == true) { | ||||||
|  | 			bottomInfoPlanechase() | ||||||
| 		} | 		} | ||||||
| 		//A shiny foil overlay! | 		//A shiny foil overlay! | ||||||
| 		if(document.getElementById("checkboxFoil").checked == true) { | 		if(document.getElementById("checkboxFoil").checked == true) { | ||||||
| @@ -1102,6 +1109,11 @@ function loadSetSymbol() { | |||||||
| 	imgSetSymbol.src = "https://raw.githubusercontent.com/ImKyle4815/MTG-Set-Symbols/master/setSymbols/" + document.getElementById("setSymbolCode").value.toUpperCase() + "_" + document.getElementById("setSymbolRarity").value.toUpperCase() + ".png" | 	imgSetSymbol.src = "https://raw.githubusercontent.com/ImKyle4815/MTG-Set-Symbols/master/setSymbols/" + document.getElementById("setSymbolCode").value.toUpperCase() + "_" + document.getElementById("setSymbolRarity").value.toUpperCase() + ".png" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | //Loads an image from URL | ||||||
|  | function imageURL(input, URL) { | ||||||
|  | 	URL.src = input.value | ||||||
|  | } | ||||||
|  |  | ||||||
| //Best for last - downloads the image! | //Best for last - downloads the image! | ||||||
| function downloadCardImage(linkElement) { | function downloadCardImage(linkElement) { | ||||||
| 	var cardImageData = canvas.toDataURL() | 	var cardImageData = canvas.toDataURL() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kyle
					Kyle