Sg2.0
.
Recent RSS
.
From:  
Date:  1. November 2006, 19:42
.
Re: Tutorial 01
From:  Lehni
Date:  3. November 2006, 18:01
Hi Simon.

First of all thank you for taking on the task of writing tutorials!

A few suggestions:

- Circle is a normal function, not a prototype, and therefore should get a different name, e.g. createCircle, or drawCircle.

- For Rectangle, I would point to Scriptographer's Rectangle prototype instead, as it extends the Java Rectangle in some ways. But it is true that a normal Java2D Rectangle can be used too.
Unfortunately the AI reference seems to be a bit broken since I generated it the last time, I will look into this right now.

- In the final example, there is no reason why you should call Circle as a constructor and not a normal function. What you do besides drawing circles is creating 500 JS objects returned from the constructor (new Circle) that just lie around and do nothing: They are not linked to the art items you are creating within the constructor in any way, and therefore this part of the tutorial is quite confusing, as it suggests Circle is similar to Point and Rectangle, which it is not (Point and Rectangle are constructors for objects that hold geometric descriptions, Circle is a function that circle art items and returns an empty object when called as a constructor).

Do you see what I mean?
 
Scripts
13.10.08, 01:28
03.10.08, 00:01
18.09.08, 20:43
16.09.08, 21:36
14.09.08, 18:50
Posts
19.11.08, 18:10
18.11.08, 19:27
18.11.08, 19:07
18.11.08, 06:05
18.11.08, 03:30
Hektor Interface 27.10.06
If you use Scriptographer regularly, please consider making a donation via PayPal: $$$ €€€ £££ CHF