cleanup
@@ -1,137 +0,0 @@
|
||||
version,color,type,displayName,maskVersion,x,y,width,height,secondary,advanced
|
||||
m15,W,Full,White,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,U,Full,Blue,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,B,Full,Black,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,R,Full,Red,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,G,Full,Green,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,M,Full,Multicolored,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,A,Full,Artifact,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,C,Full,Colorless,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,Mask,Frame,,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,Mask,Pinline,,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,Mask,Title,,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,Mask,Type,,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,Mask,Rules,,m15,0,0,1,1,TRUE,FALSE
|
||||
none,Mask,Secondary,,none,0,0,1,1,TRUE,FALSE
|
||||
m15,W,PT,White,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,U,PT,Blue,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,B,PT,Black,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,R,PT,Red,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,G,PT,Green,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,M,PT,Multicolored,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,A,PT,Artifact,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,C,PT,Colorless,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
none,Mask,Corners,,none,0.0267,0.0191,0.952,0.1771,FALSE,FALSE
|
||||
m15,W,Legendary,White,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
m15,U,Legendary,Blue,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
m15,B,Legendary,Black,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
m15,R,Legendary,Red,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
m15,G,Legendary,Green,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
m15,M,Legendary,Multicolored,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
m15,A,Legendary,Artifact,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
m15,C,Legendary,Colorless,m15,0.0267,0.0191,0.952,0.1771,TRUE,FALSE
|
||||
none,Mask,Stamp,,none,0.4387,0.9039,0.12,0.0477,FALSE,FALSE
|
||||
m15,W,RareStamp,White,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,U,RareStamp,Blue,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,B,RareStamp,Black,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,R,RareStamp,Red,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,G,RareStamp,Green,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,M,RareStamp,Multicolored,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,A,RareStamp,Artifact,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,C,RareStamp,Colorless,m15,0.4387,0.9039,0.12,0.0477,TRUE,FALSE
|
||||
m15,V,PT,Vehicle,m15,0.7613,0.8898,0.183,0.0734,FALSE,FALSE
|
||||
m15,V,Full,Vehicle,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,WL,Full,White Land,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,UL,Full,Blue Land,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,BL,Full,Black Land,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,RL,Full,Red Land,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,GL,Full,Green Land,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,ML,Full,Multicolored Land,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,CL,Full,Colorless Land,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,W,Miracle,White,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,U,Miracle,Blue,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,B,Miracle,Black,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,R,Miracle,Red,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,G,Miracle,Green,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,M,Miracle,Multicolored,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,C,Miracle,Colorless,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,A,Miracle,Artifact,m15,0.04,0.0286,0.9187,0.4867,TRUE,TRUE
|
||||
m15,W,Nyx,White,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,U,Nyx,Blue,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,B,Nyx,Black,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,R,Nyx,Red,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,G,Nyx,Green,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,M,Nyx,Multicolored,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,A,Nyx,Artifact,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,C,Nyx,Colorless,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,WL,Nyx,White Land,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,UL,Nyx,Blue Land,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,BL,Nyx,Black Land,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,RL,Nyx,Red Land,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,GL,Nyx,Green Land,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,ML,Nyx,Multicolored Land,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,CL,Nyx,Colorless Land,m15,0.04,0.0286,0.92,0.5581,TRUE,TRUE
|
||||
m15,WD,Full,White (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,UD,Full,Blue (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,BD,Full,Black (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,RD,Full,Red (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,GD,Full,Green (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,MD,Full,Multicolored (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,AD,Full,Artifact (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,CD,Full,Colorless (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,WLD,Full,White Land (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,ULD,Full,Blue Land (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,BLD,Full,Black Land (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,RLD,Full,Red Land (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,GLD,Full,Green Land (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,MLD,Full,Multicolored Land (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,CLD,Full,Colorless Land (Dark),m15,0,0,1,1,TRUE,TRUE
|
||||
m15,WD,PT,White (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,UD,PT,Blue (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,BD,PT,Black (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,RD,PT,Red (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,GD,PT,Green (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,MD,PT,Multicolored (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,AD,PT,Artifact (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,CD,PT,Colorless (Dark),m15,0.7613,0.8898,0.183,0.0734,FALSE,TRUE
|
||||
m15,W,FlipPT,White,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,U,FlipPT,Blue,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,B,FlipPT,Black,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,R,FlipPT,Red,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,G,FlipPT,Green,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,M,FlipPT,Multicolored,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,A,FlipPT,Artifact,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,C,FlipPT,Colorless,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,WL,FlipPT,White Land,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,UL,FlipPT,Blue Land,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,BL,FlipPT,Black Land,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,RL,FlipPT,Red Land,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,GL,FlipPT,Green Land,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,ML,FlipPT,Multicolorled Land,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,CL,FlipPT,Colorless Land,m15,0.914,0.8352,0.048,0.0457,FALSE,TRUE
|
||||
m15,W,FlipCircle,White,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,U,FlipCircle,Blue,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,B,FlipCircle,Black,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,R,FlipCircle,Red,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,G,FlipCircle,Green,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,M,FlipCircle,Multicolored,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,A,FlipCircle,Artifact,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,C,FlipCircle,Colorless,m15,0.0347,0.044,0.104,0.0676,FALSE,TRUE
|
||||
m15,Artifact,FlipIcon,Artifact,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Blank,FlipIcon,Blank,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Compass,FlipIcon,Compass,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Creature,FlipIcon,Creature,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Day,FlipIcon,Day,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Eldrazi,FlipIcon,Eldrazi,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Enchantment,FlipIcon,Enchantment,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Instant,FlipIcon,Instant,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Land,FlipIcon,Land,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Moon,FlipIcon,Moon,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Multitype,FlipIcon,Multitype,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Night,FlipIcon,Night,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Planeshift,FlipIcon,Planeshift,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Planeswalker,FlipIcon,Planeswalker,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Sorcery,FlipIcon,Sorcery,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Structure,FlipIcon,Structure,m15,0.052,0.0486,0.08,0.0571,FALSE,TRUE
|
||||
m15,Mask,Border,m15MaskBorder,m15,0,0,1,1,TRUE,FALSE
|
||||
m15,Default,Border,m15DefaultBorder,m15,0,0,1,1,TRUE,FALSE
|
|
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 18 KiB |
@@ -1,197 +0,0 @@
|
||||
<!DOCTYPE html5>
|
||||
<html>
|
||||
<head>
|
||||
<title>Card Conjurer</title>
|
||||
<!-- Other things -->
|
||||
<link rel="stylesheet" href="data/site/styles.css">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<div class="mainDiv">
|
||||
<div class="pageTitle">
|
||||
Card Conjurer
|
||||
</div>
|
||||
<div class="mainGrid">
|
||||
<div class="canvasContainer">
|
||||
<canvas id="mainCanvas" class="canvas"></canvas>
|
||||
</div>
|
||||
<div class="cardMenu">
|
||||
<div class="tab">
|
||||
<div class="tabButton editor activeTab" onclick="tabFunction(event, `editor`, `optionFrame`)">Frame</div>
|
||||
<div class="tabButton editor" onclick="tabFunction(event, `editor`, `optionText`)">Text</div>
|
||||
<div class="tabButton editor" onclick="tabFunction(event, `editor`, `optionArt`)">Art</div>
|
||||
<div class="tabButton editor" onclick="tabFunction(event, `editor`, `optionInfo`)">Collector</div>
|
||||
<div class="tabButton editor" onclick="tabFunction(event, `editor`, `optionSet`)">Set</div>
|
||||
<div class="tabButton editor" onclick="tabFunction(event, `editor`, `optionWatermark`)">Watermark</div>
|
||||
</div>
|
||||
<div class="bar"></div>
|
||||
<div class="tabContent editor displayed" id="optionFrame">
|
||||
Select the part of the card frame:<br>
|
||||
<div class="tab tabSelect" id="frameType"></div>
|
||||
<div class="realCheckboxContainer">
|
||||
<label class="checkboxContainer">
|
||||
Right Half
|
||||
<input type="checkbox" id="checkboxSecondary">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
</div>
|
||||
Select the color:<br>
|
||||
<div class="tab tabSelect" id="tabSelectColor"></div><br>
|
||||
<div class="imageGrid">
|
||||
<div class="autoGrid">
|
||||
<button class="button tooltip" onclick="userEnterImage()">Enter<span class="tooltiptext">Add the selected image to the card</span></button>
|
||||
<button class="button tooltip" onclick="userRemoveImage()">Remove<span class="tooltiptext">Remove the select image type from the card</span></button>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tooltip"><img id="imgPreview" class="imgPreview"><span class="tooltiptext">Preview of the selected image</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="autoGrid">
|
||||
<div class="tooltip"><select class="select" id="inputImageTypeOpacity" onchange="loadOpacityValue()"></select><span class="tooltiptext">Select the part of the card frame</span></div>
|
||||
<div class="tooltip"><input type="number" class="input number" id="inputOpacityValue" min="0" max="100" oninput="opacityValueUpdated()"><span class="tooltiptext">Enter the opacity for the selected part of the frame</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabContent editor" id="optionText">
|
||||
<div id="inputWhichTextTabs" class="tab"></div>
|
||||
<div class="tooltip"><textarea class="textarea tooltip" id="inputText" placeholder="" oninput="updateText()"></textarea><span class="tooltiptext">Edit the selected text</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Mana Cost" id="inputManaCost" oninput="updateCardCanvas()" value=""><span class="tooltiptext">Enter the mana cost. Include spaces!</span></div>
|
||||
<div class="bar"></div>
|
||||
<div class="title">How To Use Text Codes</div>
|
||||
<div class="paragraph indent">
|
||||
Remember to surround each code with curly brackets ("{" and "}"). The codes are not caps sensitive. The following is a list of available text codes and what they do:
|
||||
</div>
|
||||
<div id="textCodeTutorial"></div>
|
||||
</div>
|
||||
<div class="tabContent editor" id="optionArt">
|
||||
<div class="autoGrid">
|
||||
<div>
|
||||
<div class="tooltip"><input type="file" class="input file" accept="image/*" onchange="uploadImage(event, cardArt)" placeholder="Via File Upload"><span class="tooltiptext">Upload an image for the card art</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Via URL" onchange="cardArt.src = 'https://cors-anywhere.herokuapp.com/' + this.value"><span class="tooltiptext">Enter a URL for the card art</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" id="inputCardArtName" onchange="inputCardArtName(this.value)" placeholder="Via Card Name"><span class="tooltiptext">Enter a card name to use its art</span></div>
|
||||
<div class="tooltip"><input type="number" class="input number" id="inputCardArtNameNumber" onchange="inputCardArtNameNumber(this.value)" value="" min="1" max="1" placeholder="Which Art From Card Name"><span class="tooltiptext">Select which art to use (from the entered card name)</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="text-align: center; margin: 0.18em 0px">Placement & Zoom:</div>
|
||||
<div class="tooltip"><input type="number" class="input number" value="0" id="inputCardArtX" oninput="updateCardCanvas()"><span class="tooltiptext">Shift art to the right</span></div>
|
||||
<div class="tooltip"><input type="number" class="input number" value="0" id="inputCardArtY" oninput="updateCardCanvas()"><span class="tooltiptext">Shift art down</span></div>
|
||||
<div class="tooltip"><input type="number" class="input number" value="100" step="0.1" min="0" id="inputCardArtZoom" oninput="updateCardCanvas()"><span class="tooltiptext">Art zoom level</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabContent editor" id="optionInfo">
|
||||
<div class="autoGrid">
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Number" id="inputInfoNumber" oninput="updateBottomInfoCanvas()" value=""><span class="tooltiptext">Card Number</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Rarity" id="inputInfoRarity" oninput="updateBottomInfoCanvas()" value="P"><span class="tooltiptext">Rarity</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Set" id="inputInfoSet" oninput="updateBottomInfoCanvas()" value="MTG"><span class="tooltiptext">Set Code</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Language" id="inputInfoLanguage" oninput="updateBottomInfoCanvas()" value="EN"><span class="tooltiptext">Language</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Artist's Name" id="inputInfoArtist" oninput="updateBottomInfoCanvas()" value=""><span class="tooltiptext">Artist's Name<br>(necessary)</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabContent editor" id="optionSet">
|
||||
<div class="autoGrid">
|
||||
<div class="tooltip"><input type="file" class="input file" accept="image/*" onchange="uploadImage(event, setSymbol)" placeholder="Via File Upload"><span class="tooltiptext">Upload an image for the set symbol</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Via URL" onchange="whiteToTransparent(setSymbol, 'https://cors-anywhere.herokuapp.com/' + this.value)"><span class="tooltiptext">Enter a URL for the set symbol</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" id="inputSetCode" placeholder="Via Set Code" onchange="whiteToTransparent(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + this.value + '&size=large&rarity=' + document.getElementById('inputSetRarity').value)"><span class="tooltiptext">Use a set code<br>(2-3 letters, as seen on the bottom of cards)</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" id="inputSetRarity" placeholder="Rarity" onchange="whiteToTransparent(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + document.getElementById('inputSetCode').value + '&size=large&rarity=' + this.value)"><span class="tooltiptext">C, U, R, M, or S<br>(Not every set has every rarity)</span></div>
|
||||
<div class="tooltip"><button class="button" onclick="randomSet()">Random</button><span class="tooltiptext">Use a random set symbol and rarity</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabContent editor" id="optionWatermark">
|
||||
<div class="autoGrid">
|
||||
<div class="tooltip"><input type="file" class="input file" accept="image/*" onchange="uploadImage(event, watermark)" placeholder="Via File Upload"><span class="tooltiptext">Upload an image for the watermark</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Via URL" onchange="whiteToTransparent(watermark, 'https://cors-anywhere.herokuapp.com/' + this.value)"><span class="tooltiptext">Enter a URL for the watermark</span></div>
|
||||
<div class="tooltip"><input type="text" class="input text" placeholder="Via Set Code" onchange="whiteToTransparent(watermark, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + this.value + '&size=large')"><span class="tooltiptext">Use a set code<br>(2-3 letters, as seen on the bottom of cards)</span></div>
|
||||
<div class="tooltip"><select class="select" id="inputWatermarkPrimary" onchange="updateWatermarkCanvas()">
|
||||
<option value="none">None</option>
|
||||
<option value="default">Default</option>
|
||||
<option value="#ccc8b1" selected="selected">White</option>
|
||||
<option value="#b0c3d5">Blue</option>
|
||||
<option value="#b3b3b3">Black</option>
|
||||
<option value="#ddac9b">Red</option>
|
||||
<option value="#b9c8b5">Green</option>
|
||||
<option value="#e4d49b">Gold</option>
|
||||
<option value="#cfc8be">Artifact/Colorless</option>
|
||||
</select><span class="tooltiptext">Select the watermark color</span></div>
|
||||
<div class="tooltip"><select class="select" id="inputWatermarkSecondary" onchange="updateWatermarkCanvas()">
|
||||
<option value="none">None</option>
|
||||
<option value="default">Default</option>
|
||||
<option value="#ccc8b1">White</option>
|
||||
<option value="#b0c3d5">Blue</option>
|
||||
<option value="#b3b3b3">Black</option>
|
||||
<option value="#ddac9b">Red</option>
|
||||
<option value="#b9c8b5">Green</option>
|
||||
<option value="#e4d49b">Gold</option>
|
||||
<option value="#cfc8be">Artifact/Colorless</option>
|
||||
</select><span class="tooltiptext">Select the secondary watermark color</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bar"></div>
|
||||
<div>
|
||||
<div class="download">
|
||||
<a onclick="downloadCardImage(this)" id="downloadCardImage" href="" target="_blank" download="card.png">Download</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden"></div>
|
||||
<div class="layer">
|
||||
<div class="title">Welcome to Card Conjurer!</div>
|
||||
<div class="paragraph indent">Card Conjurer is a free program that helps you create custom Magic: The Gathering cards. There are already plenty of custom card makers out there, but what sets Card Conjurer apart from the rest is its live-edit capabilities. You can immediatly see the effects of any change you make, which makes card customization easier and overall a better experience.</div>
|
||||
</div>
|
||||
<div class="layer">
|
||||
<div class="title">About Me</div>
|
||||
<div class="paragraph indent">
|
||||
Hi! My name is Kyle Burton and I am currently a high school student. I used to play Pokemon, but when a friend introduced me to Magic in 2013 I sold my pocket monsters and bought an M14 Intro Pack. Ever since that day Magic has been my all time favorite game. In addition to playing games, I've always <a href="https://www.youtube.com/watch?v=ERCzN91JicA" target="blank">loved technology</a>. During the 2017-18 school year I tought myself how to code Javascript, and a little bit of HTML and CSS. The following summer I created Kyle's Card Imager (<a href="https://scryfall.com/card/5dn/134/krark-clan-ironworks" target="blank">KCI</a>). It was pretty simple but I soon began to add more border images like Miracle or Nyx. After a few months I decided to share my creation, so I renamed it Card Conjurer and uploaded it to Github, and then in April of 2019 I bought the domain <a href="#" onclick="alert('You\'re already there, silly!')">cardconjurer.com</a>.
|
||||
</div>
|
||||
</div>
|
||||
<div class="layer">
|
||||
<div class="title">Want More Customization?</div>
|
||||
<div class="paragraph indent">
|
||||
If you'd like to try out some more frames, scroll to the bottom of this page and check the box next to "Advanced Borders" - CardConjurer.com will remember this setting, so you only need to do this once per device.
|
||||
</div>
|
||||
<div class="paragraph indent">
|
||||
This version of the website is currently a work in progress, so it doesn't have all the features the original Card Conjurer had. If you'd like to go back to the old version, <a href="old/index.html">click here</a>.
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layer">-->
|
||||
<!-- <div class="title">How You Can Help</div>-->
|
||||
<!-- <div class="paragraph indent">-->
|
||||
<!-- I hope that you found Card Conjurer useful! If you did, you can help me out tremendously by using one of the following referral links:-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="autoGrid donate">-->
|
||||
<!-- <div onclick="window.open('https://pucatrade.com/invite/gift/186748', '_blank');" style="color:#3d213a;">PucaTrade<img src="data/site/icons/pucatrade.png"></div>-->
|
||||
<!-- <div onclick="window.open('https://www.massdrop.com/?referer=LNWNLL', '_blank');" style="color:#ffffff;">Massdrop<img src="data/site/icons/massdrop.png"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="layer">
|
||||
<div class="title">Have Any Questions?</div>
|
||||
<div class="paragraph indent">
|
||||
If you have any questions please don't hesitate to email me at: <div class="truncate"><a href="https://mail.google.com/mail/u/0/?view=cm&fs=1&to=CardConjurerMTG@gmail.com&su=Card%20Conjurer&tf=1" target="_blank">CardConjurerMTG@gmail.com</a></div>Even if you made a cool card and want to share, I'd love to see it!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<footer>
|
||||
<div class="footerGrid">
|
||||
<div>
|
||||
Card Conjurer By Kyle Burton<br>
|
||||
<input type="checkbox" checked="true" onchange="toggleTooltips(this.checked)" id="tooltipToggler"> Display tooltips<br>
|
||||
<input type="checkbox" onchange="advancedBordersClicked()" id="checkboxAdvanced"> Advanced Borders<br>
|
||||
</div>
|
||||
<div>
|
||||
Navigation:<br>
|
||||
<a href="index.html">Card Creator</a><br>
|
||||
<a href="life.html">Life Counter</a>
|
||||
</div>
|
||||
<div>
|
||||
Legal:<br>
|
||||
<a href="disclaimer.html">Disclaimer</a><br>
|
||||
<a href="termsOfUse.html">Terms of Use</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="data/scripts/colors.js"></script>
|
||||
<script src="data/site/main.js"></script>
|
||||
<script src="data/scripts/setCodeList.js"></script>
|
||||
<html>
|
@@ -1,46 +0,0 @@
|
||||
//============================================//
|
||||
// Card Conjurer, by Kyle Burton //
|
||||
//============================================//
|
||||
version.currentVersion = "m15"
|
||||
version.typeOrder = ["Full", "FullSecondary", "Frame", "FrameSecondary", "Nyx", "NyxSecondary", "Pinline", "PinlineSecondary", "Legendary", "LegendarySecondary", "Title", "TitleSecondary", "Miracle", "MiracleSecondary", "Type", "TypeSecondary", "Rules", "RulesSecondary", "Border", "BorderSecondary", "PT", "RareStamp", "RareStampSecondary", "FlipPT", "FlipCircle", "FlipIcon"]
|
||||
version.typesAdvanced = ["Nyx", "Miracle", "FlipPT", "FlipCircle", "FlipIcon"]
|
||||
version.typeNotFull = ["Legendary", "LegendarySecondary", "PT", "RareStamp", "RareStampSecondary", "Nyx", "NyxSecondary", "Miracle", "MiracleSecondary", "FlipPT", "FlipCircle", "FlipIcon", "Border", "BorderSecondary"]
|
||||
version.artX = cwidth(58)
|
||||
version.artY = cheight(118)
|
||||
version.setSymbolRight = cwidth(693)
|
||||
version.setSymbolVertical = cheight(620)
|
||||
version.setSymbolWidth = cwidth(77)
|
||||
version.setSymbolHeight = cheight(42)
|
||||
version.bottomInfoFunction = "m15BottomInfo"
|
||||
version.manaCostX = cwidth(656)
|
||||
version.manaCostY = cheight(62)
|
||||
version.manaCostDiameter = cwidth(36)
|
||||
version.manaCostDistance = cwidth(-38)
|
||||
version.manaCostDirection = "horizontal"
|
||||
version.rareStampX = cwidth(340)
|
||||
version.rareStampY = cheight(965)
|
||||
version.rareStampWidth = cwidth(70)
|
||||
version.rareStampHeight = cheight(38)
|
||||
version.watermarkWidth = cwidth(520)
|
||||
version.watermarkHeight = cheight(250)
|
||||
version.watermarkY = cheight(815)
|
||||
//Name, text, x, y, width, height, font, size, color, other
|
||||
version.textList = [
|
||||
["Title", "", cwidth(62), cheight(87), cwidth(630), 0, "belerenb", 40, "black", "oneLine=true"],
|
||||
["Type", "", cwidth(60), cheight(624), cwidth(630), 0, "belerenb", 34, "black", "oneLine=true"],
|
||||
["Rules Text", "", cwidth(63), cheight(670), cwidth(624), cheight(292), "mplantin", 38, "black", "lineSpace=0.97"],
|
||||
["Power Toughness", "", cwidth(590), cheight(970), cwidth(110), 0, "belerenb", 39, "black", "oneLine=true,textAlign='center'"],
|
||||
["Flip PT", "", cwidth(588), cheight(902), cwidth(100), 0, "belerenb", 28, "#666", "oneLine=true,textAlign='right'"]
|
||||
]
|
||||
finishChangingVersion()
|
||||
|
||||
function m15BottomInfo() {
|
||||
//remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values!
|
||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
bottomInfoContext.writeText(document.getElementById("inputInfoNumber").value + " " + document.getElementById("inputInfoRarity").value + " *Not For Sale*", cwidth(46), cheight(993), cwidth(329), 0, "gothammedium", 18, "white", "oneLine=true")
|
||||
bottomInfoContext.writeText(document.getElementById("inputInfoSet").value + " \u00b7 " + document.getElementById("inputInfoLanguage").value + " {fontsize1}{font:belerenbsc}{artistBrush}" + document.getElementById("inputInfoArtist").value, cwidth(46), cheight(1012), cwidth(375), 0, "gothammedium", 17, "white", "oneLine=true")
|
||||
var copyrightShift = 19 * cardMasterTypes.includes("PT")
|
||||
bottomInfoContext.writeText("\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast", cardWidth / 2, cheight(993 + copyrightShift), cwidth(322), 0, "mplantin", 17, "white", "oneLine=true,textAlign='right'")
|
||||
updateCardCanvas()
|
||||
}
|
||||
setTimeout(m15BottomInfo, 250)
|
865
old/3.0/main.js
@@ -1,865 +0,0 @@
|
||||
//============================================//
|
||||
// Card Conjurer, by Kyle Burton //
|
||||
//============================================//
|
||||
//Define some variables
|
||||
var cardWidth = 750, cardHeight = 1050
|
||||
var version = {}
|
||||
var date = new Date()
|
||||
var initiated = false
|
||||
var suggestedColor = "White"
|
||||
document.getElementById("inputInfoNumber").value = date.getFullYear()
|
||||
//Make all the canvases and their contexts
|
||||
var mainCanvas = document.getElementById("mainCanvas")
|
||||
mainCanvas.width = cardWidth
|
||||
mainCanvas.height = cardHeight
|
||||
var mainContext = mainCanvas.getContext("2d")
|
||||
var canvasList = ["card", "mask", "image", "text", "paragraph", "line", "transparent", "crop", "bottomInfo", "setSymbol", "watermark", "temp"]
|
||||
for (var i = 0; i < canvasList.length; i++) {
|
||||
window[canvasList[i] + "Canvas"] = document.createElement("canvas")
|
||||
window[canvasList[i] + "Canvas"].width = cardWidth
|
||||
window[canvasList[i] + "Canvas"].height = cardHeight
|
||||
window[canvasList[i] + "Context"] = window[canvasList[i] + "Canvas"].getContext("2d")
|
||||
}
|
||||
//Create the arrays that keeps track of what parts of the card are what
|
||||
var cardMasterTypes = []
|
||||
var cardMasterImages = []
|
||||
//var cardMasterOpacity = []
|
||||
var cardMasterOpacityValue = []
|
||||
//Mana symbol Array setup
|
||||
var manaSymbolCodeList = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "w", "u", "b", "r", "g", "2w", "2u", "2b", "2r", "2g", "pw", "pu", "pb", "pr", "pg", "wu", "wb", "ub", "ur", "br", "bg", "rg", "rw", "gw", "gu", "x", "s", "c", "t","untap", "e", "y", "z", "1/2", "inf", "chaos", "plane", "l+", "l-", "l0", "oldtap", "artistbrush", "bar"]
|
||||
var manaSymbolImageList = []
|
||||
//Manually create a few important images
|
||||
var cardArt = new Image(), setSymbol = new Image(), watermark = new Image()
|
||||
cardArt.crossOrigin = "anonymous"
|
||||
setSymbol.crossOrigin = "anonymous"
|
||||
watermark.crossOrigin = "anonymous"
|
||||
cardArt.onload = function() {
|
||||
updateCardCanvas()
|
||||
}
|
||||
setSymbol.onload = function() {
|
||||
updateSetSymbolCanvas()
|
||||
}
|
||||
watermark.onload = function() {
|
||||
updateWatermarkCanvas()
|
||||
}
|
||||
//Load the mana symbol images
|
||||
loadManaSymbolImages()
|
||||
//Load the CSV full of image data
|
||||
loadImageSpreadsheet()
|
||||
|
||||
|
||||
//============================================//
|
||||
// Functions //
|
||||
//============================================//
|
||||
var nameArray = []
|
||||
//Load the CSV full of image data
|
||||
function loadImageSpreadsheet() {
|
||||
var xhttp = new XMLHttpRequest()
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4) {
|
||||
var rawText = xhttp.responseText.split("\n")
|
||||
for (var i = 0; i < rawText.length; i ++) {
|
||||
for (var n = 0; n < rawText[0].split(",").length; n++) {
|
||||
if (i == 0) {
|
||||
window[rawText[0].split(",")[n].trim() + "Array"] = []
|
||||
} else {
|
||||
window[rawText[0].split(",")[n].trim() + "Array"][i - 1] = rawText[i].split(",")[n].trim()
|
||||
}
|
||||
}
|
||||
if (i != 0) {
|
||||
nameArray[i - 1] = versionArray[i - 1] + colorArray[i - 1] + typeArray[i - 1]
|
||||
}
|
||||
if (i == rawText.length - 1) {
|
||||
init()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
xhttp.open("GET", "data/images/imageSpreadsheet.csv", true)
|
||||
xhttp.send()
|
||||
}
|
||||
//After the csv has been loaded, the init function runs.
|
||||
function init() {
|
||||
//Loads the base version (m15)
|
||||
changeVersionTo("m15")
|
||||
//Loads all the masks
|
||||
for (var i = 0; i < colorArray.length; i ++) {
|
||||
if (colorArray[i] == "Mask") {
|
||||
loadImage(i)
|
||||
}
|
||||
}
|
||||
//Runs any tests. This should not do anything when published.
|
||||
setTimeout(testFunction, 100)
|
||||
initiated = true
|
||||
textCodeTutorial()
|
||||
//Checks cookies!
|
||||
setTimeout(checkCookies, 100)
|
||||
}
|
||||
//Loads an image. Only actually loads images the first time each image is loaded, otherwise assigns it.
|
||||
function loadImage(index, target = "none") {
|
||||
if (window[nameArray[index]] == undefined) {
|
||||
window[nameArray[index]] = new customImage(index, target)
|
||||
} else {
|
||||
addToCardMaster(index, target)
|
||||
}
|
||||
}
|
||||
//Special image object
|
||||
function customImage(index, target) {
|
||||
this.loaded = false
|
||||
this.index = index
|
||||
this.image = new Image()
|
||||
this.image.src = "data/images/" + nameArray[index] + ".png"
|
||||
this.image.onload = function() {
|
||||
window[nameArray[index]].loaded = true
|
||||
addToCardMaster(index, target)
|
||||
}
|
||||
}
|
||||
//Adds an image to the card master. Replaces the previous one if it already existed
|
||||
function addToCardMaster(index, target) {
|
||||
if (target == "preview") {
|
||||
document.getElementById("imgPreview").src = window[nameArray[index]].image.src
|
||||
return
|
||||
}
|
||||
if (document.getElementById("checkboxSecondary").checked) {
|
||||
target += "Secondary"
|
||||
}
|
||||
if ((target == typeArray[index]) || (secondaryArray[index] && target.replace("Secondary", "")) == typeArray[index] || (typeArray[index] == "Full")) {
|
||||
if (cardMasterTypes.includes(target)) {
|
||||
cardMasterImages[cardMasterTypes.indexOf(target)] = window[nameArray[index]]
|
||||
} else {
|
||||
cardMasterImages[cardMasterTypes.length] = window[nameArray[index]]
|
||||
cardMasterTypes[cardMasterTypes.length] = target
|
||||
}
|
||||
cardMasterUpdated()
|
||||
}
|
||||
}
|
||||
//Runs through all the assigned card images and draws them in
|
||||
function cardMasterUpdated() {
|
||||
imageContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
for (var i = 0; i < version.typeOrder.length; i ++) {
|
||||
if (cardMasterTypes.includes(version.typeOrder[i])) {
|
||||
imageContext.mask(cardMasterTypes.indexOf(version.typeOrder[i]))
|
||||
}
|
||||
}
|
||||
}
|
||||
//Custom function that draws onto a canvas using masks
|
||||
CanvasRenderingContext2D.prototype.mask = function(cardMasterIndex) {
|
||||
maskContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
maskContext.globalCompositeOperation = "source-over"
|
||||
if (cardMasterTypes[cardMasterIndex].includes("Secondary")) {
|
||||
maskContext.drawImage(window[nameArray[nameArray.indexOf("noneMaskSecondary")]].image, 0, 0, cardWidth, cardHeight)
|
||||
maskContext.globalCompositeOperation = "source-in"
|
||||
}
|
||||
var maskToUse = window[versionArray[cardMasterImages[cardMasterIndex].index] + "Mask" + cardMasterTypes[cardMasterIndex].replace("Secondary", "")]
|
||||
if (maskToUse != undefined) {
|
||||
maskContext.drawImage(maskToUse.image, xArray[maskToUse.index] * cardWidth, yArray[maskToUse.index] * cardHeight, widthArray[maskToUse.index] * cardWidth, heightArray[maskToUse.index] * cardHeight)
|
||||
maskContext.globalCompositeOperation = "source-in"
|
||||
}
|
||||
var mainImageIndex = cardMasterImages[cardMasterIndex].index
|
||||
maskContext.drawImage(cardMasterImages[cardMasterIndex].image, xArray[mainImageIndex] * cardWidth, yArray[mainImageIndex] * cardHeight, widthArray[mainImageIndex] * cardWidth, heightArray[mainImageIndex] * cardHeight)
|
||||
this.globalAlpha = cardMasterOpacityValue[version.typeOrder.indexOf(cardMasterTypes[cardMasterIndex].replace("Secondary", ""))] / 100
|
||||
this.drawImage(maskCanvas, 0, 0, cardWidth, cardHeight)
|
||||
this.globalAlpha = 1
|
||||
if (cardMasterTypes[cardMasterIndex].includes("RareStamp")) {
|
||||
this.drawImage(window[nameArray[nameArray.indexOf("noneMaskStamp")]].image, version.rareStampX, version.rareStampY, version.rareStampWidth, version.rareStampHeight)
|
||||
}
|
||||
updateImageCanvas()
|
||||
}
|
||||
//All the canvas functions
|
||||
function updateImageCanvas() {
|
||||
// imageContext.globalCompositeOperation = "destination-out"
|
||||
// for (var i = 0; i < cardMasterOpacity.length; i ++) {
|
||||
// imageContext.globalAlpha = 1 - cardMasterOpacityValue[i] / 100
|
||||
// opacityImage = window[version.currentVersion + "Mask" + cardMasterOpacity[i]].image
|
||||
// imageContext.drawImage(opacityImage, 0, 0, cardWidth, cardHeight)
|
||||
// }
|
||||
// imageContext.globalAlpha = 1
|
||||
// imageContext.globalCompositeOperation = "source-over"
|
||||
updateBottomInfoCanvas()
|
||||
}
|
||||
function updateTextCanvas() {
|
||||
//post processing?
|
||||
updateCardCanvas()
|
||||
}
|
||||
var currentlyWritingText = false
|
||||
//Rewrites all the text!
|
||||
function updateText() {
|
||||
if (!currentlyWritingText) {
|
||||
currentlyWritingText = true
|
||||
setTimeout(updateTextInnerShell, 100)
|
||||
}
|
||||
}
|
||||
function updateTextInnerShell() {
|
||||
version.textList[whichTextIndex][1] = document.getElementById("inputText").value
|
||||
textContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
for (var i = 0; i < version.textList.length; i ++) {
|
||||
var waitUntilIAmDone = textContext.writeText(version.textList[i][1], version.textList[i][2], version.textList[i][3], version.textList[i][4], version.textList[i][5], version.textList[i][6], version.textList[i][7], version.textList[i][8], version.textList[i][9])
|
||||
updateTextCanvas()
|
||||
}
|
||||
}
|
||||
//figures out the placing of the set symbol
|
||||
function updateSetSymbolCanvas() {
|
||||
setSymbolContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var setSymbolWidth, setSymbolHeight, setSymbolX, setSymbolY
|
||||
if (version.setSymbolWidth / version.setSymbolHeight < setSymbol.width / setSymbol.height) {
|
||||
//wider
|
||||
setSymbolWidth = version.setSymbolWidth
|
||||
setSymbolHeight = version.setSymbolWidth / setSymbol.width * setSymbol.height
|
||||
setSymbolX = version.setSymbolRight - setSymbolWidth
|
||||
setSymbolY = version.setSymbolVertical - setSymbolHeight / 2
|
||||
} else {
|
||||
//taller
|
||||
setSymbolHeight = version.setSymbolHeight
|
||||
setSymbolWidth = version.setSymbolHeight / setSymbol.height * setSymbol.width
|
||||
setSymbolX = version.setSymbolRight - setSymbolWidth
|
||||
setSymbolY = version.setSymbolVertical - setSymbolHeight / 2
|
||||
}
|
||||
setSymbolContext.drawImage(setSymbol, setSymbolX, setSymbolY, setSymbolWidth, setSymbolHeight)
|
||||
updateCardCanvas()
|
||||
}
|
||||
function updateWatermarkCanvas() {
|
||||
if (document.getElementById("inputWatermarkPrimary").value != "none") {
|
||||
watermarkContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var watermarkX, watermarkY, watermarkWidth, watermarkHeight
|
||||
if (version.watermarkWidth / version.watermarkHeight < watermark.width / watermark.height) {
|
||||
//wider
|
||||
watermarkWidth = version.watermarkWidth
|
||||
watermarkHeight = version.watermarkWidth / watermark.width * watermark.height
|
||||
watermarkX = cardWidth / 2 - watermarkWidth / 2
|
||||
watermarkY = version.watermarkY - watermarkHeight / 2
|
||||
} else {
|
||||
//taller
|
||||
watermarkHeight = version.watermarkHeight
|
||||
watermarkWidth = version.watermarkHeight / watermark.height * watermark.width
|
||||
watermarkX = cardWidth / 2 - watermarkWidth / 2
|
||||
watermarkY = version.watermarkY - watermarkHeight / 2
|
||||
}
|
||||
watermarkContext.drawImage(watermark, watermarkX, watermarkY, watermarkWidth, watermarkHeight)
|
||||
watermarkContext.globalCompositeOperation = "source-in"
|
||||
if (document.getElementById("inputWatermarkPrimary").value != "default") {
|
||||
watermarkContext.fillStyle = document.getElementById("inputWatermarkPrimary").value
|
||||
watermarkContext.fillRect(0, 0, cardWidth, cardHeight)
|
||||
}
|
||||
if (document.getElementById("inputWatermarkSecondary").value != "none") {
|
||||
watermarkContext.globalCompositeOperation = "source-atop"
|
||||
tempContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
tempContext.drawImage(window[nameArray[nameArray.indexOf("noneMaskSecondary")]].image, 0, 0, cardWidth, cardHeight)
|
||||
tempContext.globalCompositeOperation = "source-in"
|
||||
if (document.getElementById("inputWatermarkSecondary").value == "default") {
|
||||
tempContext.drawImage(watermark, watermarkX, watermarkY, watermarkWidth, watermarkHeight)
|
||||
} else {
|
||||
tempContext.fillStyle = document.getElementById("inputWatermarkSecondary").value
|
||||
tempContext.fillRect(0, 0, cardWidth, cardHeight)
|
||||
}
|
||||
tempContext.globalCompositeOperation = "source-over"
|
||||
watermarkContext.drawImage(tempCanvas, 0, 0, cardWidth, cardHeight)
|
||||
}
|
||||
watermarkContext.globalCompositeOperation = "source-over"
|
||||
} else {
|
||||
watermarkContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
}
|
||||
updateCardCanvas()
|
||||
}
|
||||
//Does the bottom info function! This can be different depending on the version.
|
||||
function updateBottomInfoCanvas() {
|
||||
window[version.bottomInfoFunction]()
|
||||
}
|
||||
function updateCardCanvas() {
|
||||
if (!initiated) {
|
||||
return
|
||||
}
|
||||
//clear it
|
||||
cardContext.fillStyle = "black"
|
||||
cardContext.fillRect(0, 0, cardWidth, cardHeight)
|
||||
//draw the art, frame, text, mana symbols, set symbol, watermark...
|
||||
cardContext.drawImage(cardArt, version.artX + getValue("inputCardArtX"), version.artY + getValue("inputCardArtY"), cardArt.width * getValue("inputCardArtZoom") / 100, cardArt.height * getValue("inputCardArtZoom") / 100)
|
||||
cardContext.drawImage(imageCanvas, 0, 0, cardWidth, cardHeight)
|
||||
cardContext.drawImage(watermarkCanvas, 0, 0, cardWidth, cardHeight)
|
||||
cardContext.drawImage(textCanvas, 0, 0, cardWidth, cardHeight)
|
||||
cardContext.drawImage(bottomInfoCanvas, 0, 0, cardWidth, cardHeight)
|
||||
cardContext.drawManaCost(document.getElementById("inputManaCost").value, version.manaCostX, version.manaCostY, version.manaCostDiameter, version.manaCostDistance, version.manaCostDirection)
|
||||
cardContext.drawImage(setSymbolCanvas, 0, 0, cardWidth, cardHeight)
|
||||
//clear the corners
|
||||
cardContext.globalCompositeOperation = "destination-out"
|
||||
cardContext.drawImage(window[nameArray[nameArray.indexOf("noneMaskCorners")]].image, 0, 0, cardWidth, cardHeight)
|
||||
cardContext.globalCompositeOperation = "source-over"
|
||||
//paste it to the visible canvas
|
||||
mainContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
mainContext.drawImage(cardCanvas, 0, 0, cardWidth, cardHeight)
|
||||
currentlyWritingText = false
|
||||
}
|
||||
//Loads an image in from user input
|
||||
function userLoadImage() {
|
||||
loadImage(getSelectedTab("tabSelectColor"), "preview")
|
||||
}
|
||||
//Enters an image from user input
|
||||
function userEnterImage() {
|
||||
loadImage(getSelectedTab("tabSelectColor"), getSelectedTab("frameType"))
|
||||
}
|
||||
//Removes an image from user input
|
||||
function userRemoveImage() {
|
||||
var targetToRemove = getSelectedTab("frameType")
|
||||
if (document.getElementById("checkboxSecondary").checked) {
|
||||
targetToRemove += "Secondary"
|
||||
}
|
||||
if (cardMasterTypes.includes(targetToRemove) && targetToRemove != "Full") {
|
||||
cardMasterImages.splice(cardMasterTypes.indexOf(targetToRemove), 1)
|
||||
cardMasterTypes.splice(cardMasterTypes.indexOf(targetToRemove), 1)
|
||||
cardMasterUpdated()
|
||||
}
|
||||
}
|
||||
//Loads a script
|
||||
function loadScript(scriptPath){
|
||||
var script = document.createElement("script")
|
||||
script.setAttribute("type","text/javascript")
|
||||
script.setAttribute("src", scriptPath)
|
||||
if (typeof script != "undefined") {
|
||||
document.getElementsByTagName("head")[0].appendChild(script)
|
||||
}
|
||||
}
|
||||
//Adjusts values to the card size
|
||||
function cwidth(inputWidth) {
|
||||
return inputWidth / 750 * cardWidth
|
||||
}
|
||||
function cheight(inputHeight) {
|
||||
return inputHeight / 1050 * cardHeight
|
||||
}
|
||||
//shortcut for parseInt(document.getElementById("").value)
|
||||
function getValue(elementId) {
|
||||
return parseFloat(document.getElementById(elementId).value)
|
||||
}
|
||||
//Changes the version
|
||||
function changeVersionTo(versionToChangeTo) {
|
||||
loadScript("data/versions/" + versionToChangeTo + "Version.js")
|
||||
}
|
||||
function finishChangingVersion() {
|
||||
hideShowFrameTypes()
|
||||
for (var i = 0; i < version.textList.length; i ++) {
|
||||
document.getElementById("inputWhichTextTabs").innerHTML += "<div class='tabButton text' onclick='tabFunction(event, `text`, `option" + version.textList[i][0] + "`, `textTabFunction`)'>" + version.textList[i][0] + "</div>"
|
||||
if (i == 0) {
|
||||
document.getElementsByClassName("tabButton text")[0].classList.add("activeTab")
|
||||
}
|
||||
}
|
||||
updateText()
|
||||
updateBottomInfoCanvas()
|
||||
updateSetSymbolCanvas()
|
||||
}
|
||||
function hideShowFrameTypes() {
|
||||
document.getElementById("frameType").innerHTML = ""
|
||||
document.getElementById("inputImageTypeOpacity").innerHTML = ""
|
||||
for (var i = 0; i < version.typeOrder.length; i ++) {
|
||||
if (!version.typeOrder[i].includes("Secondary") && (!version.typesAdvanced.includes(version.typeOrder[i]) || document.getElementById("checkboxAdvanced").checked)) {
|
||||
tabSelectAddOption("frameType", version.typeOrder[i], version.typeOrder[i])
|
||||
document.getElementById("inputImageTypeOpacity").innerHTML += "<option>" + version.typeOrder[i] + "</option>"
|
||||
// cardMasterOpacity[cardMasterOpacity.length] = version.typeOrder[i]
|
||||
cardMasterOpacityValue[cardMasterOpacityValue.length] = 100
|
||||
}
|
||||
}
|
||||
document.getElementsByClassName("frameType")[0].className += " activeTab"
|
||||
hideShowColors(true)
|
||||
loadOpacityValue()
|
||||
}
|
||||
//Hides and shows the options in inputImageColor to match the selected type
|
||||
function hideShowColors(enter = false) {
|
||||
document.getElementById("tabSelectColor").innerHTML = ""
|
||||
var activeTab = false
|
||||
for (var i = 0; i < versionArray.length; i ++) {
|
||||
if (versionArray[i] == version.currentVersion && (typeArray[i] == getSelectedTab("frameType").replace("Secondary", "") || (typeArray[i] == "Full" && version.typeNotFull.includes(getSelectedTab("frameType")) == false)) && colorArray[i] != "Mask" && (document.getElementById("checkboxAdvanced").checked || advancedArray[i] == "FALSE")) {
|
||||
tabSelectAddOption("tabSelectColor", displayNameArray[i], i)
|
||||
if (displayNameArray[i] == suggestedColor) {
|
||||
document.getElementsByClassName("tabSelectColor")[document.getElementsByClassName("tabSelectColor").length - 1].className += " activeTab"
|
||||
activeTab = true
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!activeTab && document.getElementsByClassName("tabSelectColor").length > 0) {
|
||||
document.getElementsByClassName("tabSelectColor")[0].className += " activeTab"
|
||||
}
|
||||
if (enter) {
|
||||
userEnterImage()
|
||||
}
|
||||
userLoadImage()
|
||||
}
|
||||
//Loads the opacity value
|
||||
function loadOpacityValue() {
|
||||
document.getElementById("inputOpacityValue").value = cardMasterOpacityValue[version.typeOrder.indexOf(document.getElementById("inputImageTypeOpacity").value)] || 100
|
||||
}
|
||||
function opacityValueUpdated() {
|
||||
cardMasterOpacityValue[version.typeOrder.indexOf(document.getElementById("inputImageTypeOpacity").value)] = document.getElementById("inputOpacityValue").value
|
||||
cardMasterUpdated()
|
||||
}
|
||||
//Custom text function! This acts on any codes and makes things look nice :)
|
||||
CanvasRenderingContext2D.prototype.writeText = function(text = "", textX = 0, textY = 0, textWidth = cardWidth, textHeight = cardHeight, textFont = "belerenbsc", inputTextSize = 38, textColor="black", other="") {
|
||||
paragraphContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var textSize = inputTextSize
|
||||
lineContext.font = textSize + "px " + textFont
|
||||
lineContext.fillStyle = textColor
|
||||
var otherParameters = other.split(",")
|
||||
var outline, shadow = 0, oneLine = false, outlineWidth = 2, textAlign = "left", verticalAlign = true, lineSpace = 1
|
||||
for (var i = 0; i < otherParameters.length; i ++) {
|
||||
eval(otherParameters[i])
|
||||
}
|
||||
lineContext.strokeStyle = outline
|
||||
lineContext.lineWidth = outlineWidth
|
||||
var currentLineX = 0
|
||||
var currentLineY = textY + textSize * 0.45
|
||||
var uniqueSplitter = "9dn57gwbt4sh"
|
||||
var splitString = text.replace(/ /g, uniqueSplitter + " " + uniqueSplitter).replace(/{/g, uniqueSplitter + "{").replace(/}/g, "}" + uniqueSplitter).split(uniqueSplitter)
|
||||
splitString[splitString.length] = " "
|
||||
var lastWordAdded = ""
|
||||
for (var i = 0; i < splitString.length; i++) {
|
||||
if (splitString[i] != "") {
|
||||
var wordToWrite = splitString[i]
|
||||
var finishLine = false
|
||||
if (splitString[i].includes("{") && splitString[i].includes("}")) {
|
||||
//It may be a code
|
||||
wordToWrite = ""
|
||||
possibleCodeLower = splitString[i].toLowerCase().replace("{", "").replace("}", "")
|
||||
if (possibleCodeLower == "line" && !oneLine) {
|
||||
finishLine = true
|
||||
currentLineY += textSize * 0.35
|
||||
} else if (possibleCodeLower == "linenospace" && ! oneLine) {
|
||||
finishLine = true
|
||||
} else if (possibleCodeLower == "bar" || possibleCodeLower == "flavor") {
|
||||
finishLine = true
|
||||
var barWidth = manaSymbolImageList[63].width
|
||||
var barHeight = manaSymbolImageList[63].height
|
||||
paragraphContext.drawImage(manaSymbolImageList[63], textX + textWidth / 2 - barWidth / 2, currentLineY + textSize * 0.6, barWidth, barHeight)
|
||||
currentLineY += textSize * 0.8
|
||||
if (possibleCodeLower == "flavor") {
|
||||
lineContext.font = "italic " + (textSize - 3) + "px " + textFont
|
||||
}
|
||||
} else if (possibleCodeLower.includes("fontsize")) {
|
||||
textSize += parseInt(possibleCodeLower.slice(8, possibleCodeLower.length))
|
||||
lineContext.font = textSize + "px " + textFont
|
||||
} else if (possibleCodeLower == "i") {
|
||||
lineContext.font = "italic " + textSize + "px " + textFont
|
||||
} else if (possibleCodeLower == "/i") {
|
||||
lineContext.font = textSize + "px " + textFont
|
||||
} else if (possibleCodeLower == "center") {
|
||||
textAlign = "center"
|
||||
} else if (possibleCodeLower == "right") {
|
||||
textAlign = "right"
|
||||
} else if (possibleCodeLower == "left") {
|
||||
textAlign = "left"
|
||||
} else if (possibleCodeLower.includes("up")) {
|
||||
currentLineY -= (parseInt(possibleCodeLower.slice(2, possibleCodeLower.length)))
|
||||
} else if (possibleCodeLower.includes("down")) {
|
||||
currentLineY += (parseInt(possibleCodeLower.slice(4, possibleCodeLower.length)))
|
||||
} else if (possibleCodeLower.includes("left")) {
|
||||
currentLineX -= (parseInt(possibleCodeLower.slice(4, possibleCodeLower.length)))
|
||||
} else if (possibleCodeLower.includes("right")) {
|
||||
currentLineX += (parseInt(possibleCodeLower.slice(5, possibleCodeLower.length)))
|
||||
} else if (possibleCodeLower == "artistbrush") {
|
||||
var artistBrushWidth = textSize * 1.2
|
||||
lineContext.drawImage(manaSymbolImageList[62], currentLineX, currentLineY - artistBrushWidth * 0.58, artistBrushWidth, artistBrushWidth * 13 / 21)
|
||||
currentLineX += artistBrushWidth * 1.1
|
||||
} else if (possibleCodeLower.includes("fontcolor")) {
|
||||
lineContext.fillStyle = possibleCodeLower.slice(9, possibleCodeLower.length)
|
||||
}else if (possibleCodeLower.includes("font")) {
|
||||
textFont = possibleCodeLower.slice(5, possibleCodeLower.length)
|
||||
lineContext.font = textSize + "px " + textFont
|
||||
} else if (manaSymbolCodeList.includes(possibleCodeLower)) {
|
||||
//THIS HAS TO BE THE LAST ONE
|
||||
var manaSymbolDiameter = textSize * 0.77
|
||||
lineContext.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(possibleCodeLower)], currentLineX, currentLineY - manaSymbolDiameter * 0.95, manaSymbolDiameter, manaSymbolDiameter)
|
||||
currentLineX += manaSymbolDiameter * 1.02
|
||||
} else {
|
||||
wordToWrite = splitString[i]
|
||||
}
|
||||
}
|
||||
if (wordToWrite != "" || finishLine == true) {
|
||||
//We're left with a word. Write it.
|
||||
var currentWordWidth = lineContext.measureText(wordToWrite).width
|
||||
if (i == splitString.length - 1) {
|
||||
//forces the last artificially added space to be too wide, making sure the last line is drawn in.
|
||||
currentWordWidth = textWidth + 1
|
||||
}
|
||||
if (currentLineX + currentWordWidth > textWidth || finishLine) {
|
||||
//Finish the line
|
||||
if (oneLine && i != splitString.length - 1 && inputTextSize > 1) {
|
||||
lineContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
this.writeText(text, textX, textY, textWidth, textHeight, textFont, inputTextSize - 1, textColor, other)
|
||||
return
|
||||
}
|
||||
var alignAdjust = 0
|
||||
if (textAlign == "center" || textAlign == "right") {
|
||||
if (lastWordAdded == " ") {
|
||||
currentLineX -= textContext.measureText(" ").width
|
||||
}
|
||||
if (textAlign == "center") {
|
||||
alignAdjust = textWidth / 2 - currentLineX / 2 + textX
|
||||
} else if (textAlign == "right") {
|
||||
alignAdjust = textWidth + textX - currentLineX
|
||||
}
|
||||
} else {
|
||||
alignAdjust += textX
|
||||
}
|
||||
paragraphContext.drawImage(lineCanvas, 0 + alignAdjust, 0, cardWidth, cardHeight)
|
||||
lineContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
currentLineY += textSize * lineSpace
|
||||
currentLineX = 0
|
||||
if (wordToWrite == " ") {
|
||||
currentWordWidth = 0
|
||||
}
|
||||
}
|
||||
//Whether or not the current line is finished, write to it.
|
||||
if (shadow > 0) {
|
||||
lineContext.fillText(wordToWrite, currentLineX + shadow, currentLineY + shadow)
|
||||
}
|
||||
if (outline != undefined) {
|
||||
lineContext.strokeText(wordToWrite, currentLineX, currentLineY)
|
||||
}
|
||||
lineContext.fillText(wordToWrite, currentLineX, currentLineY)
|
||||
currentLineX += currentWordWidth
|
||||
lastWordAdded = wordToWrite
|
||||
}
|
||||
}
|
||||
}
|
||||
verticalAdjust = 0
|
||||
if (verticalAlign) {
|
||||
verticalAdjust = (textHeight + textY - currentLineY + textSize) / 2
|
||||
}
|
||||
this.drawImage(paragraphCanvas, 0, 0 + verticalAdjust, cardWidth, cardHeight)
|
||||
return "done"
|
||||
}
|
||||
//Loads up all the mana symbol images
|
||||
function loadManaSymbolImages() {
|
||||
for (var i = 0; i < manaSymbolCodeList.length; i++) {
|
||||
manaSymbolImageList[i] = new Image()
|
||||
manaSymbolImageList[i].src = "data/images/manaSymbols/" + i + ".png"
|
||||
}
|
||||
}
|
||||
//Draws a mana cost
|
||||
CanvasRenderingContext2D.prototype.drawManaCost = function(text, symbolsX, symbolsY, diameter = 50, distance = -50, direction = "horizontal") {
|
||||
var splitManaCost = text.replace(/{/g, " ").replace(/}/g, " ").split(" ")
|
||||
var currentSymbolIndex = 0
|
||||
var currentX = symbolsX
|
||||
var currentY = symbolsY
|
||||
for (var i = splitManaCost.length - 1; i >= 0; i --) {
|
||||
if (manaSymbolCodeList.includes(splitManaCost[i])) {
|
||||
if (Array.isArray(direction) && i < direction.length) {
|
||||
currentX = direction[i][0]
|
||||
currentY = direction[i][1]
|
||||
}
|
||||
this.fillStyle = "black"
|
||||
this.beginPath()
|
||||
this.arc(currentX + diameter / 2.1, currentY + diameter / 1.8, diameter / 2, 0, 2 * Math.PI, false)
|
||||
this.fill()
|
||||
this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter)
|
||||
if (direction == "horizontal") {
|
||||
currentX += distance
|
||||
} else if (direction == "vertical") {
|
||||
currentY += distance
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Changes the textarea content to whichever text is currently selected for editing
|
||||
var whichTextIndex = 0
|
||||
function changeWhichText() {
|
||||
for (var i = 0; i < version.textList.length; i ++) {
|
||||
if (version.textList[i][0] == document.getElementById("inputWhichText").value) {
|
||||
whichTextIndex = i
|
||||
}
|
||||
}
|
||||
document.getElementById("inputText").value = version.textList[whichTextIndex][1]
|
||||
}
|
||||
//Removes all the white pixels in an image
|
||||
var whiteThreshold = 250
|
||||
function whiteToTransparent(targetImage, source = targetImage.src) {
|
||||
//Create image, size canvas, draw image
|
||||
var imgTempTarget = new Image()
|
||||
imgTempTarget.crossOrigin = "anonymous"
|
||||
imgTempTarget.src = source
|
||||
imgTempTarget.onload = function() {
|
||||
if (imgTempTarget.width > 0 && imgTempTarget.height > 0) {
|
||||
transparentCanvas.width = imgTempTarget.width
|
||||
transparentCanvas.height = imgTempTarget.height
|
||||
transparentContext.drawImage(imgTempTarget, 0, 0)
|
||||
//declare variables
|
||||
var width = transparentCanvas.width
|
||||
var height = transparentCanvas.height
|
||||
var imageData = transparentContext.getImageData(0, 0, transparentCanvas.width, transparentCanvas.height)
|
||||
var x, y, index
|
||||
//Go through every pixel and
|
||||
for (y = 0; y < height; y++) {
|
||||
for (x = 0; x < width; x++) {
|
||||
index = (y * width + x) * 4
|
||||
if (imageData.data[index] >= whiteThreshold && imageData.data[index + 1] >= whiteThreshold && imageData.data[index + 2] >= whiteThreshold) {
|
||||
imageData.data[index + 3] = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
transparentContext.clearRect(0, 0, width, height)
|
||||
transparentContext.putImageData(imageData, 0, 0)
|
||||
targetImage.src = transparentCanvas.toDataURL()
|
||||
autocrop(targetImage)
|
||||
}
|
||||
}
|
||||
}
|
||||
//Removes all the whitespace in an image
|
||||
function autocrop(targetImage, source = targetImage.src) {
|
||||
//Create image, size canvas, draw image
|
||||
var imgTempTarget = new Image()
|
||||
imgTempTarget.crossOrigin = "anonymous"
|
||||
imgTempTarget.src = source
|
||||
imgTempTarget.onload = function() {
|
||||
if (imgTempTarget.width > 0 && imgTempTarget.height > 0) {
|
||||
cropCanvas.width = imgTempTarget.width
|
||||
cropCanvas.height = imgTempTarget.height
|
||||
cropContext.drawImage(imgTempTarget, 0, 0)
|
||||
//declare variables
|
||||
var width = cropCanvas.width
|
||||
var height = cropCanvas.height
|
||||
var pix = {x:[], y:[]}
|
||||
var imageData = cropContext.getImageData(0, 0, cropCanvas.width, cropCanvas.height)
|
||||
var x, y, index
|
||||
if (imageData.data.length > 4) {
|
||||
//Go through every pixel and
|
||||
for (y = 0; y < height; y++) {
|
||||
for (x = 0; x < width; x++) {
|
||||
//(y * width + x) * 4 + 3 calculates the index at which the alpha value of the pixel at x, y is given
|
||||
index = (y * width + x) * 4 + 3
|
||||
if (imageData.data[index] > 0) {
|
||||
//pix is the image object that stores two arrays of x and y coordinates. These stored coordinates are all the visible pixels
|
||||
pix.x.push(x)
|
||||
pix.y.push(y)
|
||||
}
|
||||
}
|
||||
}
|
||||
//sorts the arrays numerically
|
||||
pix.x.sort(function(a,b){return a-b})
|
||||
pix.y.sort(function(a,b){return a-b})
|
||||
var n = pix.x.length - 1
|
||||
//Finds the difference between the leftmost and rightmost visible pixels, and the topmost and bottommost pixels, cuts out a section of the canvas
|
||||
width = pix.x[n] - pix.x[0]
|
||||
height = pix.y[n] - pix.y[0]
|
||||
var cropped = cropContext.getImageData(pix.x[0], pix.y[0], width + 1, height + 1)
|
||||
//Resizes the canvas and draws cropped image
|
||||
cropCanvas.width = width + 1
|
||||
cropCanvas.height = height + 1
|
||||
cropContext.putImageData(cropped, 0, 0)
|
||||
//Saves the newly cropped image to the given image
|
||||
targetImage.src = cropCanvas.toDataURL()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//The next several functions are all about loading images!
|
||||
function uploadImage(event, destination) {
|
||||
var input = event.target
|
||||
var reader = new FileReader()
|
||||
reader.onload = function() {
|
||||
var dataURL = reader.result
|
||||
destination.src = dataURL
|
||||
}
|
||||
reader.readAsDataURL(input.files[0])
|
||||
}
|
||||
var savedArtList = [], cardArtUrlList = [], cardArtArtistList = []
|
||||
function inputCardArtName(cardArtNameInput) {
|
||||
var xhttp = new XMLHttpRequest()
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
savedArtList = this.responseText.split('"art_crop":"')
|
||||
savedArtList.splice(0, 1)
|
||||
document.getElementById("inputCardArtNameNumber").max = savedArtList.length
|
||||
document.getElementById("inputCardArtNameNumber").value = 1
|
||||
for (i = 0; i < savedArtList.length; i ++) {
|
||||
cardArtUrlList[i] = savedArtList[i].split('","border_crop":')[0]
|
||||
}
|
||||
for (i = 0; i < savedArtList.length; i ++) {
|
||||
cardArtArtistList[i] = savedArtList[i].slice(savedArtList[i].indexOf('"artist":"') + 10, savedArtList[i].indexOf('","artist_ids":'))
|
||||
}
|
||||
inputCardArtNameNumber(1)
|
||||
} else if (this.readyState == 4 && this.status == 404) {
|
||||
alert("Sorry, but we can't seem to find any art for '" + cardArtNameInput + "'")
|
||||
}
|
||||
}
|
||||
xhttp.open("GET", "https://api.scryfall.com/cards/search?order=released&unique=art&q=name%3D" + cardArtNameInput.replace(/ /g, "_"), true)
|
||||
xhttp.send()
|
||||
}
|
||||
function inputCardArtNameNumber(cardArtNameNumberInput) {
|
||||
cardArt.src = cardArtUrlList[cardArtNameNumberInput - 1]
|
||||
document.getElementById("inputInfoArtist").value = cardArtArtistList[cardArtNameNumberInput - 1]
|
||||
updateBottomInfoCanvas()
|
||||
}
|
||||
//Downloads the image!
|
||||
function downloadCardImage(linkElement) {
|
||||
if (document.getElementById("inputInfoArtist").value.replace(/ /g, "") != "") {
|
||||
linkElement.download = version.textList[0][1].toLowerCase().replace(/ /g, "_") + ".png"
|
||||
if (linkElement.download == ".png") {
|
||||
linkElement.download = "card.png"
|
||||
}
|
||||
} else {
|
||||
event.preventDefault()
|
||||
alert("You must properly credit an artist before downloading")
|
||||
}
|
||||
var cardImageData = cardCanvas.toDataURL()
|
||||
if (cardImageData == undefined) {
|
||||
alert("Sorry, it seems that you cannot download your card. Please try using a different browser/device.")
|
||||
}
|
||||
linkElement.href = cardImageData
|
||||
}
|
||||
//Toggles the visibility of tooltips
|
||||
function toggleTooltips(revealed = true) {
|
||||
var tooltipList = document.getElementsByClassName("tooltiptext")
|
||||
for (var i = 0; i < tooltipList.length; i ++) {
|
||||
if (revealed) {
|
||||
tooltipList[i].classList.remove("hidden")
|
||||
} else {
|
||||
tooltipList[i].classList.add("hidden")
|
||||
}
|
||||
}
|
||||
setCookie("tooltipsToggled", revealed + "")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//DELETE: (for testing purposes only)
|
||||
function testFunction() {
|
||||
loadScript("data/scripts/setCodeList.js")
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setCookie(cookieName, cookieValue, cookieTime = (5 * 365 * 24 * 60 * 60 * 1000)) { //years*days*hours*minutes*seconds*milliseconds
|
||||
var tempDate = new Date();
|
||||
tempDate.setTime(tempDate.getTime() + cookieTime);
|
||||
var expires = "expires=" + tempDate.toUTCString();
|
||||
document.cookie = cookieName + "=" + cookieValue + ";" + expires + ";path=/";
|
||||
}
|
||||
function getCookie(cookieName) {
|
||||
var name = cookieName + "=";
|
||||
var cookieArray = document.cookie.split(";");
|
||||
for(var i = 0; i < cookieArray.length; i++) {
|
||||
var tempCookie = cookieArray[i];
|
||||
while (tempCookie.charAt(0) == " ") {
|
||||
tempCookie = tempCookie.substring(1);
|
||||
}
|
||||
if (tempCookie.indexOf(name) == 0) {
|
||||
return tempCookie.substring(name.length, tempCookie.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
function checkCookies() {
|
||||
if (getCookie("tooltipsToggled") == "false") {
|
||||
toggleTooltips(false)
|
||||
document.getElementById("tooltipToggler").checked = false
|
||||
}
|
||||
if (getCookie("advancedBorders") == "true") {
|
||||
document.getElementById("checkboxAdvanced").checked = true
|
||||
hideShowFrameTypes()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function tabFunction(event, section, target, specialFunction = "none") {
|
||||
var tabButtons = document.getElementsByClassName("tabButton " + section)
|
||||
for (var i = 0; i < tabButtons.length; i++) {
|
||||
tabButtons[i].className = tabButtons[i].className.replace(" activeTab", "")
|
||||
}
|
||||
event.currentTarget.className += " activeTab"
|
||||
if (specialFunction != "none") {
|
||||
window[specialFunction](event, section, target)
|
||||
} else {
|
||||
var tabContents = document.getElementsByClassName("tabContent " + section)
|
||||
for (var i = 0; i < tabContents.length; i++) {
|
||||
tabContents[i].className = tabContents[i].className.replace(" displayed", "")
|
||||
}
|
||||
document.getElementById(target).className += " displayed"
|
||||
}
|
||||
}
|
||||
function textTabFunction(event, section, target) {
|
||||
for (var i = 0; i < version.textList.length; i ++) {
|
||||
if (version.textList[i][0] == target.replace("option", "")) {
|
||||
whichTextIndex = i
|
||||
}
|
||||
}
|
||||
document.getElementById("inputText").value = version.textList[whichTextIndex][1]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function tabSelect(event, selectSection) {
|
||||
var tabSelectButtons = document.getElementsByClassName(selectSection)
|
||||
for (var i = 0; i < tabSelectButtons.length; i++) {
|
||||
tabSelectButtons[i].className = tabSelectButtons[i].className.replace(" activeTab", "")
|
||||
}
|
||||
event.target.className += " activeTab"
|
||||
if (selectSection == "frameType") {
|
||||
hideShowColors()
|
||||
} else if (selectSection == "tabSelectColor") {
|
||||
userLoadImage()
|
||||
suggestedColor = displayNameArray[getSelectedTab("tabSelectColor")]
|
||||
}
|
||||
}
|
||||
function getSelectedTab(selectSection) {
|
||||
var tabSelectButtons = document.getElementsByClassName(selectSection)
|
||||
for (var i = 0; i < tabSelectButtons.length; i++) {
|
||||
if (tabSelectButtons[i].className.includes("activeTab")) {
|
||||
return tabSelectButtons[i].id
|
||||
}
|
||||
}
|
||||
}
|
||||
function tabSelectAddOption(tabSection, displayName, tabValue) {
|
||||
document.getElementById(tabSection).innerHTML += "<div class='tabButton tabSelectButton " + tabSection + "' id='" + tabValue + "' onclick='tabSelect(event, `" + tabSection + "`)'>" + displayName + "</div>"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function textCodeTutorial() {
|
||||
var textCodeTutorialString = `line-skips to the next line
|
||||
_linenospace-skips to the next line, but doesn't add spacing
|
||||
_bar-skips to the next line, and adds the flavor text bar
|
||||
_flavor-skips to the next line, adds the flavor text bar, and italicizes the following text
|
||||
_i-italicizes the following text
|
||||
_/i-removes italics from the following text
|
||||
_fontsize#-changes the font size to # pixels
|
||||
_fontcolor#-changes the color to #. Can use color names, or hex codes
|
||||
_left-justifies text to the left
|
||||
_center-justifies text to the center
|
||||
_right-justifies text to the right
|
||||
_up#-moves the following text # pixels up
|
||||
_down#-moves the following text # pixels down
|
||||
_left#-moves the following text # pixels left
|
||||
_right#-moves the following text # pixels right
|
||||
_SYMBOL-creates a mana symbol, where SYMBOL can be: w, u, b, r, g, 1, 2, 3, etc...`
|
||||
var textCodeTutorialArray = textCodeTutorialString.split("_")
|
||||
for (var i = 0; i < textCodeTutorialArray.length; i ++) {
|
||||
document.getElementById("textCodeTutorial").innerHTML += "<div class='selectable'><b>{" + textCodeTutorialArray[i].split("-")[0] + "}</b></div><div>" + textCodeTutorialArray[i].split("-")[1] + "</div>"
|
||||
}
|
||||
}
|
||||
|
||||
function advancedBordersClicked() {
|
||||
hideShowFrameTypes()
|
||||
setCookie("advancedBorders", document.getElementById("checkboxAdvanced").checked + "")
|
||||
}
|
||||
|
||||
|
||||
|
||||
//textCodeTutorial()
|
||||
|
||||
|
||||
/*To do list:
|
||||
watermarks
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
possibly border color?
|
||||
*/
|
@@ -1,400 +0,0 @@
|
||||
/*fonts*/
|
||||
@font-face {
|
||||
font-family: gothammedium;
|
||||
src: url("../fonts/gotham-medium.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: belerenb;
|
||||
src: url("../fonts/beleren-b.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: belerenbsc;
|
||||
src: url("../fonts/beleren-bsc.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: matrix;
|
||||
src: url("../fonts/matrix.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: matrixb;
|
||||
src: url("../fonts/matrix-b.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: matrixbsc;
|
||||
src: url("../fonts/matrix-bsc.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: mplantin;
|
||||
src: url("../fonts/mplantin.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: mplantini;
|
||||
src: url("../fonts/mplantin-i.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: goudymedieval;
|
||||
src: url("../fonts/goudy-medieval.ttf");
|
||||
}
|
||||
:root {
|
||||
--shifting-color-1: #00c300;
|
||||
--shifting-color-1-light: #c8ff64;
|
||||
--light-color: #eee;
|
||||
--dark-color: #333;
|
||||
--clear-light: #fff2;
|
||||
--clear-mid: #fff4;
|
||||
--clear-dark: #fff6;
|
||||
}
|
||||
footer {
|
||||
background-color: var(--dark-color);
|
||||
padding: 2.5em;
|
||||
font: 1.3em gothammedium;
|
||||
color: var(--light-color);
|
||||
}
|
||||
body {
|
||||
margin: 0px;
|
||||
background-image: url(images/lowpoly.png);
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
}
|
||||
html {
|
||||
background-image: linear-gradient(to bottom right, var(--shifting-color-1), var(--shifting-color-1-light));
|
||||
background-attachment: fixed;
|
||||
overflow-x: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
font-size: 8pt;
|
||||
}
|
||||
.selectable {
|
||||
user-select: all;
|
||||
}
|
||||
canvas {
|
||||
width: calc(100%);
|
||||
height: auto;
|
||||
max-width: 750px;
|
||||
max-height: 1050px;
|
||||
}
|
||||
.canvasContainer {
|
||||
text-align: center;
|
||||
}
|
||||
.mainGrid {
|
||||
padding: 0.3em;
|
||||
display: grid;
|
||||
grid-gap: 1.5em;
|
||||
grid-template-columns: auto;
|
||||
font: 1.6em mplantin;
|
||||
}
|
||||
.imageGrid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 9em;
|
||||
min-height: 12.5em;
|
||||
}
|
||||
.imgPreview {
|
||||
width: 100%;
|
||||
}
|
||||
.bar {
|
||||
background-image: url(../images/manaSymbols/63.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 2px;
|
||||
width: 100%;
|
||||
height: 1em;
|
||||
}
|
||||
.cardMenu > div > div:nth-child(1) {
|
||||
/* border: 1px solid blue;*/
|
||||
/* text-align: center;*/
|
||||
/* font: 1.5em belerenbsc;*/
|
||||
}
|
||||
.twoGrid {
|
||||
display: grid;
|
||||
grid-template-columns: 50% auto;
|
||||
}
|
||||
.input, .textarea, .button, .select {
|
||||
font: 1em mplantin;
|
||||
background-color: var(--light-color);
|
||||
border: 1px solid #aaae;
|
||||
border-radius: 0.2em;
|
||||
padding: 0px 0.2em;
|
||||
outline: none;
|
||||
}
|
||||
.textarea {
|
||||
min-height: 6em;
|
||||
max-height: 18em;
|
||||
resize: vertical;
|
||||
}
|
||||
.select {
|
||||
background: #fafafa url(../images/manaSymbols/49.png) no-repeat calc(100% - 0.1em) 50%;
|
||||
background-size: 1em 1em;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
.autoGrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(6em, 1fr));
|
||||
grid-auto-rows: min-content;
|
||||
}
|
||||
.input.file {
|
||||
padding: 0px;
|
||||
height: 1.26em;
|
||||
}
|
||||
.tooltip {
|
||||
position: relative;
|
||||
}
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
background-color: var(--dark-color);
|
||||
color: var(--light-color);
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
top: calc(100% + 5px);
|
||||
left: 0px;
|
||||
max-width: calc(100% - 10px);
|
||||
width: auto;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
.tooltip .tooltiptext::after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent var(--dark-color) transparent;
|
||||
}
|
||||
.tooltip .tooltiptext:hover {
|
||||
/*visibility: hidden;*/
|
||||
opacity: 0;
|
||||
}
|
||||
div.tooltip > * {
|
||||
width: 100%;
|
||||
}
|
||||
a {
|
||||
color: black;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--dark-color);
|
||||
}
|
||||
footer a {
|
||||
color: white;
|
||||
}
|
||||
footer a:hover {
|
||||
color: var(--shifting-color-1-light);
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
.footerGrid {
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
grid-gap: 2em;
|
||||
}
|
||||
.layer {
|
||||
padding: 2em 2em;
|
||||
color: black;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
margin-bottom: 3em;
|
||||
}
|
||||
.layer { /*:nth-child(even)*/
|
||||
background-color: var(--light-color);
|
||||
background-image: url(images/layerBackground.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
font: 1.5em belerenbsc;
|
||||
}
|
||||
.pageTitle {
|
||||
font: 5em belerenbsc;
|
||||
text-align: center;
|
||||
padding-top: 0.3em;
|
||||
}
|
||||
.paragraph {
|
||||
font: 1em mplantin;
|
||||
text-align: left;
|
||||
}
|
||||
.indent {
|
||||
text-indent: 2em;
|
||||
}
|
||||
.leftMargin {
|
||||
margin-left: 2em;
|
||||
}
|
||||
.donate > div:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.donate > div {
|
||||
background-color: var(--clear-light);
|
||||
border-radius: 2em;
|
||||
font: 2em belerenbsc;
|
||||
}
|
||||
.donate > div > img {
|
||||
height: 1em;
|
||||
position: relative;
|
||||
top: 0.15em;
|
||||
left: 0.15em;
|
||||
}
|
||||
|
||||
/*Controls the area taken by the canvas*/
|
||||
@media screen and (min-width: 888pt) {
|
||||
/*Makes room for the canvas and controls to be side by side*/
|
||||
.mainGrid {
|
||||
padding: 1.5em;
|
||||
grid-template-columns: calc(750px + 2px) auto;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: calc(750px + 2em)) {
|
||||
/*The canvas can be full size and doesn't have to scale anymore*/
|
||||
canvas {
|
||||
width: 750px;
|
||||
height: 1050px;
|
||||
}
|
||||
}
|
||||
/*The screen is big enough (larger than phone, likely) to use a larger font*/
|
||||
@media screen and (min-width: 263pt) {
|
||||
html {
|
||||
font-size: 10pt;
|
||||
}
|
||||
}
|
||||
/*These control tooltips for mobile devices vs. desktops/laptops*/
|
||||
@media screen and (min-width: 1024px) {
|
||||
.tooltip:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1023px) {
|
||||
.tooltip:focus .tooltiptext, div.tooltip > input:focus + .tooltiptext, div.tooltip > textarea:focus + .tooltiptext {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
/*The footer can now fit horizontally!*/
|
||||
@media screen and (min-width: 375pt) {
|
||||
.footerGrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(0px, 1fr));
|
||||
grid-gap: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*WIP*/
|
||||
.tab {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(6.5em, 1fr));
|
||||
grid-auto-rows: min-content;
|
||||
}
|
||||
.tab.tabSelect {
|
||||
grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
|
||||
}
|
||||
.tabButton.tabSelectButton {
|
||||
font: 1em belerenb;
|
||||
}
|
||||
.tabButton {
|
||||
text-align: center;
|
||||
background: var(--clear-light);
|
||||
border: 1px solid var(--light-color);
|
||||
font: 1.2em belerenbsc;
|
||||
padding: 0.1em 0em;
|
||||
transition: 0.33s;
|
||||
}
|
||||
.tabButton:hover {
|
||||
background-color: var(--clear-mid);
|
||||
transition: 0s;
|
||||
}
|
||||
.tabButton.activeTab {
|
||||
background: var(--clear-dark);
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--shifting-color-1-light)
|
||||
}
|
||||
.tabContent {
|
||||
display: none;
|
||||
}
|
||||
.tabContent.displayed {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.download {
|
||||
text-align: center;
|
||||
font: 1.5em belerenbsc;
|
||||
}
|
||||
.truncate {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
text-indent: 0em;
|
||||
}
|
||||
.tab, button, select, option {
|
||||
cursor: pointer;
|
||||
}
|
||||
/*Custom Checkboxes*/
|
||||
.realCheckboxContainer {
|
||||
margin-top: 0.45em
|
||||
}
|
||||
.checkboxContainer {
|
||||
position: relative;
|
||||
padding-left: 1.5em;
|
||||
padding-top: 0.25em;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.checkboxContainer input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
.checkmark {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1.2em;
|
||||
width: 1.2em;
|
||||
transition: 0.33s;
|
||||
background-color: var(--clear-light);
|
||||
border: 1px solid var(--light-color)
|
||||
}
|
||||
.checkboxContainer:hover input ~ .checkmark {
|
||||
background-color: var(--clear-dark);
|
||||
}
|
||||
.checkboxContainer input:checked ~ .checkmark {
|
||||
background-color: var(--dark-color);
|
||||
}
|
||||
.checkmark:after {
|
||||
content: "X";
|
||||
font: 1.2em gothammedium;
|
||||
color: white;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
transition: 0.33s;
|
||||
}
|
||||
.checkboxContainer input:checked ~ .checkmark:after {
|
||||
opacity: 1;
|
||||
}
|
||||
.checkboxContainer .checkmark:after {
|
||||
left: 0.15em;
|
||||
top: -0.1em;
|
||||
}
|
||||
#textCodeTutorial {
|
||||
display: grid;
|
||||
grid-template-columns: 6.5em auto;
|
||||
/*padding: 0.5em;*/
|
||||
}
|
||||
#textCodeTutorial > div {
|
||||
padding: 0.25em 0;
|
||||
background-color: var(--clear-mid);
|
||||
}
|
||||
#textCodeTutorial > div:nth-child(4n), #textCodeTutorial > div:nth-child(4n - 1) {
|
||||
background-color: var(--clear-light);
|
||||
}
|
||||
|
||||
|
@@ -1,22 +0,0 @@
|
||||
Disclaimer:
|
||||
-----------------------------------------------------------------------
|
||||
Card Conjurer is in no way affiliated with, sponsored by, or
|
||||
endorsed by Wizards of the Coast. Mana symbols and other related images
|
||||
are trademarks and copyrights of Wizards of the Coast, LLC, a
|
||||
subsidiary of Hasbro, Inc.
|
||||
-----------------------------------------------------------------------
|
||||
Some fonts and/or images used in this program have been gathered from
|
||||
the following sources under the Creative Commons BY-NC-SA 2.5 License:
|
||||
|
||||
MTG Gamepedia (https://mtg.gamepedia.com/Main_Page)
|
||||
Magic Set Editor (http://magicseteditor.boards.net/)
|
||||
|
||||
Changes have been made to some of the images. Card Conjurer is not
|
||||
endorsed by these sources.
|
||||
-----------------------------------------------------------------------
|
||||
Any other uploaded artwork is property of the original artist, and it
|
||||
is at the discretion of the users that these images are properly
|
||||
credited.
|
||||
-----------------------------------------------------------------------
|
||||
CC BY-NC-SA 2.5 License:
|
||||
https://creativecommons.org/licenses/by-nc-sa/2.5/
|
@@ -1,8 +0,0 @@
|
||||
Terms of Use:
|
||||
|
||||
This program is for creative purposes only. It is intended only
|
||||
to be used for personal reasons, and not for commercial
|
||||
production or sale.
|
||||
|
||||
Users must properly credit any artwork that they upload to the
|
||||
program.
|
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 93 KiB |
@@ -1,28 +0,0 @@
|
||||
//============================================//
|
||||
// Full Art Land M15 Border //
|
||||
//============================================//
|
||||
//General Booleans
|
||||
cardData.miracle = false
|
||||
cardData.nyx = false
|
||||
cardData.legendary = false
|
||||
cardData.creature = false
|
||||
cardData.rulesBox = false
|
||||
cardData.rareStamp = false
|
||||
//Specific Values
|
||||
cardData.cardArtX = 60
|
||||
cardData.cardArtY = 120
|
||||
cardData.typeY = cheight(903)
|
||||
cardData.setSymbolY = cheight(893)
|
||||
cardData.watermarkY = cheight(886)
|
||||
cardData.watermarkWidth = cwidth(110)
|
||||
cardData.watermarkHeight = cheight(110)
|
||||
//Images
|
||||
imgArtMask.load("data/borders/fullArtLandM15/imgArtMask.png")
|
||||
imgFrameMask.load("data/borders/fullArtLandM15/imgFrameMask.png")
|
||||
imgPinlineMask.load("data/borders/fullArtLandM15/imgPinlineMask.png")
|
||||
imgTitleMask.load("data/borders/fullArtLandM15/imgTitleMask.png")
|
||||
imgTypeMask.load("data/borders/fullArtLandM15/imgTypeMask.png")
|
||||
//Loads the Colors
|
||||
loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,colorless-Colorless")
|
||||
//Finishes loading the border style
|
||||
finishChangingBorder()
|
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,35 +0,0 @@
|
||||
//============================================//
|
||||
// Full Art Land Unstable Border //
|
||||
//============================================//
|
||||
//General Booleans
|
||||
cardData.miracle = false
|
||||
cardData.nyx = false
|
||||
cardData.legendary = false
|
||||
cardData.creature = false
|
||||
cardData.rulesBox = false
|
||||
cardData.titleTypeBoxes = false
|
||||
cardData.transparency = true
|
||||
//Specific Values
|
||||
cardData.cardArtX = 0
|
||||
cardData.cardArtY = 0
|
||||
cardData.titleAlignment = "center"
|
||||
cardData.titleX = cwidth(50)
|
||||
cardData.titleWidth = cwidth(650)
|
||||
cardData.titleY = cheight(48)
|
||||
cardData.titleRight = cwidth(999)
|
||||
cardData.manaSymbolDirection = "none"
|
||||
document.getElementById("inputTitleColor").value = "#ffffff"
|
||||
imgRareStamp.load("none", cwidth(329), cheight(949), cwidth(90), cheight(50))
|
||||
imgRareStampRight.load("none", cwidth(329), cheight(949), cwidth(90), cheight(50))
|
||||
cardData.setSymbolX = cardWidth / 2
|
||||
cardData.setSymbolY = cheight(80)
|
||||
cardData.setSymbolAlignment = "center"
|
||||
//Images
|
||||
imgArtMask.load("data/borders/fullArtLandUnstable/imgArtMask.png")
|
||||
imgBorderMask.load("data/borders/fullArtLandUnstable/imgBorderMask.png")
|
||||
imgFrameMask.load("data/borders/fullArtLandUnstable/imgFrameMask.png")
|
||||
imgPinlineMask.load("data/borders/fullArtLandUnstable/imgPinlineMask.png")
|
||||
//Loads the Colors
|
||||
loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,colorless-Colorless")
|
||||
//Finishes loading the border style
|
||||
finishChangingBorder()
|
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 3.7 KiB |
@@ -1,7 +0,0 @@
|
||||
//============================================//
|
||||
// M15 Border //
|
||||
//============================================//
|
||||
//Loads the colors
|
||||
loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,artifact-Artifact,colorless-Colorless,vehicle-Vehicle,whiteLand-White Land,blueLand-Blue Land,blackLand-Black Land,redLand-Red Land,greenLand-Green Land,goldLand-Gold Land,colorlessLand-Colorless Land")
|
||||
//Finishes loading the border style
|
||||
finishChangingBorder()
|
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 20 KiB |