Fixed art

This commit is contained in:
Kyle
2018-10-15 09:01:48 -07:00
parent ed3a4605e5
commit 1725693dc0
2 changed files with 6 additions and 2 deletions

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -400,7 +400,7 @@ for (i = 0; i < dynamicImageList.length; i ++) {
window[imgName] = new Image() window[imgName] = new Image()
} }
//Load static images //Load static images
var staticImageList = ["artistBrush", "foil", "stampGradient", "multiGradient", "rareStamp", "cardMask"] var staticImageList = ["artistBrush", "foil", "stampGradient", "multiGradient", "rareStamp", "cardMask", "artMask"]
for (i = 0; i < staticImageList.length; i ++) { for (i = 0; i < staticImageList.length; i ++) {
var imgName = "img" + staticImageList[i].charAt(0).toUpperCase() + staticImageList[i].slice(1) var imgName = "img" + staticImageList[i].charAt(0).toUpperCase() + staticImageList[i].slice(1)
window[imgName] = new Image() window[imgName] = new Image()
@@ -432,6 +432,7 @@ setInterval(function() {
card.globalCompositeOperation = "source-atop" card.globalCompositeOperation = "source-atop"
//These functions draw everything //These functions draw everything
drawPicture() drawPicture()
drawMask(document.getElementById("inputColor").value, 0, 0, canvas.width, canvas.height, imgCardMask, imgArtMask, false)
drawBorder() drawBorder()
drawSetSymbol() drawSetSymbol()
drawManaCost() drawManaCost()
@@ -499,7 +500,10 @@ function drawPicture() {
var imageScale = document.getElementById("imageSize").value * 0.01 var imageScale = document.getElementById("imageSize").value * 0.01
var imageLeftShift = parseInt(document.getElementById("imageLeft").value) var imageLeftShift = parseInt(document.getElementById("imageLeft").value)
var imageUpShift = parseInt(document.getElementById("imageUp").value) var imageUpShift = parseInt(document.getElementById("imageUp").value)
card.drawImage(imgArt, 58 - imageLeftShift, 119 - imageUpShift, imgArt.width * imageScale, imgArt.height * imageScale) if (imgArt.width > 0) {
//drawMask(imgArt, 58 - imageLeftShift, 118 - imageUpShift, imgArt.width * imageScale, imgArt.height * imageScale, imgArtMask, false, false)
}
card.drawImage(imgArt, 58 - imageLeftShift, 118 - imageUpShift, imgArt.width * imageScale, imgArt.height * imageScale)
} }
//Draw Border //Draw Border
function drawBorder() { function drawBorder() {