Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lcaballero/vectorstream
JavaScript canvas library that buffers vector commands, which eventually can be flushed to the canvas element.
https://github.com/lcaballero/vectorstream
Last synced: about 1 month ago
JSON representation
JavaScript canvas library that buffers vector commands, which eventually can be flushed to the canvas element.
- Host: GitHub
- URL: https://github.com/lcaballero/vectorstream
- Owner: lcaballero
- Created: 2012-12-19T07:33:15.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-19T08:05:11.000Z (about 12 years ago)
- Last Synced: 2024-04-14T19:27:35.996Z (9 months ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# VectorStream
## Gaining a Stream
```javascript
$('#canvas').stream();
```
## Example Drawing a Line
```javascript
$("#canvas")
.stream()
.write([
"beginPath",
{ method:"moveTo", args:[0, 0] },
{ method:"lineTo", args:[dim.x, dim.y] },
"stroke"
])
.flush();```
## Harness Html
See example `Vector-Stream.html` which demonstrates the simple setup which
includes a minimal set of CSS files, and Script tags that include
`jquery-1.8.2.min.js`, the Jynx library (a Linq like library for JavaScript).The actual source code for the VectorStream library lives in the `Src`
directory. It includes Colors.js, General.Plugins.js, Vector.Stream.Writer.js,
and Vec.js. The other files in this project are included in the repo
mearly to help create drawings, and also the Examples.