This commit is contained in:
Max Bradbury 2020-07-21 20:23:30 +01:00
parent 5a4d4c2776
commit ce639ef6db
5 changed files with 13 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -11,7 +11,6 @@
html, body { html, body {
background-color: @background; background-color: @background;
background-image: url("background.png");
font-size: 3vmin; font-size: 3vmin;
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -37,6 +36,10 @@ button {
} }
} }
h1 {
margin: 0;
}
h3 { h3 {
font-size: 0.9em; font-size: 0.9em;
} }
@ -57,6 +60,7 @@ input {
img { img {
max-height: 12em; max-height: 12em;
max-width: 100%; max-width: 100%;
margin: 0;
} }
p { p {
@ -70,7 +74,7 @@ label {
} }
textarea { textarea {
height: 20em; height: 15em;
padding: 0.5em; padding: 0.5em;
text-align: left; text-align: left;
width: 100%; width: 100%;
@ -92,12 +96,13 @@ textarea {
} }
.page { .page {
height: 80vmin; height: 70vmin;
width: 80vmin; width: 70vmin;
background-color: @background; background-color: @background;
border: 2px solid @accent;
border-radius: 5vmin; border-radius: 5vmin;
box-shadow: @accent 0.5vmin 0.5vmin; box-shadow: @accent 1vmin 1vmin;
padding: 5vmin; padding: 5vmin;
position: relative; position: relative;
} }

BIN
includes/tilesy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -6,7 +6,7 @@ html(lang="en-gb")
link(rel="stylesheet" href="includes/style.css") link(rel="stylesheet" href="includes/style.css")
body body
h1 h1
span.background tilesy img(alt="tilesy" src="includes/tilesy.png")
p p
span.background import 8×8 tile sheets into Bitsy games span.background import 8×8 tile sheets into Bitsy games
.pages .pages
@ -33,11 +33,8 @@ html(lang="en-gb")
.page.extras .page.extras
h2 tiles h2 tiles
label label
| tile name prefix (optional) | tile name (optional)
input#prefix(type="text" placeholder="e.g. 'forest'" autocomplete="off") input#prefix(type="text" placeholder="e.g. 'forest'" autocomplete="off")
p.
to help you find your new tiles in Bitsy, #[br]
new tiles will be named #[span#tile-name-preview e.g. 'forest 1']
h3 create alternate versions h3 create alternate versions
.checkboxes .checkboxes
@ -57,8 +54,7 @@ html(lang="en-gb")
some tile sheets assume you will be able to flip and rotate their tiles. some tile sheets assume you will be able to flip and rotate their tiles.
Bitsy does not allow this, so it may be easier Bitsy does not allow this, so it may be easier
to generate these alternate versions here. to generate these alternate versions here.
p.
don't worry - #[i tilesy] will not create duplicate tiles.
button.pagination.prev#back-to-image previous button.pagination.prev#back-to-image previous
button.pagination.next#import next button.pagination.next#import next
.page.download .page.download

View File

@ -60,7 +60,6 @@ async function run() {
const checkboxRotateTiles = el("rotate"); const checkboxRotateTiles = el("rotate");
const inputPrefix = el("prefix"); const inputPrefix = el("prefix");
const imagePreview = el("preview"); const imagePreview = el("preview");
const spanTileNamePreview = el("tile-name-preview")
const textareaGameDataInput = el("game-data"); const textareaGameDataInput = el("game-data");
const textareaGameDataOutput = el("output"); const textareaGameDataOutput = el("output");
@ -122,18 +121,6 @@ async function run() {
}, "image"); }, "image");
}); });
function handleTilePrefix() {
if (inputPrefix.value) {
spanTileNamePreview.innerText = `'${this.value} 1' etc.`
} else {
spanTileNamePreview.innerText = "'forest 1' etc."
}
}
inputPrefix.addEventListener("keyup", handleTilePrefix);
inputPrefix.addEventListener("change", handleTilePrefix);
handleTilePrefix();
function addTiles() { function addTiles() {
let image = imagePreview.getAttribute("src"); let image = imagePreview.getAttribute("src");
let gameData = textareaGameDataInput.value; let gameData = textareaGameDataInput.value;