The swiss army knife of vector graphics scripting that fits in your pocket.
quickps combines the power of Paper.js and small footprint of QuickJS.
It is an image processing program that takes PaperScript as input, processes it using the Paper.js library in conjunction with QuickJS runtime and generates a canvas image as output.
PaperScript is the plain old JavaScript with some built-in niceties;
- Batteries included
-
Path
,Shape
,Text
, etc. are basic building blocks in Paper.js and are always available in the scope of your script. Just instantiate one them and Paper.js draws it on the canvas right away. - Operator overloading
-
Point
andSize
play a central role in Paper.js when exploring the 2D canvas space. They accept the basic arithmetic operators (+
,-
,*
,/
and%
). This makes it easy and intuitive to script your graphical ideas. A vector is a first class citizen in PaperScript. - Tweening
-
In PaperScript, you can use
Tween
to animate any property of a Paper.js object, such as its position, size, color, or opacity. Simply specify the starting and ending states of the object, as well as the duration of the transition. TheTween
will then automatically update the property over the course of the specified duration.
TBA
TBA
- Requires Meson, ninja and curl to compile the project.
- Depends on
libcairomm-1.0-dev
andlibgtest-dev
.
git clone [email protected]:keisrk/quickps.git
cd quickps
meson setup build
meson compile -C build
meson test -C build
Optionally, activate a Python virtual environment and run more tests in examples
directory.
pip install -e ./examples
meson setup --reconfigure build
meson test -C build
It creates a test report (./build/examples.html
).