1 Commits

Author SHA1 Message Date
63bcf8532c wip 2020-11-17 10:10:07 +00:00
3 changed files with 16 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ html(lang="en-gb")
| pixsy
//img(alt="pixsy" src="includes/pixsy.png")
p.
version 0.72.7
convert images to Bitsy rooms
|
#[a(href="http://tinybird.info/image-to-bitsy/old/" target="_blank") old version]
|
@@ -21,30 +21,12 @@ html(lang="en-gb")
#[a(href="https://twitter.com/synth_ruiner") twitter]
.pages
.page#start
p.
#[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.
p this version is compatible with Bitsy version 7.2 and earlier.
p.
#[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
#[a(href="http://tinybird.info/image-to-bitsy/old/") old version] instead.
p.
instructions can be found on the
#[a(href="https://ruin.itch.io/pixsy/") itch.io page] -
scroll down to "how to use".
button.normal.pagination.next#new create a new bitsy game
button.normal.pagination.next#load load an existing bitsy game
.page.game-data
h2 game data
p.
your game data is available from the #[i game data] window in bitsy,
under the #[i tools] dropdown.
input#game(type="file" accept=".bitsy,.txt" autocomplete="off")
input#game(type="file" autocomplete="off")
br
textarea#game-data(
@@ -96,6 +78,11 @@ html(lang="en-gb")
| dither
br
label
input#filter(type="checkbox")
| filter
br
button.pagination.prev#back-to-image previous
button.pagination.next#room-next add room
.page.download

View File

@@ -8,6 +8,7 @@ import init, {
output,
set_brightness,
set_dither,
set_filter,
set_palette,
set_room_name,
} from './pkg/pixsy.js';

View File

@@ -33,6 +33,7 @@ struct State {
room_name: Option<String>,
palette: SelectedPalette,
dither: bool,
filter: bool,
brightness: i32,
}
@@ -44,6 +45,7 @@ lazy_static! {
room_name: None,
palette: SelectedPalette::None,
dither: true,
filter: false,
brightness: 0,
}
);
@@ -131,6 +133,12 @@ pub fn set_dither(dither: bool) {
state.dither = dither;
}
#[wasm_bindgen]
pub fn set_filter(filter: bool) {
let mut state = STATE.lock().unwrap();
state.filter = filter;
}
#[wasm_bindgen]
pub fn set_palette(palette_id: &str, background: String, foreground: String) {
let mut state = STATE.lock().unwrap();