Player Aspects
The Fill Aspect
The fill aspect describes the properties related to how an object is filled (regardless of its geometric properties such as its shape).
- fillStyle: Symbol. The fillStyle defines how an object should be filled. Possible values are: #none (transparent; no fill), #solid (a single-colored, solid fill), #horizontalGradient, #verticalGradient, #diagonalGradient (all of which are linear gradients at 0, 45, or 90 degrees), #linearGradient (using the fillAngle) and #radialGradient (describing a radial gradient).
- fillColor: Color. Describes the color of the fill. Since many fill styles can support more than a single color, the color property describes what we consider the primary color. Setting the color means to make it a solid fill.
- color: Color. A convenient alias to the fillColor property.
- fillColors: Array of Color. Describes all the colors to be used for the fill.
- fillAlpha: Float. A value between zero and one describing the transparency of the fill. A value of zero means the fill will be fully transparent, a value of one means the fill will be fully opaque.
- fillAngle: Number. Only used for linear gradients, the fillAngle describes the orientation (in degrees) for the gradient.
- fillOffset: Number. Describes the relative offset of the fill from its "natural" origin.
The Border Aspect
The border aspect describes the properties related to how an object's border should appear.
- borderStyle: Symbol. The border style describes the type of border to be drawn. The possible values are: #none, #simple, #inset, #framed, #inner, #outer, #raised, #complexAltFramed, #complexAltInset, #complexAltRaised #complexFramed, #complexInset, #complexRaised
- borderWidth: Number. Describes the width of the border to be drawn.
- borderColor: Color. Describes the (base) color to be used with the given style. If set to Color transparent, all but the #none and the #simple style will inherit the border color from the player's container.
The Geometry Aspect
A player has an extent, and is pinned at its pivot point to a position. It may be rotated around that pivot point by its angle, and it might be scaled.
- position: Point. In container's coordinates.
- scale: Number. The object's magnification factor.
- rotation: Number. The object's rotation in degrees.
- extent: Point. The object's extent in local coordinates.
- pivot: Point. The distance by which the position is offset from the origin of the local coordinate system. Also the object's rotation center. Initially the center of the object, it will be updated when the extent changes to stay at the same relative position inside the player's bounding box.
Additionally, there are some derived accessors for convenience:
- bounds, left, right, top, bottom, origin, corner, center, topLeft, topRight, bottomLeft, bottomRight: refer to the bounding box, in container's coordinates.
- width, height: refer to extent, in local coordinates.
Generally, positional attributes are in container coordinates, whereas dimensional attributes are in local coordinates.
Directional properties:
- nose: Point. The object's intrinsic direction in local coordinates, defining what "forward" means. Initially 1@0.
- direction: Point. The object's current direction in container's coordinates, that is, the nose vector rotated by the rotation.
- normal: Point. The direction rotated by 90 degrees, e.g., the unit vector orthogonal to the direction.
For measuring:
- heading: Number. The angle by which the receiver's direction differs from "north". Measured clockwise in degrees.
- angle: Number. The angle by which the receiver's direction differs from "east". Measured clockwise in degrees.
Cartesian properties:
- cartesianX, cartesianY, cartesianXY: The x,y, and position in cartesian coordinates (y-up with origin at bottom left)
- cartesianLeft, cartesianRight, cartesianTop, cartesianBottom: The left, right, top, bottom edges in cartesian coordinates (y-up with origin at bottom left)
The DropShadow Aspect
- dropShadowColor: Color.
- dropShadowEnabled: Boolean.
- dropShadowOffset: Point.
The Text Aspect
- text: Text.
- textColor: Color.
- textFont: Font.
- textWrap: Boolean.
- textInset: Point.
- textOffset: Point.
- textAnchorPoint: Symbol.
- textBorderWidth: Number.
- textBorderColor: Color.
The Graphic Aspect
- graphic: Form.
- graphicAnchorPoint: Symbol.
- graphicFit: Symbol.
- graphicForm: Form.
- graphicOffset: Point.
The Layout Aspect
- layout: CLayoutPolicy. The layout of an object is responsible for arranging its elements.
- hResizing: Symbol. A symbol describing the horizontal resizing behavior, one of #rigid, #shrinkWrap, or #spaceFill.
- vResizing: Symbol. A symbol describing the vertical resizing behavior, one of #rigid, #shrinkWrap, or #spaceFill.
Flags
- locked: Boolean.
- sticky: Boolean.
- visible: Boolean.
- clipping: Boolean.
- infinite: Boolean.
- floating: Boolean.
- roundCorners: Boolean.
Scrolling
- hScrollable: Boolean. Determines whether the object can be scrolled horizontally (true) or not (false). If nil, then the behavior is up to the object (the object will decide dynamically whether to show a horizontal scroll bar or not)
- vScrollable: Boolean. Determines whether the object can be scrolled vertically (true) or not (false). If nil, then the behavior is up to the object (the object will decide dynamically whether to show a vertical scroll bar or not)
The Grid Aspect
Every player can carry a grid around. The related properties are:
- origin: Point. Describes where to place the first dot in the grid relative to the position of the grid's costume.
- extent: Point. Describes the extent (modulus) of the grid.
- color: Color. Describes the color in which to display the grid.
- visible: Boolean. Describes whether the grid should be displayed or not.
- enabled: Boolean. Describes whether the grid should be used for alignment or whether it should be ignored.