mh2 + better watermarks

This commit is contained in:
Kyle
2021-07-14 12:15:55 -07:00
parent 6242238f54
commit 9b1f48ca56
4 changed files with 42 additions and 4 deletions

View File

@@ -1334,9 +1334,12 @@ function resetWatermark() {
watermarkEdited();
}
//svg cropper
function getSetSymbolWatermark(setCode, targetImage = watermark) {
function getSetSymbolWatermark(url, targetImage = watermark) {
if (!url.includes('http')) {
url = 'https://cdn.jsdelivr.net/npm/keyrune/svg/' + url + '.svg';
}
xhttp = new XMLHttpRequest();
xhttp.open('GET', 'https://raw.githubusercontent.com/andrewgioia/keyrune/4073ac89bb943978c29be504275e6f3160a07255/svg/' + setCode + '.svg', true);
xhttp.open('GET', url, true);
xhttp.overrideMimeType('image/svg+xml');
xhttp.onload = function(event) {
if (this.readyState == 4 && this.status == 200) {

View File

@@ -1,5 +1,6 @@
loadFramePacks([
{name:'D&D Module', value:'DNDModule'},
{name:'Sketch Cards (MH2)', value:'MH2'},
{name:'Mystical Archive (Japanese)', value:'MysticalArchiveJP'},
{name:'Mystical Archive', value:'MysticalArchive'},
{name:'Praetors', value:'Praetors'},
@@ -25,5 +26,6 @@ loadFramePacks([
{name:'Inner Crowns', value:'M15InnerCrowns'},
{name:'Holo Stamps', value:'M15HoloStamps'},
{name:'Dark Power/Toughness', value:'M15DarkPT'},
{name:'Colored Borders', value:'M15Borders'}
{name:'Colored Borders', value:'M15Borders'},
{name:'Color Identity Pips', value:'M15CIPips'}
])

View File

@@ -44,7 +44,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
mana: {name:'Mana Cost', text:'', y:0.0613, width:0.9292, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0},
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362},
rules: {name:'Rules Text', text:'', x:0.0927, y:0.6303, width:0.8147, height:0.2875, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}