Non Display Types

Summary
Non Display Types
PathA mathematical description of a series of shapes or lines.
GeminiObjectThe base object type for all objects in Gemini SK.
Functions
GeminiObject:addEventListener(name, listener)Add an event listener for the named type of event.
GeminiObject:removeEventListener(name, listener)Remove an event listener for the named type of event.
PhysicsBodyA body used in physics simulation.
Properties
affectedByGravityA boolean value that indicates whether or not this body should respond to gravity.
allowsRotationA boolean value that indicates whether or not this body responds to angular forces or impulses.
allowsRestingA boolean value that indicates whether or not this body is allowed to sleep.
angularDampingLike friction for rotation.
angularVelocityThe phsyics bodies rotational speed in radians per second (clockwise) about the z-axis.
area (read-only)The area covered by this body
categoryBitMaskThe mask that defines which categories this physics body belongs to for collision determination.
collisionBitMaskThe mask that defines which categories of physics bodies can collide with this body.
dynamicBoolean flag indicating whether or not this object responds to forces and collisions or moves at all.
frictionThe roughness of the surface of the body.
gravityScaleThe roughness of the surface of the body.Ffre
joints (read-only)The PhysicsJoints connected to the body.
linearDampingA property that reduces a body’s linear velocity.
massThe mass of the body in kilograms.
node (read-only)The Node this body is connected to.
restingBoolean flag indicating whether or not the Node and it’s children are rendered.
restitutionThe bounciness of the body.
velocityThe velocity vector of the physics body in meters per second.
Functions
PhysicsBody:addShape(shape, listener)Add a shape
PhysicsBody:removeEventListener(name, listener)Remove an event listener for the named type of event.

Path

A mathematical description of a series of shapes or lines.  The elements of a Path are constructed from a series of connected lines or Bezier curves.  Paths are used to create shapes or to describe motion paths for Node objects.

Inherits from: GeminiObject

GeminiObject

The base object type for all objects in Gemini SK.

Summary
Functions
GeminiObject:addEventListener(name, listener)Add an event listener for the named type of event.
GeminiObject:removeEventListener(name, listener)Remove an event listener for the named type of event.

Functions

GeminiObject:addEventListener(name, listener)

Add an event listener for the named type of event.

Parameters

namethe name of the event type
listenera function or table containing a function with the same name as the event that will be called when the object receives the event.

The listener function should accecpt the event object as a parameter.  See the Scene Template file for examples.

GeminiObject:removeEventListener(name, listener)

Remove an event listener for the named type of event.

Parameters

namethe name of the event type
listenera function or table that is the event handler

PhysicsBody

A body used in physics simulation.

Summary
Properties
affectedByGravityA boolean value that indicates whether or not this body should respond to gravity.
allowsRotationA boolean value that indicates whether or not this body responds to angular forces or impulses.
allowsRestingA boolean value that indicates whether or not this body is allowed to sleep.
angularDampingLike friction for rotation.
angularVelocityThe phsyics bodies rotational speed in radians per second (clockwise) about the z-axis.
area (read-only)The area covered by this body
categoryBitMaskThe mask that defines which categories this physics body belongs to for collision determination.
collisionBitMaskThe mask that defines which categories of physics bodies can collide with this body.
dynamicBoolean flag indicating whether or not this object responds to forces and collisions or moves at all.
frictionThe roughness of the surface of the body.
gravityScaleThe roughness of the surface of the body.Ffre
joints (read-only)The PhysicsJoints connected to the body.
linearDampingA property that reduces a body’s linear velocity.
massThe mass of the body in kilograms.
node (read-only)The Node this body is connected to.
restingBoolean flag indicating whether or not the Node and it’s children are rendered.
restitutionThe bounciness of the body.
velocityThe velocity vector of the physics body in meters per second.
Functions
PhysicsBody:addShape(shape, listener)Add a shape
PhysicsBody:removeEventListener(name, listener)Remove an event listener for the named type of event.

Properties

affectedByGravity

A boolean value that indicates whether or not this body should respond to gravity.

allowsRotation

A boolean value that indicates whether or not this body responds to angular forces or impulses.

allowsResting

A boolean value that indicates whether or not this body is allowed to sleep.  Sleeping bodies are bodies that have come to rest on another body.  Sleeping/resting bodies do not need to be simulated unless something wakes them up (collision with another body or force applied) and therefore require little cpu overhead.

angularDamping

Like friction for rotation.  Must be between 0 and 1.0.  The default value is 0.1.

angularVelocity

The phsyics bodies rotational speed in radians per second (clockwise) about the z-axis.

area (read-only)

The area covered by this body

categoryBitMask

The mask that defines which categories this physics body belongs to for collision determination.  This is a 32-bit quantity that allows for up to 32 categories.  The default value is 0xFFFFFFFF (all categories).

collisionBitMask

The mask that defines which categories of physics bodies can collide with this body.  This is a 32-bit quantity that is logically ANDed with the categoryBitMask of the other body - if the value is nonzero then this body is affected by the collision.  The default value is 0xFFFFFFFF (all categories).

Propery: density The density of the object in kg per cubic meter.  Changing this value will change the mass and vice versa.  The default value is 1.0.

dynamic

Boolean flag indicating whether or not this object responds to forces and collisions or moves at all.  Default is true.

friction

The roughness of the surface of the body.  The value can be between 0 and 1, with 0 indicating no friction and 1 indicating strong friction.  The default value is 0.1.

gravityScale

The roughness of the surface of the body.Ffre

joints (read-only)

The PhysicsJoints connected to the body.

linearDamping

A property that reduces a body’s linear velocity.  This can simulate liquid or air friction acting on the body.  The value must be between 0 and 1, with 0 indicating no damping.  The default value is 0.1.

mass

The mass of the body in kilograms.  Resetting mass also resets density.

node (read-only)

The Node this body is connected to.

resting

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

restitution

The bounciness of the body.  The value must be between 0 and 1 with 0 indicating perfectly elastic (no energy lost in collisions).  The default value is 0.2.

velocity

The velocity vector of the physics body in meters per second.

Functions

PhysicsBody:addShape(shape, listener)

Add a shape

Parameters

namethe name of the event type
listenera function or table that is the event handler

PhysicsBody:removeEventListener(name, listener)

Remove an event listener for the named type of event.

Parameters

namethe name of the event type
listenera function or table that is the event handler
The basic visual type for Gemini SK.
The base object type for all objects in Gemini SK.
An object passed to an event handler that contains information about the event that has occurred.
Close