mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-26 21:04:58 -05:00
46 lines
3.0 KiB
JavaScript
46 lines
3.0 KiB
JavaScript
//Create objects for common properties across available frames
|
|
var masks = [{src:'/img/frames/m15/split/top.svg', name:'Top Half'}, {src:'/img/frames/m15/split/bottom.svg', name:'Bottom Half'}];
|
|
//defines available frames
|
|
availableFrames = [
|
|
{name:'White Frame', src:'/img/frames/m15/split/w.png', masks:masks},
|
|
{name:'Blue Frame', src:'/img/frames/m15/split/u.png', masks:masks},
|
|
{name:'Black Frame', src:'/img/frames/m15/split/b.png', masks:masks},
|
|
{name:'Red Frame', src:'/img/frames/m15/split/r.png', masks:masks},
|
|
{name:'Green Frame', src:'/img/frames/m15/split/g.png', masks:masks},
|
|
{name:'Multicolored Frame', src:'/img/frames/m15/split/m.png', masks:masks},
|
|
{name:'Artifact Frame', src:'/img/frames/m15/split/a.png', masks:masks},
|
|
{name:'Land Frame', src:'/img/frames/m15/split/l.png', masks:masks}
|
|
];
|
|
//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() {
|
|
// Notification
|
|
notify('At this time, rotated set symbols and second pieces of art is not an option, unless added manually with external software. Apologies for the inconvenience!', 10);
|
|
//resets things so that every frame doesn't have to
|
|
await resetCardIrregularities();
|
|
//sets card version
|
|
card.version = 'split';
|
|
//art bounds
|
|
card.artBounds = {x:0.158, y:0.0534, width:0.3734, height:0.3886};
|
|
autoFitArt();
|
|
//set symbol bounds
|
|
card.setSymbolBounds = {x:2, y:2, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
|
|
resetSetSymbol();
|
|
//watermark bounds
|
|
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
|
|
resetWatermark();
|
|
//text
|
|
loadTextOptions({
|
|
mana: {name:'Mana Cost (Right)', text:'', x:0.0847, y:0.4381, width:0.5367, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0, rotation:-90},
|
|
title: {name:'Title (Right)', text:'', x:0.072, y:0.4381, width:0.5367, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, rotation:-90},
|
|
type: {name:'Type (Right)', text:'', x:0.55, y:0.4381, width:0.5367, height:0.0286, oneLine:true, font:'belerenb', size:0.0286, rotation:-90},
|
|
rules: {name:'Rules Text (Right)', text:'', x:0.6087, y:0.4334, width:0.5174, height:0.2443, size:0.0362, rotation:-90},
|
|
mana2: {name:'Mana Cost (Left)', text:'', x:0.0847, y:0.8943, width:0.5367, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0, rotation:-90},
|
|
title2: {name:'Title (Left)', text:'', x:0.072, y:0.8943, width:0.5367, height:0.0543, oneLine:true, font:'belerenb', size:0.0381, rotation:-90},
|
|
type2: {name:'Type (Left)', text:'', x:0.55, y:0.8943, width:0.5367, height:0.0286, oneLine:true, font:'belerenb', size:0.0286, rotation:-90},
|
|
rules2: {name:'Rules Text (Left)', text:'', x:0.6087, y:0.8896, width:0.5174, height:0.2443, size:0.0362, rotation:-90},
|
|
});
|
|
}
|
|
//loads available frames
|
|
loadFramePack(); |