Notes:
This little ghost has really gotten around! It started out as a JavaScript entity in CodeHS and was adopted into the Python Turtle world in a Tracy the Turtle application.
It was featured in a novice's Processing application, and found it's place in the JSGS Shapes Library!
Click the 'Reload' button to see our Aggie TNTGhost's eyes reposition.
TNTGhost Features and Usage:
| Primary Attributes: |
4 Parameters:
|
|---|---|
| To Create: |
The example above was created by:
//designer colors/strokes
var aggieMaroon = new TNTColor(170, 0, 65, "aggieMaroon");
var aggieGray = new TNTColor(218, 217, 216, "aggieGray");
var aggieMaroonStroke = new TNTStroke(aggieMaroon, .5);
//ghost head
var center = new TNTPoint(-1, 5);
var radius = 4;
var ghostHead = new TNTDisk(center, radius, aggieMaroon, null);
//special points/components
var pupilFactor = .5;
//eyeInfo: pupilFactor, pupilPlacement, shouldRandomlyPlacePupil,
shouldPupilBeTangent, dirn, eyeColors, eyeStrokes
var eyeColors = new Array(offWhite, black);
var eyeStrokes = new Array(lightGrayStroke, blueStroke);
var eyeInfo = new Array(pupilFactor, 1.2, true, false, 45, eyeColors, eyeStrokes);
var myGhost = new TNTGhost(ghostHead, 10, 5, eyeInfo);
myGhost.drawTNTGhost(context);
|
| To Draw: |
myGhost.drawTNTGhost(context); |
| Comments: |
Note that the 'eyeInfo' parameter is itself a non-homogeneous Array: there are various datatypes in it, including two other Arrays! |
