Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mollerse/ait-canvas
Canvas bindings for Ait
https://github.com/mollerse/ait-canvas
Last synced: about 1 month ago
JSON representation
Canvas bindings for Ait
- Host: GitHub
- URL: https://github.com/mollerse/ait-canvas
- Owner: mollerse
- License: mit
- Created: 2016-06-23T20:24:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-24T09:24:13.000Z (4 months ago)
- Last Synced: 2024-11-14T20:12:21.799Z (about 1 month ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `ait-canvas`
Canvas words for the Ait Language
## Install
`npm install mollerse/ait-canvas`
## Usage
### Browser
```ait
@load ait-canvas ;"canvas" createElement canvasContext
```Load the module. Create a canvas-element (or grab an existing one, doesn't matter) and grab the canvasContext. Now you can use the canvas words in this pacakge.
### Node
The canvas is normaly not available in node, but there is a package called `canvas` which can be used. The bindings for this is available in the `node.js` file. It can be used like this:
```ait
@load ait-canvas ;
@load ait-canvas/node ;nodeCanvas canvasContext
```The main difference is the `nodeCanvas` word which gives you an instance of `node-canvas`.
## Still missing
- Image drawing
- Text
- Pixel manipulation