Display Types

Summary
Display Types
CircleA circle object.
RectangleA rectangle object.
ShapeThe parent type for various shapes (circle, rectangle, etc.)
Functions
Shape:setStrokeColor(r, g, b, a)Set the stroke color for the rectangle
Shape:setFillColor(r, g, b, a)Set the fill color for the rectangle
SpriteA sprite object.
Functions
Sprite:prepare(animation_name)Load an animation for the sprite
Sprite:playStart the sprite animation.
Sprite:pausePause the sprite animation.
EmmiterEmmitter objects are particle emitters that can be used for effects like flame, smoke, etc.
Functions
Emitter.setTargetSets the target for the emitter.
NodeThe basic visual type for Gemini SK.
Properties
alphaThe transparency value applied to the Node’s contents.
hiddenBoolean flag indicating whether or not the Node and it’s children are rendered.
nameThe Node’s name.
parentThe Node’s parent Node.
pausedBoolean value indicating whether or not the actions on the node and its descendantes are processed.
sceneThe scene that contains the Node.
speedThe speed at which actions of the Node and its descendants actions are performed.
userInteractionEnabledBoolean value indicating whether or not the Node receives touch events.
xThe x coordinate
yThe y coordinate
xScaleThe scale for the width of the Node and its children.
yScaleThe scale for the height of the node and its children.
zPositionThe height of the Node relative to its parent.
zRotationThe roatation of the Node about the z-axis (in radians).
Functions
Node:setPostion(x, y)Set the position of this Node relative to its parent Node.
Node:delete()Remove this object from the display and allow it to be garbage collected

Circle

A circle object.

Inherits from: Shape

Rectangle

A rectangle object.

Inherits from: Shape

Shape

The parent type for various shapes (circle, rectangle, etc.).  The Shape type cannot be instantiated directly, rather, sub types of Shape are created via factory methods in the shape library.

Inherits from: Node

See also: Circle Rectangle

Summary
Functions
Shape:setStrokeColor(r, g, b, a)Set the stroke color for the rectangle
Shape:setFillColor(r, g, b, a)Set the fill color for the rectangle

Functions

Shape:setStrokeColor(r, g, b, a)

Set the stroke color for the rectangle

Parameters

rThe red component (0 to 1.0) of the color
gThe green component (0 to 1.0) of the color
bThe blue component (0 to 1.0) of the color
aThe alpha component (0 to 1.0) of the color

Shape:setFillColor(r, g, b, a)

Set the fill color for the rectangle

Parameters

rThe red component (0 to 1.0) of the color
gThe green component (0 to 1.0) of the color
bThe blue component (0 to 1.0) of the color
aThe alpha component (0 to 1.0) of the color

Sprite

A sprite object.

Inherits from: Node

Summary
Functions
Sprite:prepare(animation_name)Load an animation for the sprite
Sprite:playStart the sprite animation.
Sprite:pausePause the sprite animation.

Functions

Sprite:prepare(animation_name)

method Sprite:prepare(animation_name)

Load an animation for the sprite

Parameters

animationThe (optional) name of the animation to use from the sprite set.  The default animation is used if this parameter is not present.

Sprite:play

method Sprite:play()

Start the sprite animation.

Sprite:pause

method Sprite:pause()

Pause the sprite animation.

Emmiter

Emmitter objects are particle emitters that can be used for effects like flame, smoke, etc.

Summary
Functions
Emitter.setTargetSets the target for the emitter.

Functions

Emitter.setTarget

method Emitter.setTarget(node)

Sets the target for the emitter.

Parameters

nodeThe target node for the emitter.

See Also

Node

Node

The basic visual type for Gemini SK.  All visual element are based on Node.  Nodes can contain child nodes.  Channging the properties such as poistion or rotation of a Nodes changes the propertis of its children.  Node properties are always relative to its parent.

Note: Boolean properties prepend “is” to the property name for getting the value.  For example, “isHidden”.

Inherits from: GeminiObject

Summary
Properties
alphaThe transparency value applied to the Node’s contents.
hiddenBoolean flag indicating whether or not the Node and it’s children are rendered.
nameThe Node’s name.
parentThe Node’s parent Node.
pausedBoolean value indicating whether or not the actions on the node and its descendantes are processed.
sceneThe scene that contains the Node.
speedThe speed at which actions of the Node and its descendants actions are performed.
userInteractionEnabledBoolean value indicating whether or not the Node receives touch events.
xThe x coordinate
yThe y coordinate
xScaleThe scale for the width of the Node and its children.
yScaleThe scale for the height of the node and its children.
zPositionThe height of the Node relative to its parent.
zRotationThe roatation of the Node about the z-axis (in radians).
Functions
Node:setPostion(x, y)Set the position of this Node relative to its parent Node.
Node:delete()Remove this object from the display and allow it to be garbage collected

Properties

alpha

The transparency value applied to the Node’s contents.  The valid range is 0 (invisible) to 1 (opaque).

hidden

Boolean flag indicating whether or not the Node and it’s children are rendered.

name

The Node’s name.

parent

The Node’s parent Node.  (read only)

paused

Boolean value indicating whether or not the actions on the node and its descendantes are processed.

scene

The scene that contains the Node.  (read only)

speed

The speed at which actions of the Node and its descendants actions are performed.

userInteractionEnabled

Boolean value indicating whether or not the Node receives touch events.

x

The x coordinate

y

The y coordinate

xScale

The scale for the width of the Node and its children.

yScale

The scale for the height of the node and its children.

zPosition

The height of the Node relative to its parent.  Nodes with higher zPositions are rendered after (and therefore on top of) Nodees with lower zPositions.

zRotation

The roatation of the Node about the z-axis (in radians).

Functions

Node:setPostion(x, y)

Set the position of this Node relative to its parent Node.

Parameters

xthe x coordinate of the position
ythe y coordinate of the position

Node:delete()

Remove this object from the display and allow it to be garbage collected

method Sprite:prepare(animation_name)
Load an animation for the sprite
method Sprite:play()
Start the sprite animation.
method Sprite:pause()
Pause the sprite animation.
method Emitter.setTarget(node)
Sets the target for the emitter.
The parent type for various shapes (circle, rectangle, etc.)
The shape library provides methods to create shapes likes rectancgles, polygons, circles, and bezier curves.
The basic visual type for Gemini SK.
A circle object.
A rectangle object.
The base object type for all objects in Gemini SK.
Close