Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syoyo/nanocanvas
NanoCanvas, portable JavaScript vector graphics engine.
https://github.com/syoyo/nanocanvas
Last synced: 22 days ago
JSON representation
NanoCanvas, portable JavaScript vector graphics engine.
- Host: GitHub
- URL: https://github.com/syoyo/nanocanvas
- Owner: syoyo
- Created: 2016-02-15T16:08:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-31T18:49:57.000Z (4 months ago)
- Last Synced: 2024-12-10T08:42:26.632Z (about 1 month ago)
- Language: C
- Size: 3.65 MB
- Stars: 44
- Watchers: 9
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSES
Awesome Lists containing this project
README
# NanoCanvas, portable JavaScript vector graphics engine.
![](images/screenshot.png)
![](images/screenshot-win.jpg)
![](images/screenshot-linux.png)NanoCanvas is a portable vector graphics engine using JavaScript binding of NanoVG.
NanoCanvas is build on top of Duktape, NanoVG and OpenGL2(or GLESv2).## Platform
* Mac OS X
* Linux
* Windows
* iOS/Android(TODO)## Requirements
* OpenGL2
* GLESv2
* premake5## Build
### Linux and MacOSX
$ premake5 gmake
$ cd build
$ make### Windows
Visual Studio 2015 is required to build an example.
> premake5.exe vs2015
> cd buildOpen solution file and build it with Visual Studio 2015.
Visual Studio 2013 may work. To compile with Visual Studio 2013 use the following premake flag.
> premake5.exe vs2013
## Example
See `example/main.cc` and `example/input.js`.
### NanoVG demo
$ cd build
$ ./example### Game demo
$ cd build
$ ./example ../game/game.js## License
NanoCanvas example code is licensed under MIT license.
NanoCanvas uses third party libraries. See `LICENSES` file for more details.### Game example
Game assets are by Hyptosis. Licensed under CC-BY 3.0.
http://opengameart.org/content/lots-of-free-2d-tiles-and-sprites-by-hyptosis## TODO
* [ ] More HTML5 compatible APIs.
* [ ] Expressive error handling.
* [ ] Expressive error report of parsing JavaScript code.
* [ ] Refactor source code.
* [ ] Text paragraph
* [x] Mouse interaction