mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 13:21:41 -05:00
maps
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
var mask = document.createElement("canvas")
|
||||
var maskContext = mask.getContext("2d")
|
||||
|
||||
function drawMask(img, x, y, width, height, imgMask, secondMask, arg) {
|
||||
function drawMask(img, x, y, width, height, targetContext, imgMask, secondMask, arg) {
|
||||
var context = targetContext
|
||||
mask.width = width
|
||||
mask.height = height
|
||||
maskContext.clearRect(0, 0, width, height)
|
||||
@@ -22,5 +23,5 @@ function drawMask(img, x, y, width, height, imgMask, secondMask, arg) {
|
||||
} else {
|
||||
maskContext.drawImage(img, 0, 0, width, height)
|
||||
}
|
||||
card.drawImage(mask, x, y, width, height)
|
||||
targetContext.drawImage(mask, x, y, width, height)
|
||||
}
|
Reference in New Issue
Block a user