fixes
@@ -130,6 +130,9 @@
|
||||
<input type="number" value="100" step="0.1" min="0" id="inputCardArtZoom" oninput="cardArtUpdated()">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
To hide the art, set the Zoom value to 0.
|
||||
</div>
|
||||
</div>
|
||||
<div id='collectorTab' class='hidden'>
|
||||
<div>
|
||||
@@ -158,6 +161,9 @@
|
||||
<input type="number" value="100" step="0.1" min="0" id="inputSetSymbolZoom" oninput="setSymbol.onload()">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
To hide the set symbol, set the Zoom value to 0.
|
||||
</div>
|
||||
</div>
|
||||
<div id='watermarkTab' class='hidden'>
|
||||
<div class="autoGrid">
|
||||
|
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameA.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameB.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameG.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameL.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameM.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameR.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameU.png
Normal file
After Width: | Height: | Size: 825 KiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameV.png
Normal file
After Width: | Height: | Size: 999 KiB |
BIN
data/images/cardImages/m15/boxTopper/m15BoxTopperFrameW.png
Normal file
After Width: | Height: | Size: 1009 KiB |
BIN
data/images/cardImages/m15/m21/m15M21Fire.png
Normal file
After Width: | Height: | Size: 522 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 49 KiB |
@@ -61,6 +61,17 @@ function importSavedCard(localStorageKey = document.getElementById('inputCardToI
|
||||
if (localStorageKey) {
|
||||
selectedCardKey = localStorageKey
|
||||
importedCard = JSON.parse(localStorage.getItem(localStorageKey))
|
||||
//Skip trackers
|
||||
skipLoadTextList = 0
|
||||
skipResizeCardArt = 1
|
||||
if (importedCard.version != currentVersion) {
|
||||
skipLoadTextList += 1
|
||||
skipResizeCardArt += 1
|
||||
if (importedCard.version.split('/')[1] != 'version') {
|
||||
skipLoadTextList += 1
|
||||
skipResizeCardArt += 1
|
||||
}
|
||||
}
|
||||
//Masks
|
||||
loadMaskImages(importedCard.maskList)
|
||||
//Version
|
||||
@@ -87,13 +98,10 @@ function importSavedCard(localStorageKey = document.getElementById('inputCardToI
|
||||
}
|
||||
uniqueNumberTracker = importedCard.numberTracker
|
||||
//Art
|
||||
cardArt.src = importedCard.cardArt
|
||||
setTimeout(function() {
|
||||
document.getElementById('inputCardArtX').value = importedCard.artX
|
||||
document.getElementById('inputCardArtY').value = importedCard.artY
|
||||
document.getElementById('inputCardArtZoom').value = importedCard.artZoom
|
||||
cardArtUpdated()
|
||||
}, 500) //These are delayed to not get written over by the image loading
|
||||
cardArt.src = importedCard.cardArt
|
||||
//Set Symbol
|
||||
setSymbol.src = importedCard.setSymbol
|
||||
document.getElementById('inputSetSymbolX').value = importedCard.setSymbolX
|
||||
@@ -111,14 +119,23 @@ function importSavedCard(localStorageKey = document.getElementById('inputCardToI
|
||||
document.getElementById('inputInfoLanguage').value = importedCard.language
|
||||
document.getElementById('inputInfoArtist').value = importedCard.artist
|
||||
bottomInfoUpdated()
|
||||
//Text
|
||||
//Mana Cost
|
||||
if (importedCard.manaCostList) {
|
||||
for (var i = 0; i < importedCard.manaCostList.length; i ++) {
|
||||
if (!manaSymbolCodeList.includes(importedCard.manaCostList[i][0])) {
|
||||
manaSymbolCodeList.push(importedCard.manaCostList[i][0])
|
||||
manaSymbolImageList.push(new Image())
|
||||
manaSymbolImageList[manaSymbolImageList.length - 1].onload = manaCostUpdated
|
||||
manaSymbolImageList[manaSymbolImageList.length - 1].src = importedCard.manaCostList[i][1]
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById('inputManaCost').value = importedCard.manaCost
|
||||
manaCostUpdated()
|
||||
setTimeout(function() {
|
||||
//Text
|
||||
cardTextList = importedCard.text
|
||||
document.getElementById('textPicker').children[0].click()
|
||||
drawCardText()
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +175,13 @@ class savedCard {
|
||||
this.set = document.getElementById('inputInfoSet').value
|
||||
this.language = document.getElementById('inputInfoLanguage').value
|
||||
this.artist = document.getElementById('inputInfoArtist').value
|
||||
//Text
|
||||
//Mana Cost
|
||||
this.manaCostList = []
|
||||
for (var i = 0; i < usedManaSymbols.length; i ++) {
|
||||
this.manaCostList.push([usedManaSymbols[i], manaSymbolImageList[manaSymbolCodeList.indexOf(usedManaSymbols[i])].src])
|
||||
}
|
||||
this.manaCost = document.getElementById('inputManaCost').value
|
||||
//Text
|
||||
this.text = cardTextList
|
||||
//Key
|
||||
this.key = keyToUse
|
||||
|
@@ -16,12 +16,16 @@ var cardTextList = new Array()
|
||||
var manaSymbolCodeList = []
|
||||
var manaSymbolImageList = []
|
||||
var deletingCardObject = false
|
||||
var skipResizeCardArt = 0
|
||||
var skipLoadTextList = 0
|
||||
var usedManaSymbols = []
|
||||
date = new Date()
|
||||
var cornerCutout = new Image()
|
||||
cornerCutout.src = '/data/images/cardImages/cornerCutout.png'
|
||||
|
||||
function addToManaSymbolList(folderPath, newManaSymbolList) {
|
||||
for (var i = 0; i < newManaSymbolList.length; i ++) {
|
||||
if (!manaSymbolCodeList.includes(newManaSymbolList[i].replace('.svg', ''))) {
|
||||
if (newManaSymbolList[i].includes('.svg')) {
|
||||
manaSymbolCodeList.push(newManaSymbolList[i].replace('.svg', ''))
|
||||
manaSymbolImageList.push(new Image())
|
||||
@@ -33,6 +37,7 @@ function addToManaSymbolList(folderPath, newManaSymbolList) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addToManaSymbolList('/data/images/cardImages/manaSymbols/', ["0.svg", "1.svg", "2.svg", "3.svg", "4.svg", "5.svg", "6.svg", "7.svg", "8.svg", "9.svg", "10.svg", "11.svg", "12.svg", "13.svg", "14.svg", "15.svg", "16.svg", "17.svg", "18.svg", "19.svg", "20.svg", "w.svg", "u.svg", "b.svg", "r.svg", "g.svg", "2w.svg", "2u.svg", "2b.svg", "2r.svg", "2g.svg", "pw.svg", "pu.svg", "pb.svg", "pr.svg", "pg.svg", "wu.svg", "wb.svg", "ub.svg", "ur.svg", "br.svg", "bg.svg", "rg.svg", "rw.svg", "gw.svg", "gu.svg", "x.svg", "s.svg", "c.svg", "t.svg","untap.svg", "e.svg", "y.svg", "z.svg", "half.svg", "inf.svg", "chaos.svg", "l+", "l-", "l0", "oldtap.svg", "artistbrush.svg", "bar", "whiteBrush", "blackBrush", 'star.svg'])
|
||||
|
||||
@@ -78,6 +83,7 @@ watermark.crossOrigin = "anonymous"
|
||||
cardArt.onload = function() {
|
||||
cardMasterList[0].width = this.width / cardWidth
|
||||
cardMasterList[0].height = this.height / cardHeight
|
||||
if (skipResizeCardArt < 1) {
|
||||
if (this.width / this.height > artWidth / artHeight) {
|
||||
document.getElementById('inputCardArtZoom').value = artHeight / this.height * 100
|
||||
} else {
|
||||
@@ -85,6 +91,9 @@ cardArt.onload = function() {
|
||||
}
|
||||
document.getElementById('inputCardArtX').value = artX
|
||||
document.getElementById('inputCardArtY').value = artY
|
||||
} else {
|
||||
skipResizeCardArt -= 1
|
||||
}
|
||||
cardArtUpdated()
|
||||
}
|
||||
function setSymbolFromGatherer() {
|
||||
@@ -419,10 +428,12 @@ function getFloat(input) {
|
||||
function loadTextOptions(textArray = []) {
|
||||
document.getElementById('textPicker').innerHTML = ''
|
||||
var backupTextValues = cardTextList
|
||||
if (skipLoadTextList < 1) {
|
||||
cardTextList = textArray
|
||||
}
|
||||
for (var i = 0; i < cardTextList.length; i++) {
|
||||
for (var n = 0; n < backupTextValues.length; n++) {
|
||||
if (cardTextList[i].name == backupTextValues[n].name) {
|
||||
if (cardTextList[i].name == backupTextValues[n].name && skipLoadTextList < 1) {
|
||||
cardTextList[i].text = backupTextValues[n].text
|
||||
}
|
||||
}
|
||||
@@ -431,10 +442,15 @@ function loadTextOptions(textArray = []) {
|
||||
document.getElementById('textPicker').children[0].click()
|
||||
cardTextEdited()
|
||||
if (setSymbol.src != '') {
|
||||
setSymbol.src = setSymbol.src
|
||||
setSymbol.onload()
|
||||
}
|
||||
if (cardArt.src != '') {
|
||||
cardArt.src = cardArt.src
|
||||
cardArt.onload()
|
||||
} else if (skipResizeCardArt > 0) {
|
||||
skipResizeCardArt -= 1
|
||||
}
|
||||
if (skipLoadTextList > 0) {
|
||||
skipLoadTextList -= 1
|
||||
}
|
||||
manaCostUpdated()
|
||||
bottomInfoUpdated()
|
||||
@@ -517,7 +533,7 @@ function writeText(textObjectList, targetContext) {
|
||||
if (possibleCodeLower == 'line' && !oneLine) {
|
||||
finishLine = true
|
||||
paragraphSpace += textSize * 0.35
|
||||
} else if (possibleCodeLower == 'linenospace' && !oneLine) {
|
||||
} else if ((possibleCodeLower == 'linenospace' || possibleCodeLower == 'lns') && !oneLine) {
|
||||
finishLine = true
|
||||
} else if ((possibleCodeLower == 'bar' || possibleCodeLower == 'flavor') && !oneLine) {
|
||||
finishLine = true
|
||||
@@ -748,6 +764,7 @@ function addUploadedFrameImage(imageSource) {
|
||||
}
|
||||
|
||||
function manaCostUpdated() {
|
||||
usedManaSymbols = []
|
||||
manaCostContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var manaCostList = document.getElementById('inputManaCost').value.toLowerCase().replace(/{/g, ' ').replace(/}/g, ' ').split('/').join('').split(' ')
|
||||
var manaSymbolIndex = -1
|
||||
@@ -757,6 +774,7 @@ function manaCostUpdated() {
|
||||
}
|
||||
for (var i = 0; i < manaCostList.length; i++) {
|
||||
if (manaSymbolCodeList.includes(manaCostList[i])) {
|
||||
usedManaSymbols.push(manaCostList[i])
|
||||
manaSymbolIndex += 1
|
||||
var x = eval(manaCostXPath)
|
||||
var y = eval(manaCostYPath)
|
||||
@@ -963,7 +981,7 @@ var textCodeReferenceArray = [
|
||||
['{flavor}', 'Moves to the next line, draws the flavor text bar, and italicizes the text'],
|
||||
['{i}', 'Italicizes the text'],
|
||||
['{/i}', 'Removes italicization'],
|
||||
['{fontsize#}', 'Changes the font size by # pixels'],
|
||||
['{fontsize#}', 'Changes the font size by # pixels (relative - use negative numbers to shrink text)'],
|
||||
['{fontcolor#}', 'Changes the font color to #'],
|
||||
['{left}', 'Aligns the text to the left'],
|
||||
['{center}', 'Aligns the text to the center'],
|
||||
@@ -972,8 +990,9 @@ var textCodeReferenceArray = [
|
||||
['{right#}', 'Shifts the following text # pixels to the right'],
|
||||
['{up#}', 'Shifts the following text # pixels up'],
|
||||
['{down#}', 'Shifts the following text # pixels down'],
|
||||
['{outline*,#}', 'Outlines the following text by # pixels in * color'],
|
||||
['{shadow#}', 'Adds a shadow # pixels away from the following text']
|
||||
['{outline:*,#}', 'Outlines the following text by # pixels in * color'],
|
||||
['{shadow#}', 'Adds a shadow # pixels away from the following text'],
|
||||
['Notes:', 'For colors, you may use HTML color codes (ie \'green\'), hex color codes (ie \'#00ff00\'), or rgb (ie \'rgb(0,255,0)\')']
|
||||
]
|
||||
function textCodeReference() {
|
||||
textCodeReferenceArray.forEach(item => document.getElementById('textCodeReference').innerHTML += '<div>' + item[0] + '</div><div>' + item[1] + '</div>')
|
||||
|
@@ -20,6 +20,13 @@ if (currentVersion != 'm15/devoid') {
|
||||
artY = scaleY(218 / 2100)
|
||||
artWidth = scaleX(1380 / 1500)
|
||||
artHeight = scaleY(1720 / 2100)
|
||||
|
||||
if (skipResizeCardArt > 0) {
|
||||
skipResizeCardArt -= 1
|
||||
}
|
||||
if (skipLoadTextList > 0) {
|
||||
skipLoadTextList -= 1
|
||||
}
|
||||
}
|
||||
|
||||
hideFrameImages('frameClassM15Devoid')
|
@@ -6,4 +6,20 @@ if (!loadedVersions.includes('m15/invention')) {
|
||||
], 'frameClassM15Invention')
|
||||
}
|
||||
|
||||
if (currentVersion != 'm15/invention') {
|
||||
currentVersion = 'm15/invention'
|
||||
|
||||
artX = scaleX(60 / 1500)
|
||||
artY = scaleY(60 / 2100)
|
||||
artWidth = scaleX(1380 / 1500)
|
||||
artHeight = scaleY(1878 / 2100)
|
||||
|
||||
if (skipResizeCardArt > 0) {
|
||||
skipResizeCardArt -= 1
|
||||
}
|
||||
if (skipLoadTextList > 0) {
|
||||
skipLoadTextList -= 1
|
||||
}
|
||||
}
|
||||
|
||||
hideFrameImages('frameClassM15Invention')
|
@@ -16,7 +16,8 @@ if (!loadedVersions.includes('m15/m21')) {
|
||||
['Black Power/Toughness', '/data/images/cardImages/m15/m21/m15M21PTB.png', 1136/1500, 1858/2100, 282/1500, 154/2100, ['Full']],
|
||||
['Red Power/Toughness', '/data/images/cardImages/m15/m21/m15M21PTR.png', 1136/1500, 1858/2100, 282/1500, 154/2100, ['Full']],
|
||||
['Green Power/Toughness', '/data/images/cardImages/m15/m21/m15M21PTG.png', 1136/1500, 1858/2100, 282/1500, 154/2100, ['Full']],
|
||||
['Holo Stamp', '/data/images/cardImages/m15/m21/m15M21Stamp.png', 709/1500, 1873/2100, 82/1500, 82/2100, ['Full']]
|
||||
['Holo Stamp', '/data/images/cardImages/m15/m21/m15M21Stamp.png', 709/1500, 1873/2100, 82/1500, 82/2100, ['Full']],
|
||||
['Chandra\'s Fire', '/data/images/cardImages/m15/m21/m15M21Fire.png', 11/1500, 1725/2100, 1480/1500, 320/2100, ['Full']]
|
||||
], 'frameClassM15M21Showcase')
|
||||
addToManaSymbolList('/data/images/cardImages/manaSymbols/m21/', ["m210", "m211", "m212", "m213", "m214", "m215", "m216", "m217", "m218", "m219", "m21w", "m21u", "m21b", "m21r", "m21g", "m21x",])
|
||||
addToManaSymbolList('/data/images/cardImages/manaSymbols/m21/dark/', ["dm210", "dm211", "dm212", "dm213", "dm214", "dm215", "dm216", "dm217", "dm218", "dm219", "dm21w", "dm21u", "dm21b", "dm21r", "dm21g", "dm21x",])
|
||||
|