Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabiospampinato/bob-wasm
A port of Svgbob to WASM.
https://github.com/fabiospampinato/bob-wasm
svgbob wasm
Last synced: about 1 month ago
JSON representation
A port of Svgbob to WASM.
- Host: GitHub
- URL: https://github.com/fabiospampinato/bob-wasm
- Owner: fabiospampinato
- License: mit
- Created: 2022-04-22T14:28:59.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-24T16:28:47.000Z (over 1 year ago)
- Last Synced: 2024-11-19T19:12:04.319Z (about 1 month ago)
- Topics: svgbob, wasm
- Language: TypeScript
- Homepage:
- Size: 400 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Bob WASM
A port of [Svgbob](https://github.com/ivanceras/svgbob) to WASM.
## Install
```sh
npm install --save bob-wasm
```## Usage
```ts
import bob from 'bob-wasm';await bob.loadWASM (); // First of all you need to load the WASM instance and wait for it
const input = `
.----. .----.
/ \ / \ .-----+-----+-----.
+ +----+ +----. | | | | .-----+-----+-----+-----+
\ / \ / \ | | | | / / / / /
+----+ +----+ + +-----+-----+-----+ +-----+-----+-----+-----+
/ \ / \ / | | | | / / / / /
+ +----+ +----+ | | | | +-----+-----+-----+-----+
\ / \ / \ +-----+-----+-----+ / / / / /
'----+ +----+ + | | | | +-----+-----+-----+-----+
\ / \ / | | | | / / / / /
'----' '----' '-----+-----+-----' '-----+-----+-----+-----+___ ___ .---+---+---+---+---. .---+---+---+---. .---. .---.
___/ \___/ \ | | | | | | / \ / \ / \ / \ / | +---+ |
/ \___/ \___/ +---+---+---+---+---+ +---+---+---+---+ +---+ +---+
\___/ \___/ \ | | | | | | \ / \ / \ / \ / \ | +---+ |
/ \___/ \___/ +---+---+---+---+---+ +---+---+---+---+ +---+ +---+
\___/ \___/ \ | | | | | | / \ / \ / \ / \ / | +---+ |
\___/ \___/ '---+---+---+---+---' '---+---+---+---' '---' '---'`;
const svg = bob.render ( input );
```## License
- Library: MIT © Fabio Spampinato
- Svgbob: Apache 2.0 [Svgbob](https://github.com/ivanceras/svgbob)