Compare commits
No commits in common. "a2c92b1e12f7483aa07ea8b6769e2f3fe566b06a" and "0f23b878b284c4ca4ff7a81941159b3ee0306961" have entirely different histories.
a2c92b1e12
...
0f23b878b2
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pixsy"
|
name = "pixsy"
|
||||||
version = "0.75.0"
|
version = "0.72.8"
|
||||||
description = "convert images to Bitsy rooms"
|
description = "convert images to Bitsy rooms"
|
||||||
authors = ["Max Bradbury <max@tinybird.info>"]
|
authors = ["Max Bradbury <max@tinybird.info>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
@ -12,7 +12,7 @@ crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "^0.12.3"
|
base64 = "^0.12.3"
|
||||||
bitsy-parser = "^0.75.0"
|
bitsy-parser = "^0.72.5"
|
||||||
image = "^0.23.7"
|
image = "^0.23.7"
|
||||||
json = "^0.12.4"
|
json = "^0.12.4"
|
||||||
lazy_static = "^1.4.0"
|
lazy_static = "^1.4.0"
|
||||||
|
|
|
@ -22,11 +22,6 @@ button {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&.half {
|
|
||||||
float: left;
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.pagination:not(.normal) {
|
&.pagination:not(.normal) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 5vmin;
|
bottom: 5vmin;
|
||||||
|
|
19
index.pug
19
index.pug
|
@ -8,9 +8,11 @@ html(lang="en-gb")
|
||||||
script(src="includes/croppie.min.js")
|
script(src="includes/croppie.min.js")
|
||||||
body
|
body
|
||||||
header
|
header
|
||||||
h1 pixsy
|
h1
|
||||||
|
| pixsy
|
||||||
|
//img(alt="pixsy" src="includes/pixsy.png")
|
||||||
p.
|
p.
|
||||||
version 0.75.0
|
version 0.72.8
|
||||||
|
|
|
|
||||||
#[a(href="http://tinybird.info/image-to-bitsy/old/" target="_blank") old version]
|
#[a(href="http://tinybird.info/image-to-bitsy/old/" target="_blank") old version]
|
||||||
|
|
|
|
||||||
|
@ -22,9 +24,10 @@ html(lang="en-gb")
|
||||||
p.
|
p.
|
||||||
#[b pixsy] is a tool for #[a(href="http://bitsy.org/") Bitsy Game Maker]
|
#[b pixsy] is a tool for #[a(href="http://bitsy.org/") Bitsy Game Maker]
|
||||||
that allows you to generate a room from an image and add it to your game.
|
that allows you to generate a room from an image and add it to your game.
|
||||||
p this version is compatible with Bitsy version 7.5 and earlier.
|
p this version is compatible with Bitsy version 7.2 and earlier.
|
||||||
p.
|
p.
|
||||||
#[b pixsy] does not currently work via the Itch desktop program.
|
#[b pixsy] does not currently work via the Itch desktop program.
|
||||||
|
some users are also currently reporting problems.
|
||||||
if pixsy does not work for you, please try the
|
if pixsy does not work for you, please try the
|
||||||
#[a(href="http://tinybird.info/image-to-bitsy/old/") old version] instead.
|
#[a(href="http://tinybird.info/image-to-bitsy/old/") old version] instead.
|
||||||
p.
|
p.
|
||||||
|
@ -96,14 +99,14 @@ html(lang="en-gb")
|
||||||
button.pagination.prev#back-to-image previous
|
button.pagination.prev#back-to-image previous
|
||||||
button.pagination.next#room-next add room
|
button.pagination.next#room-next add room
|
||||||
.page.download
|
.page.download
|
||||||
h2 done!
|
|
||||||
|
|
||||||
p#added
|
p#added
|
||||||
|
|
||||||
textarea#output(autocomplete="off")
|
h2 download
|
||||||
|
|
||||||
button#clipboard.half copy to clipboard
|
textarea#output(autocomplete="off")
|
||||||
button#download.half download
|
br
|
||||||
|
|
||||||
|
button#download download
|
||||||
|
|
||||||
button.pagination.prev#add add another image
|
button.pagination.prev#add add another image
|
||||||
button.pagination.start#reset start again
|
button.pagination.start#reset start again
|
||||||
|
|
17
script.js
17
script.js
|
@ -24,18 +24,6 @@ function download(filename, text) {
|
||||||
document.body.removeChild(element);
|
document.body.removeChild(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyToClipboard() {
|
|
||||||
const button = el("clipboard");
|
|
||||||
|
|
||||||
el("output").select();
|
|
||||||
document.execCommand("copy");
|
|
||||||
button.innerText = "copied!";
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
button.innerText = "copy to clipboard";
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
function el(id) {
|
function el(id) {
|
||||||
return document.getElementById(id);
|
return document.getElementById(id);
|
||||||
}
|
}
|
||||||
|
@ -76,7 +64,6 @@ async function run() {
|
||||||
|
|
||||||
const buttonAddImage = el("add");
|
const buttonAddImage = el("add");
|
||||||
const buttonBackToImage = el("back-to-image");
|
const buttonBackToImage = el("back-to-image");
|
||||||
const buttonCopyToClipboard = el("clipboard")
|
|
||||||
const buttonDownload = el("download");
|
const buttonDownload = el("download");
|
||||||
const buttonGameDataProceed = el("game-data-next");
|
const buttonGameDataProceed = el("game-data-next");
|
||||||
const buttonImageProceed = el("image-next");
|
const buttonImageProceed = el("image-next");
|
||||||
|
@ -165,6 +152,7 @@ async function run() {
|
||||||
|
|
||||||
function checkGameData() {
|
function checkGameData() {
|
||||||
let result = load_game(textareaGameDataInput.value)
|
let result = load_game(textareaGameDataInput.value)
|
||||||
|
console.log(result);
|
||||||
|
|
||||||
if (result === "Loaded game") {
|
if (result === "Loaded game") {
|
||||||
buttonGameDataProceed.removeAttribute("disabled");
|
buttonGameDataProceed.removeAttribute("disabled");
|
||||||
|
@ -254,9 +242,6 @@ async function run() {
|
||||||
download("output.bitsy", textareaGameDataOutput.value);
|
download("output.bitsy", textareaGameDataOutput.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonCopyToClipboard.addEventListener("click", copyToClipboard);
|
|
||||||
buttonCopyToClipboard.addEventListener("touchend", copyToClipboard);
|
|
||||||
|
|
||||||
buttonDownload.addEventListener("click", handleDownload);
|
buttonDownload.addEventListener("click", handleDownload);
|
||||||
buttonDownload.addEventListener("touchend", handleDownload);
|
buttonDownload.addEventListener("touchend", handleDownload);
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ fn palette_from(bg: &bitsy_parser::Colour, fg: &bitsy_parser::Colour) -> bitsy_p
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_preview(state: &State) -> DynamicImage {
|
fn render_preview(state: &State) -> DynamicImage {
|
||||||
let mut buffer = state.image.as_ref().unwrap().clone().into_rgba8();
|
let mut buffer = state.image.as_ref().unwrap().clone().into_rgba();
|
||||||
|
|
||||||
let palette = match &state.palette {
|
let palette = match &state.palette {
|
||||||
SelectedPalette::None => bitsy_parser::mock::game_default().palettes[0].clone(),
|
SelectedPalette::None => bitsy_parser::mock::game_default().palettes[0].clone(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Write your game's title here
|
Write your game's title here
|
||||||
|
|
||||||
# BITSY VERSION 7.5
|
# BITSY VERSION 7.2
|
||||||
|
|
||||||
! ROOM_FORMAT 1
|
! ROOM_FORMAT 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue