From 9b1f48ca5692ebd7012865ac1006069ec27e7f61 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Wed, 14 Jul 2021 12:15:55 -0700 Subject: [PATCH] mh2 + better watermarks --- creator/index.php | 33 +++++++++++++++++++++++++++++++++ js/creator-21.js | 7 +++++-- js/frames/groupShowcase-5.js | 4 +++- js/frames/packMH2.js | 2 +- 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/creator/index.php b/creator/index.php index d1d41611..4c1d2ead 100644 --- a/creator/index.php +++ b/creator/index.php @@ -324,6 +324,39 @@ include('../globalHTML/header-1.php'); +
Select lore-based watermarks
+ diff --git a/js/creator-21.js b/js/creator-21.js index 7cc9a7a9..2ff6f895 100644 --- a/js/creator-21.js +++ b/js/creator-21.js @@ -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) { diff --git a/js/frames/groupShowcase-5.js b/js/frames/groupShowcase-5.js index 63ac3607..0959acdf 100644 --- a/js/frames/groupShowcase-5.js +++ b/js/frames/groupShowcase-5.js @@ -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'} ]) \ No newline at end of file diff --git a/js/frames/packMH2.js b/js/frames/packMH2.js index 86ce7804..c375ee52 100644 --- a/js/frames/packMH2.js +++ b/js/frames/packMH2.js @@ -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'} }); }