Skip to content

paul-nechifor/circuit-boards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

This repository has been moved to gitlab.com/paul-nechifor/circuit-boards.

Old readme:

Circuit Boards

A Node package for generating seamless tiles that resemble circuit boards. You can play with the settings on my web site or just clone this.

circuit boards screenshot

I'll be using this in a game I'm developing.

Examples

A basic example:

Canvas = require 'canvas'
{draw} = require 'circuit-boards'
fs = require 'fs'

canvas = new Canvas
opts =
  size: 128
stopDraw = draw canvas, opts, ->
  out = fs.createWriteStream __dirname + '/text.png'
  stream = canvas.pngStream()
  stream.on 'data', (chunk) -> out.write chunk
  stream.on 'end', -> console.log 'saved'

# Stop early. The draw callback isn't called.
#setTimeout (-> stopDraw ->), 1000

Generate an image for all the styles:

coffee examples/doAll.coffee

License

MIT

About

Generator of seamless tiles that resemble circuit boards.

Resources

Stars

Watchers

Forks

Packages

No packages published