Skip to content

dtinth/canvasrenderer2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

canvasrenderer2

This is a newer version of my original canvasrenderer script (Python).

This one is written in JavaScript, for using with node.js.

In this newer version you can use CoffeeScript to write your scripts, as well as using other node.js' modules to do stuff.

Installation

Install CoffeeScript and node-canvas, then download this and make a symlink to this script.

Usage

canvasrenderer script.js

For CoffeeScript use:

canvasrenderer script.coffee

API

I know that this API is ugly and hackish, but is made in order to be compatible with the old version.

newFile(width, height): create a new canvas with width w and height h.

saveFile(name): save file to a file called name.png

Variables

canvas: the canvas

ctx: the 2d context

w: current canvas width

h: current canvas height

About

Create images using JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published