Compare commits
No commits in common. "c41bc2c7961d9bd9f1dab7275fee79f8461809d3" and "862a6954baa17ea438907fded75fa4debb709da6" have entirely different histories.
c41bc2c796
...
862a6954ba
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,2 @@
|
||||
.vscode/
|
||||
node_modules/
|
||||
note.txt
|
||||
test*
|
21
TODO.md
21
TODO.md
@ -1,18 +1,9 @@
|
||||
# ToDo
|
||||
- [ ] Colorspace selection.
|
||||
- [X] Add Aspect ratio awareness.
|
||||
- [X] Move download buttons to preview area.
|
||||
- [ ] Add Impressum, Datenschutzerklärung and About page. -> Just Links.
|
||||
- [ ] Add Aspect ratio awareness.
|
||||
- [ ] Move download buttons to preview area.
|
||||
- [ ] Add Impressum, Datenschutzerklärung and About page.
|
||||
- [ ] Mention trianglify.
|
||||
- [X] Randomly generate Pattern intensity, Triangle variance and Cell size.
|
||||
- [X] Add random color button as buttongroup next to "regenerate pattern" button.
|
||||
- [X] Switch to a js package manager and deliver js without external cdns.
|
||||
- [ ] Investigate size issue
|
||||
- [ ] Use datasets for all values
|
||||
- [W] x, y color allow to set both(buttongroup to switch axis) default for y axis = match
|
||||
- [ ] Concept to not overload the UI while preserving all features
|
||||
- [ ] Predefinded resolution picker(1080p, 1440p..)
|
||||
- [ ] Add api via get parameters
|
||||
- [ ] share link (api?)
|
||||
- [ ] Animation pattern system
|
||||
- [ ] Custom points (logos?)
|
||||
- [ ] Randomly generate Pattern intensity, Triangle variance and Cell size.
|
||||
- [ ] Add random color button as buttongroup next to "regenerate pattern" button.
|
||||
- [ ] Switch to a js package manager and deliver js without external cdns.
|
||||
|
@ -25,62 +25,12 @@ main {
|
||||
.hoverGrow:hover {
|
||||
transform: scale(1.025);
|
||||
transition-duration: .2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.svg-center {
|
||||
|
||||
#svg-center {
|
||||
-webkit-transform: translateX(-50%);
|
||||
-ms-transform: translateX(-50%);
|
||||
transform: translateX(-50%);
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.preview {
|
||||
flex: 1 1 auto;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.preview_content {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 15px; /* TOP, RIGHT, BOTTOM, LEFT */
|
||||
}
|
||||
|
||||
.preview canvas {
|
||||
z-index: 1000000;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
flex: 1 1 auto;
|
||||
height: auto;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, .2));
|
||||
}
|
||||
|
||||
.preview-float {
|
||||
position: absolute !important;
|
||||
z-index: 1000001;
|
||||
bottom: 10px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#colorpattern.active {
|
||||
box-sizing: border-box;
|
||||
outline: 3px cyan solid;
|
||||
transform: scale(1.025);
|
||||
transition-duration: .2s;
|
||||
}
|
||||
|
||||
.opacity {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.opacity:hover {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
100
index.html
100
index.html
@ -8,45 +8,40 @@
|
||||
<meta name="description" content="A FOSS UI for trianglify">
|
||||
<meta name="author" content="[Project-Name-Here]">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="bg-secondary" id="main">
|
||||
<div id="left-nav" class="d-flex flex-column flex-shrink-0 p-3 text-center text-white bg-dark"
|
||||
style="width: 350px;">
|
||||
<div id="left-nav" class="d-flex flex-column flex-shrink-0 p-3 text-center text-white bg-dark" style="width: 350px;">
|
||||
<a class="fs-4 w-100 mb-3 mb-md-0 text-white text-decoration-none">[ Trigen ]</a>
|
||||
<hr>
|
||||
<div class="container m-2">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input type="number" class="changable form-control" id="CanvasWidth"
|
||||
placeholder="3840" value="3840">
|
||||
<input type="number" class="changable form-control" id="CanvasWidth" placeholder="1920" value="1920">
|
||||
</div>
|
||||
<div class="col-1 svg-center">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z" />
|
||||
<path fill-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z" />
|
||||
<div class="col-1" id="svg-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z"/>
|
||||
<path fill-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<input type="number" class="changable form-control" id="CanvasHeight"
|
||||
placeholder="2160" value="2160">
|
||||
<input type="number" class="changable form-control" id="CanvasHeight" placeholder="1080" value="1080">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="my-2 btn-group" role="group">
|
||||
<input data-name="gradient" type="radio" class="radio-changable btn-check"
|
||||
name="btnradio" id="btnradio1" autocomplete="off" checked>
|
||||
|
||||
<div class="my-2 btn-group" role="group" aria-label="Basic radio toggle button group">
|
||||
<input data-name="gradient" type="radio" class="radio-changable btn-check" name="btnradio" id="btnradio1" autocomplete="off" checked>
|
||||
<label class="btn btn-outline-primary" for="btnradio1">Gradient</label>
|
||||
|
||||
<input data-name="sparkle" type="radio" class="radio-changable btn-check"
|
||||
name="btnradio" id="btnradio2" autocomplete="off">
|
||||
<input data-name="sparkle" type="radio" class="radio-changable btn-check" name="btnradio" id="btnradio2" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="btnradio2">Sparkle</label>
|
||||
|
||||
<input data-name="shadows" type="radio" class="radio-changable btn-check"
|
||||
name="btnradio" id="btnradio3" autocomplete="off">
|
||||
<input data-name="shadows" type="radio" class="radio-changable btn-check" name="btnradio" id="btnradio3" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="btnradio3">Shadows</label>
|
||||
</div>
|
||||
|
||||
@ -59,69 +54,26 @@
|
||||
<label for="rangeCell" class="form-label">Cell size</label>
|
||||
<input type="range" class="changable form-range" id="rangeCell" min="0.25" max="1" step="0.01">
|
||||
|
||||
<button type="button" class="my-2 mb-0 btn btn-outline-warning badge" id="randomize">Randomize values</button>
|
||||
<button type="button" class="my-2 btn btn-outline-success rounded-pill" id="generate_seed">Regenerate pattern</button>
|
||||
|
||||
<div class="my-2 mt-0 btn-group" role="group">
|
||||
<button type="button" class="my-2 btn btn-outline-success badge" id="generate_seed">Regenerate pattern</button>
|
||||
<button type="button" class="my-2 btn btn-outline-success badge" id="generate_color">Random color</button>
|
||||
</div>
|
||||
<label class="mt-2">Colors</label>
|
||||
<ul class="m-0 p-0" id="color-patterns"></ul>
|
||||
|
||||
|
||||
<ul class="nav nav-pills nav-fill" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="xcolors-tab" data-bs-toggle="tab" data-bs-target="#xcolors" type="button" role="tab" aria-selected="true">Colors (X Axis)</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link disabled" id="ycolors-tab" data-bs-toggle="tab" data-bs-target="#ycolors" type="button" role="tab" aria-selected="false">Colors (Y Axis)</button> <!-- TODO -->
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="xcolors" role="tabpanel" aria-labelledby="xcolors-tab">
|
||||
<label class="mt-2">Colors (X Axis)</label>
|
||||
<ul class="m-0 p-0" id="color-patterns-x"></ul>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="ycolors" role="tabpanel" aria-labelledby="ycolors-tab">
|
||||
<label class="mt-2">Colors (Y Axis)</label>
|
||||
<ul class="m-0 p-0" id="color-patterns-y"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="preview">
|
||||
<div class="preview_content">
|
||||
<canvas class="bg-light" id="pattern"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="preview-float d-flex">
|
||||
<button type="button" class="opacity mx-2 svg-center btn btn-outline-transparent rounded-circle border-0" id="export_png">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-filetype-png" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5Zm-3.76 8.132c.076.153.123.317.14.492h-.776a.797.797 0 0 0-.097-.249.689.689 0 0 0-.17-.19.707.707 0 0 0-.237-.126.96.96 0 0 0-.299-.044c-.285 0-.506.1-.665.302-.156.201-.234.484-.234.85v.498c0 .234.032.439.097.615a.881.881 0 0 0 .304.413.87.87 0 0 0 .519.146.967.967 0 0 0 .457-.096.67.67 0 0 0 .272-.264c.06-.11.091-.23.091-.363v-.255H8.82v-.59h1.576v.798c0 .193-.032.377-.097.55a1.29 1.29 0 0 1-.293.458 1.37 1.37 0 0 1-.495.313c-.197.074-.43.111-.697.111a1.98 1.98 0 0 1-.753-.132 1.447 1.447 0 0 1-.533-.377 1.58 1.58 0 0 1-.32-.58 2.482 2.482 0 0 1-.105-.745v-.506c0-.362.067-.678.2-.95.134-.271.328-.482.582-.633.256-.152.565-.228.926-.228.238 0 .45.033.636.1.187.066.348.158.48.275.133.117.238.253.314.407Zm-8.64-.706H0v4h.791v-1.343h.803c.287 0 .531-.057.732-.172.203-.118.358-.276.463-.475a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.475-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.381.574.574 0 0 1-.238.24.794.794 0 0 1-.375.082H.788v-1.406h.66c.218 0 .389.06.512.182.123.12.185.295.185.521Zm1.964 2.666V13.25h.032l1.761 2.675h.656v-3.999h-.75v2.66h-.032l-1.752-2.66h-.662v4h.747Z" />
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="opacity mx-2 svg-center btn btn-outline-transparent rounded-circle border-0" id="export_svg">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-filetype-svg" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM0 14.841a1.13 1.13 0 0 0 .401.823c.13.108.288.192.478.252.19.061.411.091.665.091.338 0 .624-.053.858-.158.237-.105.416-.252.54-.44a1.17 1.17 0 0 0 .187-.656c0-.224-.045-.41-.135-.56a1 1 0 0 0-.375-.357 2.027 2.027 0 0 0-.565-.21l-.621-.144a.97.97 0 0 1-.405-.176.37.37 0 0 1-.143-.299c0-.156.061-.284.184-.384.125-.101.296-.152.513-.152.143 0 .266.023.37.068a.625.625 0 0 1 .245.181.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.199-.566 1.21 1.21 0 0 0-.5-.41 1.813 1.813 0 0 0-.78-.152c-.293 0-.552.05-.776.15-.225.099-.4.24-.528.421-.127.182-.19.395-.19.639 0 .201.04.376.123.524.082.149.199.27.351.367.153.095.332.167.54.213l.618.144c.207.049.36.113.462.193a.387.387 0 0 1 .153.326.512.512 0 0 1-.085.29.559.559 0 0 1-.256.193c-.111.047-.249.07-.413.07-.117 0-.224-.013-.32-.04a.837.837 0 0 1-.248-.115.578.578 0 0 1-.255-.384H0Zm4.575 1.09h.952l1.327-3.999h-.879l-.887 3.138H5.05l-.897-3.138h-.917l1.339 4Zm5.483-3.293c.076.152.123.316.14.492h-.776a.797.797 0 0 0-.096-.249.689.689 0 0 0-.17-.19.707.707 0 0 0-.237-.126.963.963 0 0 0-.3-.044c-.284 0-.506.1-.664.302-.157.2-.235.484-.235.85v.497c0 .235.033.44.097.616a.881.881 0 0 0 .305.413.87.87 0 0 0 .518.146.965.965 0 0 0 .457-.097.67.67 0 0 0 .273-.263c.06-.11.09-.23.09-.364v-.254h-.823v-.59h1.576v.798c0 .193-.032.377-.096.55a1.29 1.29 0 0 1-.293.457 1.37 1.37 0 0 1-.495.314c-.198.074-.43.111-.698.111a1.98 1.98 0 0 1-.752-.132 1.447 1.447 0 0 1-.534-.377 1.58 1.58 0 0 1-.319-.58 2.482 2.482 0 0 1-.105-.745v-.507c0-.36.066-.677.199-.949.134-.271.329-.482.583-.633.256-.152.564-.228.926-.228.238 0 .45.033.635.1.188.066.348.158.48.275.134.117.238.253.314.407Z" />
|
||||
</svg>
|
||||
</button>
|
||||
<div class="my-2 btn-group" role="group" aria-label="Basic radio toggle button group">
|
||||
<button type="button" class="my-2 btn btn-outline-success" id="export_png">Export as png</button>
|
||||
<button type="button" class="my-2 btn btn-outline-danger" id="export_svg">Export as svg</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<canvas class="w-100 m-5 shadow-lg" id="pattern"></canvas>
|
||||
</main>
|
||||
<a id="link"></a>
|
||||
|
||||
<!-- JS Imports-->
|
||||
<script src='node_modules/trianglify/dist/trianglify.bundle.js'></script>
|
||||
<script src="node_modules/jquery/dist/jquery.min.js"></script>
|
||||
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
//eval(atob("bGV0IHVybFBhcmFtcyA9IG5ldyBVUkxTZWFyY2hQYXJhbXMod2luZG93LmxvY2F0aW9uLnNlYXJjaCk7IGlmICghdXJsUGFyYW1zLmhhcygnbm9yaWNrJykpIHtzZXRUaW1lb3V0KCgpID0+IHt3aW5kb3cub3BlbigiaHR0cHM6Ly9zaGF0dGVyZWRkaXNrLmdpdGh1Yi5pby9yaWNrcm9sbC9yaWNrcm9sbC5tcDQiLCAiX2JsYW5rIil9LCBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKyAxMCAqIDEwMDApKX07"));
|
||||
$(".darkreader").remove() // Very ugly fix to prevent DarkReader from messing with everything. @Darkreader why are you like this? /TODO
|
||||
</script>
|
||||
<script src="./js/ExportImage.js"></script> <!-- Export functions to get png/svg files -->
|
||||
<script src='https://unpkg.com/trianglify@^4.1.1/dist/trianglify.bundle.js'></script>
|
||||
<script src="https://unpkg.com/jquery@3.6.0/dist/jquery.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||
<script>eval(atob("bGV0IHVybFBhcmFtcyA9IG5ldyBVUkxTZWFyY2hQYXJhbXMod2luZG93LmxvY2F0aW9uLnNlYXJjaCk7IGlmICghdXJsUGFyYW1zLmhhcygnbm9yaWNrJykpIHtzZXRUaW1lb3V0KCgpID0+IHt3aW5kb3cub3BlbigiaHR0cHM6Ly9zaGF0dGVyZWRkaXNrLmdpdGh1Yi5pby9yaWNrcm9sbC9yaWNrcm9sbC5tcDQiLCAiX2JsYW5rIil9LCBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKyAxMCAqIDEwMDApKX07"));</script>
|
||||
<script src="./js/ExportImage.js"></script>
|
||||
<script src="./js/index.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,3 +0,0 @@
|
||||
class Generator {
|
||||
|
||||
}
|
120
js/index.js
120
js/index.js
@ -1,32 +1,17 @@
|
||||
/**
|
||||
* Copyright (c) 2022
|
||||
*
|
||||
* This product aims to provide up zo 100% api coverage from trianglify to the end user.
|
||||
* This is not a trianglify.io clone
|
||||
*
|
||||
* @author TheGreydiamond <https://github.com/TheGreyDiamond>
|
||||
* @author Spacelord09 <https://github.com/Spacelord09>
|
||||
* @author HATBE <https://github.com/HATBE>
|
||||
*/
|
||||
|
||||
const ExportImageC = new ExportImage(); // Class
|
||||
const debugmode = true; // Enables debug messages
|
||||
|
||||
// TODO
|
||||
let globalConfig = { // Initial config object including initial values. ONLY STATIC VALUES, function generated values are declared as "NULL".
|
||||
width: 3840,
|
||||
height: 2160,
|
||||
xColors: null,
|
||||
yColors: null,
|
||||
cellSize: 255 * 0.5,
|
||||
variance: 0.5,
|
||||
seed: null,
|
||||
colorSpace: 'lab',
|
||||
colorFunction: null,
|
||||
}
|
||||
let ExportImageC = new ExportImage();
|
||||
|
||||
const targetCanvas = document.getElementById('pattern');
|
||||
let colorPaternsElX = $("#color-patterns-x");
|
||||
let colorPaternsElY = $("#color-patterns-y");
|
||||
let colorPaternsEl = $("#color-patterns");
|
||||
|
||||
const colorpatterns = {
|
||||
YlGn: ['#ffffe5', '#f7fcb9', '#d9f0a3', '#addd8e', '#78c679', '#41ab5d', '#238443', '#006837', '#004529'],
|
||||
@ -55,19 +40,10 @@ const colorpatterns = {
|
||||
RdGy: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#ffffff', '#e0e0e0', '#bababa', '#878787', '#4d4d4d', '#1a1a1a'],
|
||||
RdYlBu: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee090', '#ffffbf', '#e0f3f8', '#abd9e9', '#74add1', '#4575b4', '#313695'],
|
||||
Spectral: ['#9e0142', '#d53e4f', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#e6f598', '#abdda4', '#66c2a5', '#3288bd', '#5e4fa2'],
|
||||
RdYlGn: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850', '#006837'],
|
||||
|
||||
spacelord: ['#000000', '#0bff09'],
|
||||
hatbe: ['#2B3342', '#9F9F9F'],
|
||||
greydiamond: ['#000000', '#FFFFFF', '#000000'],
|
||||
|
||||
blacks: ['#000000', '#FFFFFF', '#000000'],
|
||||
dgreys: ['#ffffff', '#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252', '#252525', '#000000', '#252525', '#525252', '#737373', '#969696', '#bdbdbd', '#d9d9d9', '#f0f0f0', '#ffffff'],
|
||||
rdgreys: [ "#000000", "#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0", "#ffffff", '#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252', '#252525', '#000000'],
|
||||
rdgreysr: [ "#000000", "#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0", "#e31a1c", '#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252', '#252525', '#000000']
|
||||
RdYlGn: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850', '#006837']
|
||||
};
|
||||
|
||||
let selectedColorPattern = generateRandColor(); // get random init colors
|
||||
let selectedColorPattern = generateRandColor() // get random init colors
|
||||
let pattern = null;
|
||||
let seed = null;
|
||||
let colorFunctionUsr = null;
|
||||
@ -81,7 +57,7 @@ let colorFunctionUsr = null;
|
||||
*/
|
||||
|
||||
function generateRandColor() {
|
||||
return (Object.keys(colorpatterns)[Object.keys(colorpatterns).length * Math.random() << 0]);
|
||||
return(colorpatterns[Object.keys(colorpatterns)[Object.keys(colorpatterns).length * Math.random() << 0]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,13 +72,14 @@ function generateSeed() {
|
||||
for (let i = 0; i < 64; i++) {
|
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||
}
|
||||
return (btoa(result));
|
||||
// return("PATTERN"); // DEBUG
|
||||
return(btoa(result));
|
||||
}
|
||||
|
||||
/**
|
||||
* Regenerates canvas
|
||||
* @param {*} targetCanvas Canvas to print on.
|
||||
* @returns {Object} trianglifyObj Generated basic Trianglify object
|
||||
* @returns
|
||||
*/
|
||||
|
||||
function generateCanvas(targetCanvas) {
|
||||
@ -129,34 +106,24 @@ function generateCanvas(targetCanvas) {
|
||||
const options = {
|
||||
width: usrWidth,
|
||||
height: usrHeight,
|
||||
xColors: colorpatterns[selectedColorPattern],
|
||||
xColors: selectedColorPattern,
|
||||
yColors: 'match',
|
||||
cellSize: 255 * usrCell,
|
||||
variance: usrVar,
|
||||
seed: seed,
|
||||
colorSpace: "lab",
|
||||
colorFunction: colFunc,
|
||||
// strokeWidth: 1,
|
||||
fill: true
|
||||
}
|
||||
|
||||
const trianglifyObj = trianglify(options);
|
||||
|
||||
try {
|
||||
trianglifyObj.toCanvas(targetCanvas);
|
||||
} catch (e) {
|
||||
debugmode && console.error(e);
|
||||
console.error("Could not print to canvas! Resolution is probably to high.");
|
||||
}
|
||||
|
||||
return trianglifyObj;
|
||||
}
|
||||
|
||||
function generateColorPatterns() {
|
||||
for (const pattern in colorpatterns) {
|
||||
for(const pattern in colorpatterns) {
|
||||
const liEl = document.createElement('li');
|
||||
liEl.id = `colorpattern`;
|
||||
liEl.classList.add(`colorpattern-${pattern}`);
|
||||
liEl.dataset.name = pattern;
|
||||
liEl.style.display = "flex";
|
||||
liEl.style.flex = "grow";
|
||||
@ -173,35 +140,10 @@ function generateColorPatterns() {
|
||||
liEl.appendChild(colEl);
|
||||
});
|
||||
|
||||
colorPaternsElX.append(liEl);
|
||||
colorPaternsEl.append(liEl);
|
||||
}
|
||||
|
||||
updateActiveColor(document.querySelector(`.colorpattern-${selectedColorPattern}`));
|
||||
}
|
||||
|
||||
function updateActiveColor(activeItem) {
|
||||
const actives = document.querySelectorAll('#colorpattern.active');
|
||||
actives.forEach(item => item.classList.remove('active'));
|
||||
activeItem.classList.add('active');
|
||||
}
|
||||
|
||||
function getRandomColor() {
|
||||
var letters = '0123456789ABCDEF';
|
||||
var color = '#';
|
||||
for (var i = 0; i < 6; i++) {
|
||||
color += letters[Math.floor(Math.random() * 16)];
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
function generateRandomColorArray(size) {
|
||||
let colors = [];
|
||||
for (let i = 0; i < size; i++) {
|
||||
colors.push(getRandomColor());
|
||||
}
|
||||
return colors;
|
||||
};
|
||||
|
||||
// ================
|
||||
// Listeners
|
||||
|
||||
@ -213,7 +155,7 @@ $('input.changable').on('input', () => {
|
||||
// == check for radio input : generate new canvas
|
||||
$('input.radio-changable').on('click', (e) => {
|
||||
colorFunctionUsr = e.target.dataset.name;
|
||||
pattern = generateCanvas(targetCanvas);
|
||||
generateCanvas(targetCanvas);
|
||||
});
|
||||
|
||||
// == export canvas to svg
|
||||
@ -227,47 +169,23 @@ $('#export_png').on('click', () => {
|
||||
});
|
||||
|
||||
// == listen on click on colors
|
||||
colorPaternsElX.on('click', (e) => {
|
||||
if (e.target.parentNode.dataset.name) {
|
||||
colorPaternsEl.on('click', (e) => {
|
||||
if(e.target.parentNode.dataset.name) {
|
||||
selectedColorPattern = e.target.parentNode.dataset.name;
|
||||
updateActiveColor(e.target.parentNode);
|
||||
pattern = generateCanvas(targetCanvas);
|
||||
generateCanvas(targetCanvas);
|
||||
}
|
||||
});
|
||||
|
||||
$('#generate_seed').on('click', () => {
|
||||
seed = generateSeed();
|
||||
pattern = generateCanvas(targetCanvas);
|
||||
});
|
||||
|
||||
$('#generate_color').on('click', () => {
|
||||
selectedColorPattern = generateRandColor();
|
||||
updateActiveColor(document.querySelector(`.colorpattern-${selectedColorPattern}`));
|
||||
pattern = generateCanvas(targetCanvas);
|
||||
});
|
||||
|
||||
$('#randomize').on('click', () => {
|
||||
let rangeIntense = document.getElementById("rangeIntense");
|
||||
let rangeVar = document.getElementById("rangeVar");
|
||||
let rangeCell = document.getElementById("rangeCell");
|
||||
|
||||
rangeIntense.value = Math.random() * (parseInt(rangeIntense.min) - parseInt(rangeIntense.max)) + parseInt(rangeIntense.max);
|
||||
rangeVar.value = Math.random() * (parseInt(rangeVar.min) - parseInt(rangeVar.max)) + parseInt(rangeVar.max);
|
||||
rangeCell.value = Math.random() * (parseInt(rangeCell.min) - parseInt(rangeCell.max)) + parseInt(rangeCell.max);
|
||||
pattern = generateCanvas(targetCanvas);
|
||||
generateCanvas(targetCanvas);
|
||||
});
|
||||
|
||||
// ================
|
||||
// Stuff we do initially.
|
||||
// Stuff we do.
|
||||
|
||||
seed = generateSeed();
|
||||
|
||||
for (let i = 2; i < 9; i=i*2) {
|
||||
for (let j = 1; j < 17; j++) {
|
||||
//debugmode && console.log(`I=${i}, J=${j}`);
|
||||
colorpatterns[`random-${i}-${j}`] = generateRandomColorArray(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
generateColorPatterns();
|
||||
|
||||
pattern = generateCanvas(targetCanvas);
|
||||
|
486
package-lock.json
generated
486
package-lock.json
generated
@ -1,486 +0,0 @@
|
||||
{
|
||||
"name": "trigen",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@mapbox/node-pre-gyp": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz",
|
||||
"integrity": "sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==",
|
||||
"requires": {
|
||||
"detect-libc": "^1.0.3",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"make-dir": "^3.1.0",
|
||||
"node-fetch": "^2.6.5",
|
||||
"nopt": "^5.0.0",
|
||||
"npmlog": "^5.0.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.3.5",
|
||||
"tar": "^6.1.11"
|
||||
}
|
||||
},
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
||||
},
|
||||
"agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"requires": {
|
||||
"debug": "4"
|
||||
}
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
|
||||
},
|
||||
"aproba": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
|
||||
"integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ=="
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
|
||||
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
|
||||
"requires": {
|
||||
"delegates": "^1.0.0",
|
||||
"readable-stream": "^3.6.0"
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
},
|
||||
"bootstrap": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz",
|
||||
"integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q=="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"canvas": {
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.9.0.tgz",
|
||||
"integrity": "sha512-0l93g7uxp7rMyr7H+XRQ28A3ud0dKIUTIEkUe1Dxh4rjUYN7B93+SjC3r1PDKA18xcQN87OFGgUnyw7LSgNLSQ==",
|
||||
"requires": {
|
||||
"@mapbox/node-pre-gyp": "^1.0.0",
|
||||
"nan": "^2.15.0",
|
||||
"simple-get": "^3.0.3"
|
||||
}
|
||||
},
|
||||
"chownr": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
|
||||
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
|
||||
},
|
||||
"chroma-js": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz",
|
||||
"integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A=="
|
||||
},
|
||||
"color-support": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"decompress-response": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
|
||||
"integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
|
||||
"requires": {
|
||||
"mimic-response": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"delaunator": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/delaunator/-/delaunator-4.0.1.tgz",
|
||||
"integrity": "sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag=="
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
|
||||
},
|
||||
"detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||
},
|
||||
"fs-minipass": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
||||
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
|
||||
"requires": {
|
||||
"minipass": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||
},
|
||||
"gauge": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
|
||||
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
|
||||
"requires": {
|
||||
"aproba": "^1.0.3 || ^2.0.0",
|
||||
"color-support": "^1.1.2",
|
||||
"console-control-strings": "^1.0.0",
|
||||
"has-unicode": "^2.0.1",
|
||||
"object-assign": "^4.1.1",
|
||||
"signal-exit": "^3.0.0",
|
||||
"string-width": "^4.2.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"wide-align": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
|
||||
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"has-unicode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
||||
},
|
||||
"https-proxy-agent": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
|
||||
"integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
|
||||
"requires": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
}
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"requires": {
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"make-dir": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
|
||||
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
|
||||
"requires": {
|
||||
"semver": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"mimic-response": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
|
||||
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minipass": {
|
||||
"version": "3.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz",
|
||||
"integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==",
|
||||
"requires": {
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"minizlib": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
|
||||
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
|
||||
"requires": {
|
||||
"minipass": "^3.0.0",
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.15.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
|
||||
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"requires": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"nopt": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
|
||||
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
|
||||
"requires": {
|
||||
"abbrev": "1"
|
||||
}
|
||||
},
|
||||
"npmlog": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
|
||||
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
|
||||
"requires": {
|
||||
"are-we-there-yet": "^2.0.0",
|
||||
"console-control-strings": "^1.1.0",
|
||||
"gauge": "^3.0.0",
|
||||
"set-blocking": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
||||
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
||||
"requires": {
|
||||
"glob": "^7.1.3"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||
},
|
||||
"simple-concat": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
||||
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
||||
},
|
||||
"simple-get": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",
|
||||
"integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
|
||||
"requires": {
|
||||
"decompress-response": "^4.2.0",
|
||||
"once": "^1.3.1",
|
||||
"simple-concat": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"requires": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"tar": {
|
||||
"version": "6.1.11",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
|
||||
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
|
||||
"requires": {
|
||||
"chownr": "^2.0.0",
|
||||
"fs-minipass": "^2.0.0",
|
||||
"minipass": "^3.0.0",
|
||||
"minizlib": "^2.1.1",
|
||||
"mkdirp": "^1.0.3",
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
||||
},
|
||||
"trianglify": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/trianglify/-/trianglify-4.1.1.tgz",
|
||||
"integrity": "sha512-zWfv8Qq9b3eYYiMMseGd1kvOW4xqfyGXs5xSA3pgpM2ynP+ABSFK81yVtwk4Waj9tC9jwJLiR3DHLPKlzZYO5Q==",
|
||||
"requires": {
|
||||
"canvas": "^2.6.1",
|
||||
"chroma-js": "^2.1.0",
|
||||
"delaunator": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
||||
"requires": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"wide-align": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
|
||||
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
|
||||
"requires": {
|
||||
"string-width": "^1.0.2 || 2 || 3 || 4"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
}
|
||||
}
|
||||
}
|
19
package.json
19
package.json
@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "trigen",
|
||||
"version": "1.0.0",
|
||||
"description": "Trigen, a FOSS UI for trianglify.",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.project-name-here.de/Project-Name-Here/trigen.git"
|
||||
},
|
||||
"author": "[ Project-Name-Here ]",
|
||||
"license": "LGPL-3.0",
|
||||
"dependencies": {
|
||||
"bootstrap": "^5.1.3",
|
||||
"jquery": "^3.6.0",
|
||||
"trianglify": "^4.1.1"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user