Size: 1106
Comment:
|
Size: 1520
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 15: | Line 15: |
= API DOCUMENTATION = just a start ;) == GeometryLayer == === color === {{{ geo = new GeometryLayer(640,480); add_layer(geo); // the following calls are all valid: // color takes RGBA .. // geo.color(0xff, 0xee, 0xdd, 0xff); // .. or RGB .. // geo.color(0xff, 0xee, 0xdd); // .. or the 32bit hexcode in BGRA geo.color(0xddeeffff); geo.rectangle_fill(10,10,630,470); run(3); quit(); }}} |
SCRIPTING VIDEO WITH FREEJ
With [http://freej.org FreeJ] it is also possible to generate video with the use of scripts. This is done by invoking commands on layers and effects in these scripts. Scripts can be written using javascript. Javascript is object oriented which makes it possible to handle layers and effects as objects. Every object has its own procedural commands to adapt it.
The example script
FreeJ comes with an example script to explain some basic scripting. The example script can be found in the document directory. Its location is doc/freejscripting-example.js. More information on this script can be found in the comments in the script and the file doc/freej-scripting.txt.
Running the script
While running FreeJ you can execute a script by pressing ctrl-x. FreeJ will ask for the location of the script file. By pressing enter it will start executing the given script in the current running FreeJ session. You can also start FreeJ with a script. You then have to add the -j option to the commandline:
freej -j freej_script.js
API DOCUMENTATION
just a start
GeometryLayer
color
geo = new GeometryLayer(640,480); add_layer(geo); // the following calls are all valid: // color takes RGBA .. // geo.color(0xff, 0xee, 0xdd, 0xff); // .. or RGB .. // geo.color(0xff, 0xee, 0xdd); // .. or the 32bit hexcode in BGRA geo.color(0xddeeffff); geo.rectangle_fill(10,10,630,470); run(3); quit();