Skip to content

Latest commit

 

History

History

simple-draw

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

simple-draw

Just a simple little wrapper around image, imageproc, rusttype intended for WebAssembly usage from Node.js or any headless JS runtime.

test image

Features

  • Fill rectangle with solid color.
  • Draw images as blended sprites, and optionally resize them.
  • Draw text with custom fonts, sizes, & colors.
  • Export PNG image.
  • Do a barrel roll.

Usage

See benchmark script and auto-generated TS annotations.

Benchmark

makeImgSimpleDraw done in 105 ms
makeImgSatori done in 7708 ms

Dev

Build:

wasm-pack build --target nodejs

Test:

wasm-pack test --node

License

MIT