Added random splash images

Also added a rough class scheme of the editor for future use.
This commit is contained in:
unsettledgames 2021-04-27 11:00:27 +02:00
parent d9ae5dd21b
commit 079ea38e63
19 changed files with 72 additions and 4 deletions

1
Model.drawio Normal file
View File

@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2021-04-25T14:57:23.836Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46" etag="K3S2uQVQjw_jQCK8DyHB" version="14.6.6" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7V1bc+K4Ev41VOU8kPI98BjIZGb3MHuyk9nM7KOCBWhiWxxZBJhfv5ItG2zJxgSMsx5XpSq4Jd/0tVqfultyzxz7m48ELBefsQu9nqG5m5551zMMfWAN2D8u2QqJMxSSOUGukO0Ej+gnFEJNSFfIhWGmIsXYo2iZFU5xEMApzcgAIXidrTbDXvauSzCHkuBxCjxZ+g25dBFLB8bNTv4JovkiuTN7wbjEB0ll8SbhArh4vScyP/TMMcGYxr/8zRh6vPWSdvn22/abN3lxPv7+Z/h/8Nfov1//eOrHF7s/5pT0FQgM6Jsv3X+6tz5PHp5mqz/+fnn83+Oy/xX3LUe8G90mDQZd1n7iEBO6wHMcAO/DTjoieBW4kF9WY0e7OhOMl0yoM+EPSOlWKANYUcxEC+p7opS9Btl+Zwd97VpLBX/zC15rw1RwtxG3iI+2+0cPkCAfUkiEMH4N/uw52A+0magX4hWZilN/vszuPz1ZP74vH+7/XGsfb59/74u21Sggc0hLGnRPM1ifgpg9I9myEwn0AEWv2acDQrfnab0dfuyHgFANZ9lTvgJvJe70lfW18DMMVhLO4Rr5Hgg4oDMc0ARy9vAj4KF5wH5PWdvxFh69QkIR61O3ooByoEfTBfLcCdjiFW+RkILpS3I0WmCCfrLLggRzVkyo0AjDydR45GcKHAkMWZ2HBDY9FU1ASEWdKfY8sAzRc/TAvIrPYEHBCFOK/eRCGSVN+250QAl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Jh1KPajNYaNKLu245Imw2hW7d11c0pLdsSKnJXCxMh1XKeYkUoxTHUk8Av2K0aNkt4fzwy97YQWM9yTKgOw4x+U5h2O/kXO0P1s3ceup1i/dse6v2idRbMOcDy5No2W0XeLLW/ZCO893l+y6qIqlyvbsqMqJsKqC2BelKs181GWD6Pe937E7wxZHO2cGP8gsl/6+fxCfpVvmAS9IMwute5JnpPjbTU05RqxGvg5T9sVOXXPeI5pJqvvhL84UZDZdCM9ho3jqDE4ni6c2OOSjfC+985gNSi/07SatUTS16+FwkOud9rvc1MKuiGbRxPFCn4OSafZd7uMn3cQwObjYxNDOfVVXHepWOqPbn1foqDd8E+sbEu2V9Lab6pXPCWJLcLpXuq4op9NtpVYDrE3vLusUfmV3gddJX77ia7RlVzTrdfBAlamHQ3jreUm1sPNZV9eNqutfnJIhp0A52CHBmO4PDAQsF/wTKbzGPw==</diagram></mxfile>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="332" height="80"><path fill="#eaeaea" d="M7 16H6V0H0v20h13v-7H7zm7 4h13V0H14v20zm6-16h1v12h-1V4zm15 4V4h1v3h5V0H28v12h7v4h-1v-3h-6v7h13V8zm7 12h6v-5h7V0H42v20zm6-16h1v7h-1V4zm8 16h13v-7h-6v3h-1v-4h7V8h-7V4h1v3h6V0H56zM83 8V0H70v20h13v-7h-6v3h-1V4h1v4z" class="a"/></svg>

After

Width:  |  Height:  |  Size: 317 B

17
_ext/svg/newfile.svg Normal file
View File

@ -0,0 +1,17 @@
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<g>
<path d="M456.606,154.394l-150-150C303.793,1.58,299.978,0,296,0H66c-8.284,0-15,6.716-15,15v482c0,8.284,6.716,15,15,15h380
c8.284,0,15-6.716,15-15V165C461,161.021,459.419,157.206,456.606,154.394z M431,482H81V30h208.787L431,171.213V482z"/>
</g>
</g>
<g>
<g>
<path d="M306,241h-35v-35c0-8.284-6.716-15-15-15s-15,6.716-15,15v35h-35c-8.284,0-15,6.716-15,15s6.716,15,15,15h35v35
c0,8.284,6.716,15,15,15s15-6.716,15-15v-35h35c8.284,0,15-6.716,15-15S314.284,241,306,241z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 815 B

16
_ext/svg/openfile.svg Normal file
View File

@ -0,0 +1,16 @@
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 276.157 276.157" style="enable-background:new 0 0 276.157 276.157;" xml:space="preserve">
<path style="fill:#000002;" d="M273.081,101.378c-3.3-4.651-8.86-7.319-15.255-7.319h-24.34v-26.47c0-10.201-8.299-18.5-18.5-18.5
h-85.322c-3.63,0-9.295-2.876-11.436-5.806l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.731
c-9.293,0-18.639,6.608-21.738,15.372l-2.033,5.752c-0.958,2.71-4.721,5.371-7.596,5.371H18.5c-10.201,0-18.5,8.299-18.5,18.5
v167.07c0,0.885,0.161,1.73,0.443,2.519c0.152,3.306,1.18,6.424,3.053,9.064c3.3,4.652,8.86,7.319,15.255,7.319h188.486
c11.395,0,23.27-8.424,27.035-19.179l40.677-116.188C277.061,112.159,276.381,106.03,273.081,101.378z M18.5,64.089h8.864
c9.295,0,18.64-6.608,21.738-15.372l2.032-5.75c0.959-2.711,4.722-5.372,7.597-5.372h29.564c3.63,0,9.295,2.876,11.437,5.806
l6.386,8.734c4.982,6.815,15.104,11.954,23.546,11.954h85.322c1.898,0,3.5,1.603,3.5,3.5v26.47H69.34
c-11.395,0-23.27,8.424-27.035,19.179L15,191.231V67.589C15,65.692,16.603,64.089,18.5,64.089z M260.791,113.238l-40.677,116.188
c-1.674,4.781-7.812,9.135-12.877,9.135H18.751c-1.448,0-2.577-0.373-3.02-0.998c-0.443-0.625-0.423-1.814,0.056-3.181
l40.677-116.188c1.674-4.781,7.812-9.135,12.877-9.135h188.486c1.448,0,2.577,0.373,3.021,0.998
C261.29,110.682,261.27,111.871,260.791,113.238z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -17,6 +17,9 @@ console.log('Building Pixel Editor');
function copy_images(){ function copy_images(){
gulp.src('./images/*.png') gulp.src('./images/*.png')
.pipe(gulp.dest(path.join(BUILDDIR, SLUG))); .pipe(gulp.dest(path.join(BUILDDIR, SLUG)));
gulp.src('./images/Splash images/*.png')
.pipe(gulp.dest(path.join(BUILDDIR, SLUG)));
} }
function render_js(){ function render_js(){

View File

@ -1577,6 +1577,7 @@ div#pb-options {
background-image:url('https://cdn.discordapp.com/attachments/506277390050131978/795660870221955082/final.png'); background-image:url('https://cdn.discordapp.com/attachments/506277390050131978/795660870221955082/final.png');
background-size:cover; background-size:cover;
background-position:center; background-position:center;
background-repeat:no-repeat;
} }
#black { #black {

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

25
js/_splashPage.js Normal file
View File

@ -0,0 +1,25 @@
function SplashCoverImage(path, author, link) {
this.path = path;
this.author = author;
this.link = link;
}
let images = [
new SplashCoverImage('Rayquaza', 'Unsettled', 'https://twitter.com/_unsettled_'),
new SplashCoverImage('Mountains', 'Skeddles', 'https://twitter.com/skeddles'),
new SplashCoverImage('Sweetie', 'GrafxKid', 'https://grafxkid.tumblr.com/'),
new SplashCoverImage('Glacier', 'WindfallApples', 'https://twitter.com/windfallapples'),
new SplashCoverImage('Polyphorge1', 'Polyphorge', 'https://lospec.com/poly-phorge'),
new SplashCoverImage('Fusionnist', 'Fusionnist', 'https://twitter.com/fusionnist')
];
let coverImage = document.getElementById('editor-logo');
let authorLink = coverImage.getElementsByTagName('a')[0];
let chosenImage = images[Math.round(Math.random() * (images.length - 1))];
console.log ("Path: " + '/pixel-editor/' + chosenImage.path + '.png');
coverImage.style.backgroundImage = 'url("/pixel-editor/' + chosenImage.path + '.png")';
authorLink.setAttribute('href', chosenImage.link);
authorLink.innerHTML = 'Art by ' + chosenImage.author;

View File

@ -53,6 +53,7 @@
//=include _resizeSprite.js //=include _resizeSprite.js
//=include _colorPicker.js //=include _colorPicker.js
//=include _paletteBlock.js //=include _paletteBlock.js
//=include _splashPage.js
/**load file**/ /**load file**/
//=include _loadImage.js //=include _loadImage.js

4
package-lock.json generated
View File

@ -3563,6 +3563,7 @@
}, },
"node_modules/handlebars-helper-svg": { "node_modules/handlebars-helper-svg": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "git+ssh://git@bitbucket.org/skeddles/npm-handlebars-helper-svg-lospec-open-source.git#2feeec5000aecce96ba2f714ec540880537ae208",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"ltx": "^2.3.0", "ltx": "^2.3.0",
@ -10313,7 +10314,8 @@
} }
}, },
"handlebars-helper-svg": { "handlebars-helper-svg": {
"version": "2.0.1", "version": "git+ssh://git@bitbucket.org/skeddles/npm-handlebars-helper-svg-lospec-open-source.git#2feeec5000aecce96ba2f714ec540880537ae208",
"from": "handlebars-helper-svg@git+https://bitbucket.org/skeddles/npm-handlebars-helper-svg-lospec-open-source.git",
"requires": { "requires": {
"ltx": "^2.3.0", "ltx": "^2.3.0",
"resolve": "^1.1.7" "resolve": "^1.1.7"

View File

@ -13,11 +13,12 @@ app.get('/', (req, res) => {
console.log('error sending file', err); console.log('error sending file', err);
} else { } else {
console.log("Server: Successfully served index.html"); console.log("Server: Successfully served index.html");
setTimeout(()=>{
/*setTimeout(()=>{
console.log('closing server'); console.log('closing server');
res.app.server.close(); res.app.server.close();
process.exit(); process.exit();
},1000*10); },1000*10); */
} }
}); });
}); });
@ -27,7 +28,7 @@ app.use(express.static(path.join(__dirname, BUILDDIR)));
reload(app).then(() => { reload(app).then(() => {
//start server //start server
app.server = app.listen(PORT, function () { app.server = app.listen(3000, function () {
console.log('Web server listening on port ' + PORT) console.log('Web server listening on port ' + PORT)
}) })
}); });