Just in time for this week's Scriptographer workshop at the ECAL School of Art and Design in Lausanne, we finished work on the new version 2.9. Download while it's fresh!
In this release we added a few important changes that we would like to highlight here:
Coordinate System Switch
To go along with Adobe's switch of the coordinate system orientation in Illustrator CS5, we decided to make the top-down coordinate system the standard setting for new scripts. But since many existing scripts were written specifically for the bottom-up coordinate system that was standard until version 2.8 and CS4, we added a simple switch for users to turn on backward compatibility in their scripts:
script.coordinateSystem = 'bottom-up';
Hello Degrees, Goodbye Radians
And while we were in the process of yet another transition (maybe one day we will become as good at it as Apple), we figured this was a good moment to say goodbye to the confusing angle units in radians, and welcome the good old degrees as the new standard. Again, there is a switch for scripts to turn on radians instead and remain compatible with old code:
script.angleUnits = 'radians';
We have added these switches to all scripts on the Scriptographer website, to make them backwards compatible with the latest version.
Read in more detail about these changes in the tutorials about The Coordinate System and Vector Geometry.
Speaking of tutorials, we spent a lot of time improving the existing ones and writing new ones such as Working with Mouse Vectors, so you may want to have a close look at all the Tutorials.
New Relative Drawing Functions
We also added very convenient new relative drawing functions to the Path object, such as pathItem.lineBy(vector), pathItem.arcBy(vector) and pathItem.curveBy(throughVector, toVector). These define vector shapes relative to the current location using vectors, which in our experience results in much simpler and more readable code.
These are exciting times for Scriptographer users, as working with Scriptographer keeps getting simpler, and learning to do so too, thanks to a growing amount of resources available online. We think it is a good moment to join the community, as the API is getting more and more finalized and stable too.
On this occasion we would like to express a big thank you to ECAL for helping us with our focused efforts by means of a financed research project.
Yours truly, the Scriptographer Team (Florian, Jonathan, and Jürg)