Package-level declarations

Types

Link copied to clipboard
class BackwardsEase(val ease: Ease) : Ease
Link copied to clipboard
class BezierEase(mX1: Float, mY1: Float, mX2: Float, mY2: Float) : Ease

An Ease defined by a bezier curve.

Link copied to clipboard

Join multiple eases together into a single compound ease. Imagine an Ease as a graph which goes from (0,0) to (1,1), a linear Ease would be a straight line, and a EaseInOut Ease would be a slanted S shape. A CompoundEase is a set of these graphs all joined together. Each section is an ease which goes from 0 to 1, but the CompoundEase, can change the destination for all but the last Ease. For example, if we joined two LinearEases together, where the first destination was 0.5, then it would be identical to a single LinearEase. However, if we made the first destination 0.1, then the first part of the animation would change slowly (as the gradient is shallow), and the second half would be quick (going from 0.1 to 1 in the same time as the first half took to go from 0 to 0.1).

Link copied to clipboard
annotation class Custom(val about: String = "", val isAct: Boolean = false)

An annotation placed on properties of Behaviour which are saved as part of the .act files.

Link copied to clipboard
interface Ease

An ease is a function which takes an input from 0..1 and returns a value, which is usually in the range 0..1. The simplest is LinearEase, which is a straight line from (0,0) to (1,1) :

Link copied to clipboard
object Eases
Link copied to clipboard
object InverseEase : Ease
Link copied to clipboard
object LinearEase : Ease
Link copied to clipboard
class PingPingEase(val ease: Ease) : Ease

The original ease is mirrored, and then squashed to fit into the range 0..1. e.g. A LinearEase will be transformed from a straight line to an up-slope followed by a down-slope. If we play the ease, it starts a 0, reaches 1 at t=0.5 then returns to 0 at t=1.

Link copied to clipboard

A Shader program which blits axis-aligned rectangular area of a Texture. There are no transformation matrices - the API uses to -1 to 1 coordinates for the destination and 0..1 for the texture's coordinates.

Link copied to clipboard
object Ticker

Calls tick related methods every frame. The order of operations :

Link copied to clipboard
data class Vector2(val x: Float, val y: Float)

Properties

Link copied to clipboard

@Custom annotations are not supported in Javascript, but game-code should still include them, and implement the method Customisable.customProperties

Functions

Link copied to clipboard
expect fun copyTexture(src: Texture, srcX: Int, srcY: Int, width: Int, height: Int, dest: Texture)
actual fun copyTexture(src: Texture, srcX: Int, srcY: Int, width: Int, height: Int, dest: Texture)
actual fun copyTexture(src: Texture, srcX: Int, srcY: Int, width: Int, height: Int, dest: Texture)