Compare commits
10 Commits
Refactor3
...
b157007ff3
| Author | SHA1 | Date | |
|---|---|---|---|
| b157007ff3 | |||
| 704f710047 | |||
| 5c4259d222 | |||
| 47a9bf5c79 | |||
| d100473542 | |||
| d0946d3ab5 | |||
| 5ee1e908f1 | |||
| 5788baa0b8 | |||
| f135e184e4 | |||
| 21eb632d22 |
56
README.md
56
README.md
@@ -1,3 +1,57 @@
|
||||
# pixsy
|
||||
|
||||
convert images to rooms for use in Bitsy
|
||||
a tool for [Bitsy Game Maker](http://bitsy.org).
|
||||
upload any image and convert it into a room.
|
||||
|
||||
## credits
|
||||
|
||||
made by [Max Bradbury](http://tinybird.info/).
|
||||
makes use of my own [bitsy parser](https://crates.io/crates/bitsy-parser) library.
|
||||
|
||||
uses the [Croppie](https://foliotek.github.io/Croppie/) image crop plugin
|
||||
by [Foliotek](https://www.foliotek.com/)
|
||||
|
||||
uses [wasm-bindgen](https://crates.io/crates/wasm-bindgen) to automate WebAssembly bindings.
|
||||
|
||||
## thanks
|
||||
|
||||
to [Adam Le Doux](http://ledoux.io/) for creating the wonderful and inspiring Bitsy
|
||||
|
||||
to [Mark Wonnacott](https://kool.tools/) for their support, encouragement and inspiration
|
||||
|
||||
and to everyone in the bitsy community!
|
||||
|
||||
## contributing
|
||||
|
||||
forks and pull requests welcome!
|
||||
|
||||
### development prerequisites
|
||||
|
||||
* [rust/cargo](https://rustup.rs/)
|
||||
* [pug](https://pugjs.org/)
|
||||
* [less](http://lesscss.org/)
|
||||
* a bash shell for the build script
|
||||
|
||||
## bugs
|
||||
|
||||
when importing images, some pixels have errors.
|
||||
it seems to only happen for pixels surrounded at the top and left:
|
||||
```
|
||||
111 111
|
||||
100 => 110
|
||||
100 100
|
||||
```
|
||||
|
||||
pixsy does not work in the Itch desktop program
|
||||
because their bundled version of Chromium does not support WebAssembly.
|
||||
|
||||
## to do
|
||||
|
||||
* add alternative dithering options (Atkinson, Bayer 8×8)
|
||||
* add a 'smoothing' (noise reduction?) stage to remove errant pixels
|
||||
|
||||
## could do
|
||||
|
||||
* reimplement tile reuse option
|
||||
* add camera support so users can take a pic instead of uploading an image
|
||||
* allow user to draw to canvas
|
||||
|
||||
6
TODO.md
6
TODO.md
@@ -1,6 +0,0 @@
|
||||
# todo
|
||||
|
||||
* tile reuse
|
||||
* noise reduction (remove lonely pixels)
|
||||
* implement Atkinson and Bayer dithering options
|
||||
* fix weird problem with pixels flipping (see test::example)
|
||||
24
index.pug
24
index.pug
@@ -12,21 +12,39 @@ html(lang="en-gb")
|
||||
| pixsy
|
||||
//img(alt="pixsy" src="includes/pixsy.png")
|
||||
p.
|
||||
convert images to Bitsy rooms
|
||||
version 0.72.7
|
||||
|
|
||||
#[a(href="./old/") old version]
|
||||
#[a(href="http://tinybird.info/image-to-bitsy/old/" target="_blank") old version]
|
||||
|
|
||||
#[a(href="mailto:max@tinybird.info") email]
|
||||
|
|
||||
#[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
|
||||
|
||||
input#game(type="file" autocomplete="off")
|
||||
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")
|
||||
br
|
||||
|
||||
textarea#game-data(
|
||||
|
||||
@@ -12,10 +12,6 @@ import init, {
|
||||
set_room_name,
|
||||
} from './pkg/pixsy.js';
|
||||
|
||||
if (typeof WebAssembly !== "object") {
|
||||
window.location = "./old/"
|
||||
}
|
||||
|
||||
// stolen from https://ourcodeworld.com/articles/read/189/how-to-create-a-file-and-generate-a-download-with-javascript-in-the-browser-without-a-server
|
||||
function download(filename, text) {
|
||||
let element = document.createElement('a');
|
||||
@@ -60,6 +56,10 @@ function readFile(input, callback, type = "text") {
|
||||
}
|
||||
|
||||
async function run() {
|
||||
if (typeof WebAssembly !== "object") {
|
||||
window.location = "http://tinybird.info/image-to-bitsy/old/"
|
||||
}
|
||||
|
||||
await init();
|
||||
|
||||
const buttonAddImage = el("add");
|
||||
|
||||
Reference in New Issue
Block a user