This commit is contained in:
Kyle
2020-12-16 15:30:48 -08:00
parent 2b931a1fdf
commit 1a9d15d94b
596 changed files with 4053 additions and 1205 deletions

40
js/frames/packMargin.js Normal file
View File

@@ -0,0 +1,40 @@
//Create objects for common properties across available frames
var bounds = {x:-0.044, y:-1/35, width:1.088, height:37/35};
//defines available frames
availableFrames = [
{name:'Black Border Extension', src:'/img/frames/margins/blackBorderExtension.png', bounds:bounds},
{name:'Borderless Border Extension', src:'/img/frames/margins/borderlessBorderExtension.png', bounds:bounds},
{name:'Box Topper Border Extension', src:'/img/frames/margins/boxTopperBorderExtension.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({canvas:[1500, 2100, 0.044, 1/35], resetOthers:false});
//sets card version
card.version = 'margin';
//art stuff
if (card.artBounds.width == 1) {
card.artBounds.width += 0.044;
}
if (card.artBounds.x == 0) {
card.artBounds.x = -0.044;
card.artBounds.width += 0.044;
}
if (card.artBounds.height == 1) {
card.artBounds.height += 1/35;
}
if (card.artBounds.y == 0) {
card.artBounds.y = -1/35;
card.artBounds.height += 1/35;
}
autoFitArt();
//runs anything that needs to run
drawTextBuffer();
drawFrames();
bottomInfoEdited();
watermarkEdited();
}
//loads available frames
loadFramePack();