diff --git a/creator/index.php b/creator/index.php
index 5ffcee7e..542f6680 100644
--- a/creator/index.php
+++ b/creator/index.php
@@ -43,6 +43,13 @@ include('../globalHTML/header-1.php');
+
+
+
+
Textbox Editor
diff --git a/img/frames/promo/extended/a.png b/img/frames/promo/extended/a.png
new file mode 100644
index 00000000..d7ceb3e3
Binary files /dev/null and b/img/frames/promo/extended/a.png differ
diff --git a/img/frames/promo/extended/aThumb.png b/img/frames/promo/extended/aThumb.png
new file mode 100644
index 00000000..c18611ac
Binary files /dev/null and b/img/frames/promo/extended/aThumb.png differ
diff --git a/img/frames/promo/extended/b.png b/img/frames/promo/extended/b.png
new file mode 100644
index 00000000..4cf7a236
Binary files /dev/null and b/img/frames/promo/extended/b.png differ
diff --git a/img/frames/promo/extended/bThumb.png b/img/frames/promo/extended/bThumb.png
new file mode 100644
index 00000000..b68b1166
Binary files /dev/null and b/img/frames/promo/extended/bThumb.png differ
diff --git a/img/frames/promo/extended/c.png b/img/frames/promo/extended/c.png
new file mode 100644
index 00000000..56502090
Binary files /dev/null and b/img/frames/promo/extended/c.png differ
diff --git a/img/frames/promo/extended/cThumb.png b/img/frames/promo/extended/cThumb.png
new file mode 100644
index 00000000..93a501ba
Binary files /dev/null and b/img/frames/promo/extended/cThumb.png differ
diff --git a/img/frames/promo/extended/g.png b/img/frames/promo/extended/g.png
new file mode 100644
index 00000000..a3cabda8
Binary files /dev/null and b/img/frames/promo/extended/g.png differ
diff --git a/img/frames/promo/extended/gThumb.png b/img/frames/promo/extended/gThumb.png
new file mode 100644
index 00000000..2041e69a
Binary files /dev/null and b/img/frames/promo/extended/gThumb.png differ
diff --git a/img/frames/promo/extended/l.png b/img/frames/promo/extended/l.png
new file mode 100644
index 00000000..ac17a1f2
Binary files /dev/null and b/img/frames/promo/extended/l.png differ
diff --git a/img/frames/promo/extended/lThumb.png b/img/frames/promo/extended/lThumb.png
new file mode 100644
index 00000000..f5584ab5
Binary files /dev/null and b/img/frames/promo/extended/lThumb.png differ
diff --git a/img/frames/promo/extended/m.png b/img/frames/promo/extended/m.png
new file mode 100644
index 00000000..2e2d3274
Binary files /dev/null and b/img/frames/promo/extended/m.png differ
diff --git a/img/frames/promo/extended/mThumb.png b/img/frames/promo/extended/mThumb.png
new file mode 100644
index 00000000..7c7d544d
Binary files /dev/null and b/img/frames/promo/extended/mThumb.png differ
diff --git a/img/frames/promo/extended/margin.png b/img/frames/promo/extended/margin.png
new file mode 100644
index 00000000..73561e71
Binary files /dev/null and b/img/frames/promo/extended/margin.png differ
diff --git a/img/frames/promo/extended/marginThumb.png b/img/frames/promo/extended/marginThumb.png
new file mode 100644
index 00000000..4d2ee521
Binary files /dev/null and b/img/frames/promo/extended/marginThumb.png differ
diff --git a/img/frames/promo/extended/r.png b/img/frames/promo/extended/r.png
new file mode 100644
index 00000000..54c6f35f
Binary files /dev/null and b/img/frames/promo/extended/r.png differ
diff --git a/img/frames/promo/extended/rThumb.png b/img/frames/promo/extended/rThumb.png
new file mode 100644
index 00000000..114f44af
Binary files /dev/null and b/img/frames/promo/extended/rThumb.png differ
diff --git a/img/frames/promo/extended/u.png b/img/frames/promo/extended/u.png
new file mode 100644
index 00000000..76708ab1
Binary files /dev/null and b/img/frames/promo/extended/u.png differ
diff --git a/img/frames/promo/extended/uThumb.png b/img/frames/promo/extended/uThumb.png
new file mode 100644
index 00000000..c46ae3d3
Binary files /dev/null and b/img/frames/promo/extended/uThumb.png differ
diff --git a/img/frames/promo/extended/v.png b/img/frames/promo/extended/v.png
new file mode 100644
index 00000000..d4dd4274
Binary files /dev/null and b/img/frames/promo/extended/v.png differ
diff --git a/img/frames/promo/extended/vThumb.png b/img/frames/promo/extended/vThumb.png
new file mode 100644
index 00000000..12296aa2
Binary files /dev/null and b/img/frames/promo/extended/vThumb.png differ
diff --git a/img/frames/promo/extended/w.png b/img/frames/promo/extended/w.png
new file mode 100644
index 00000000..00502956
Binary files /dev/null and b/img/frames/promo/extended/w.png differ
diff --git a/img/frames/promo/extended/wThumb.png b/img/frames/promo/extended/wThumb.png
new file mode 100644
index 00000000..943cd233
Binary files /dev/null and b/img/frames/promo/extended/wThumb.png differ
diff --git a/js/creator-17.js b/js/creator-17.js
index 0690d755..2234e638 100644
--- a/js/creator-17.js
+++ b/js/creator-17.js
@@ -283,7 +283,19 @@ function drawFrames() {
item.masks.forEach(mask => frameMaskingContext.drawImage(mask.image, scaleX((bounds.x || 0) - (ogBounds.x || 0) - ((ogBounds.x || 0) * ((bounds.width || 1) / (ogBounds.width || 1) - 1))), scaleY((bounds.y || 0) - (ogBounds.y || 0) - ((ogBounds.y || 0) * ((bounds.height || 1) / (ogBounds.height || 1) - 1))), scaleWidth((bounds.width || 1) / (ogBounds.width || 1)), scaleHeight((bounds.height || 1) / (ogBounds.height || 1))));
frameMaskingContext.drawImage(item.image, frameX, frameY, frameWidth, frameHeight);
if (item.erase) {frameContext.globalCompositeOperation = 'destination-out';}
+ var oldAlphaData;
+ if (item.preserveAlpha) {
+ oldAlphaData = frameContext.getImageData(0, 0, frameCanvas.width, frameCanvas.height).data;
+ }
frameContext.drawImage(frameMaskingCanvas, 0, 0, frameCanvas.width, frameCanvas.height);
+ if (item.preserveAlpha) {
+ var newRGBData = frameContext.getImageData(0, 0, frameCanvas.width, frameCanvas.height);
+ var pixels = newRGBData.data;
+ for (var i = 3; i < oldAlphaData.length; i += 4) {
+ pixels[i] = oldAlphaData[i];
+ }
+ frameContext.putImageData(newRGBData, 0, 0);
+ }
}
});
drawCard();
@@ -491,6 +503,8 @@ function frameElementClicked(event) {
document.querySelector('#frame-editor-opacity').onchange = (event) => {selectedFrame.opacity = event.target.value; drawFrames();}
document.querySelector('#frame-editor-erase').checked = selectedFrame.erase || false;
document.querySelector('#frame-editor-erase').onchange = (event) => {selectedFrame.erase = event.target.checked; drawFrames();}
+ document.querySelector('#frame-editor-alpha').checked = selectedFrame.preserveAlpha || false;
+ document.querySelector('#frame-editor-alpha').onchange = (event) => {selectedFrame.preserveAlpha = event.target.checked; drawFrames();}
}
}
function uploadFrameOption(imageSource) {
diff --git a/js/frames/groupPromo-2.js b/js/frames/groupPromo-2.js
index b65fd3d3..feed7777 100644
--- a/js/frames/groupPromo-2.js
+++ b/js/frames/groupPromo-2.js
@@ -1,5 +1,6 @@
loadFramePacks([
{name:'Regular Frames', value:'PromoRegular-1'},
+ {name:'Extended Art Frames', value:'PromoExtended'},
{name:'Nickname Frames', value:'PromoNickname'},
{name:'Generic Showcase', value:'PromoGenericShowcase'},
{name:'Addons', value:'disabled'},
diff --git a/js/frames/packMargin-1.js b/js/frames/packMargin-1.js
index 52472be4..710526a4 100644
--- a/js/frames/packMargin-1.js
+++ b/js/frames/packMargin-1.js
@@ -8,6 +8,7 @@ availableFrames = [
{name:'Borderless Extension', src:'/img/frames/margins/borderlessBorderExtension.png', bounds:bounds},
{name:'Box Topper Extension', src:'/img/frames/margins/boxTopperBorderExtension.png', bounds:bounds},
{name:'Box Topper Extension (Planeswalker)', src:'/img/frames/planeswalker/boxTopper/margin.png', bounds:bounds},
+ {name:'Box Topper Extension (Promo / Tall Art)', src:'/img/frames/promo/extended/margin.png', bounds:bounds},
{name:'Black Extension (Cornered)', src:'/img/frames/margins/blackCorners.png', bounds:bounds},
{name:'White Border Extension', src:'/img/frames/white.png', ogBounds:ogBounds, bounds:bounds, masks:masks, noDefaultMask:true},
{name:'Silver Border Extension', src:'/img/frames/silver.png', ogBounds:ogBounds, bounds:bounds, masks:masks, noDefaultMask:true},
diff --git a/js/frames/packPromoExtended.js b/js/frames/packPromoExtended.js
new file mode 100644
index 00000000..8a6376ef
--- /dev/null
+++ b/js/frames/packPromoExtended.js
@@ -0,0 +1,53 @@
+//Create objects for common properties across available frames
+var masks = [{src:'/img/frames/promo/m15PromoMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/promo/m15PromoMaskType.png', name:'Type'}, {src:'/img/frames/promo/m15PromoMaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
+var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
+//defines available frames
+availableFrames = [
+ {name:'White Frame', src:'/img/frames/promo/extended/w.png', masks:masks},
+ {name:'Blue Frame', src:'/img/frames/promo/extended/u.png', masks:masks},
+ {name:'Black Frame', src:'/img/frames/promo/extended/b.png', masks:masks},
+ {name:'Red Frame', src:'/img/frames/promo/extended/r.png', masks:masks},
+ {name:'Green Frame', src:'/img/frames/promo/extended/g.png', masks:masks},
+ {name:'Multicolored Frame', src:'/img/frames/promo/extended/m.png', masks:masks},
+ {name:'Artifact Frame', src:'/img/frames/promo/extended/a.png', masks:masks},
+ {name:'Land Frame', src:'/img/frames/promo/extended/l.png', masks:masks},
+ {name:'Colorless Frame', src:'/img/frames/promo/extended/l.png', masks:masks},
+ {name:'Vehicle Frame', src:'/img/frames/promo/extended/v.png', masks:masks},
+ {name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
+ {name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
+ {name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
+ {name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
+ {name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
+ {name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
+ {name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
+ {name:'Colorless Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds},
+ {name:'Vehicle Power/Toughness', src:'/img/frames/m15/regular/m15PTV.png', bounds:bounds}
+];
+//disables/enables the "Load Frame Version" button
+document.querySelector('#loadFrameVersion').disabled = false;
+//defines process for loading this version, if applicable
+document.querySelector('#loadFrameVersion').onclick = async function() {
+ //resets things so that every frame doesn't have to
+ await resetCardIrregularities();
+ //sets card version
+ card.version = 'promoExtended';
+ //art bounds
+ card.artBounds = {x:0, y:0.081, width:1, height:0.6153};
+ autoFitArt();
+ //set symbol bounds
+ card.setSymbolBounds = {x:0.9213, y:0.6743, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
+ resetSetSymbol();
+ //watermark bounds
+ card.watermarkBounds = {x:0.5, y:0.8177, width:0.75, height:0.1472};
+ resetWatermark();
+ //text
+ loadTextOptions({
+ 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.65, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, color:'white', shadowX:0.0014, shadowY:0.001},
+ rules: {name:'Rules Text', text:'', x:0.086, y:0.7143, width:0.828, height:0.2048, 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'}
+ });
+}
+//loads available frames
+loadFramePack();
\ No newline at end of file