Global

Type Definitions

AABBObject

An axis-aligned bounding box. Used to represents a box around an object for example.

Properties:
Name Type Description
min Array.<number>

The [x,y] coordinates of the top left point

max Array.<number>

The [x,y] coordinates of the bottom right point

BehaviorData

Properties:
Name Type Description
name string

The name of the behavior (for getting from an object (object.getBehavior) for example)

type string

The behavior type. Used by GDJS to find the proper behavior to construct.

gdjsPixiFiltersToolsFilterObject

The type of a filter used to manipulate a Pixi filter.

Properties:
Name Type Description
pixiFilter any

The PIXI filter

update gdjsPixiFiltersToolsUpdate

The function to be called to update the filter at every frame

updateDoubleParameter gdjsPixiFiltersToolsUpdateDoubleParameter

The function to be called to update a parameter (with a number)

updateStringParameter gdjsPixiFiltersToolsUpdateStringParameter

The function to be called to update a parameter (with a string)

updateBooleanParameter gdjsPixiFiltersToolsUpdateBooleanParameter

The function to be called to update a parameter (with a boolean)

gdjsPixiFiltersToolsFilterCreatorObject

A wrapper allowing to create a PIXI filter and update it using a common interface

Properties:
Name Type Description
makePIXIFilter gdjsPixiFiltersToolsFilterCreatorMakePIXIFilter

Function to call to create the filter

update gdjsPixiFiltersToolsUpdate

The function to be called to update the filter at every frame

updateDoubleParameter gdjsPixiFiltersToolsUpdateDoubleParameter

The function to be called to update a parameter (with a number)

updateStringParameter gdjsPixiFiltersToolsUpdateStringParameter

The function to be called to update a parameter (with a string)

updateBooleanParameter gdjsPixiFiltersToolsUpdateBooleanParameter

The function to be called to update a parameter (with a boolean)

gdjsPixiFiltersToolsFilterCreatorMakePIXIFilter(layer, effectData){Object}

Function to call to create the PIXI filter used at runtime

Name Type Description
layer gdjs.Layer
effectData Object
Returns:
Type Description
Object

gdjsPixiFiltersToolsUpdate(filter, layer){Object}

The function to be called to update the filter at every frame

Name Type Description
filter Object
layer gdjs.Layer
Returns:
Type Description
Object

gdjsPixiFiltersToolsUpdateBooleanParameter(filter, parameterName, value){void}

The function to be called to update a parameter (with a boolean)

Name Type Description
filter Object
parameterName string
value boolean
Returns:
Type Description
void

gdjsPixiFiltersToolsUpdateDoubleParameter(filter, parameterName, value){void}

The function to be called to update a parameter (with a number)

Name Type Description
filter Object
parameterName string
value number
Returns:
Type Description
void

gdjsPixiFiltersToolsUpdateStringParameter(filter, parameterName, value){void}

The function to be called to update a parameter (with a string)

Name Type Description
filter Object
parameterName string
value string
Returns:
Type Description
void

gdjsTwoListsTestPredicate(object1, object2, extraArg){boolean}

A predicate to be passed to gdjs.evtTools.object.twoListsTest.

Name Type Description
object1 gdjs.RuntimeObject

First object

object2 gdjs.RuntimeObject

Second object

extraArg *

An optional extra argument

Returns:
Type Description
boolean true if the pair satisfy the predicate (for example,there is a collision), meaning that the objects will be picked, false otherwise (no collision).

JsonManagerOnCompleteCallback(total){undefined}

The callback called when all jsons are preloaded

Name Type Description
total number

The total number to be loaded

Returns:
Type Description
undefined Nothing

JsonManagerOnProgressCallback(loaded, total){undefined}

The callback called when a json is preloaded

Name Type Description
loaded number

The number of json files loaded so far

total number

The total number to be loaded

Returns:
Type Description
undefined Nothing

JsonManagerRequestCallback(error, jsonContent){undefined}

The callback called when a json that was requested is loaded (or an error occured).

Name Type Description
error Error nullable

The error, if any. null otherwise.

jsonContent Object nullable

The content of the json file (or null if an error occured).

Returns:
Type Description
undefined Nothing

ObjectDataObject

Object containing initial properties for all objects extending gdjs.RuntimeObject.

Properties:
Name Type Description
name string

The name of the object. During the game, objects can be queried by their name (see gdjs.RuntimeScene.prototype.getObjects for example).

type string

The object type.

variables Array.<VariableData>

The list of default variables.

behaviors Array.<BehaviorData>

The list of default behaviors.

SpriteAnimationDataObject

Represents the data of a gdjs.SpriteAnimation.

Properties:
Name Type Argument Description
name string <optional>

The name of the animation.

useMultipleDirections boolean

Does the animation use multiple gdjs.SpriteAnimationDirection?

directions Array.<SpriteDirectionData>

The list of SpriteDirectionData representing gdjs.SpriteAnimationDirection instances.

SpriteCenterPointDataObject

Represents the center point in a frame.

Properties:
Name Type Description
automatic boolean

Is the center automatically computed?

x number

X position of the point.

y number

Y position of the point.

SpriteCustomPointDataObject

Represents a custom point in a frame.

Properties:
Name Type Description
name string

Name of the point.

x number

X position of the point.

y number

Y position of the point.

SpriteDirectionDataObject

Represents the data of a gdjs.SpriteAnimationDirection.

Properties:
Name Type Description
timeBetweenFrames number

Time between each frame, in seconds.

looping boolean

Is the animation looping?

sprites Array.<SpriteFrameData>

The list of frames.

SpriteFrameDataObject

Properties:
Name Type Argument Description
image string <optional>

The resource name of the image used in this frame.

points Array.<SpriteCustomPointData> <optional>

The points of the frame.

originPoint SpritePoint

The origin point.

centerPoint SpriteCenterPointData

The center of the frame.

hasCustomCollisionMask boolean

Is The collision mask custom?

customCollisionMask Array.<Array.<SpritePoint>> <optional>

The collision mask if it is custom.

SpriteObjectDataObject

Represents the data of a gdjs.SpriteRuntimeObject.

Properties:
Name Type Description
updateIfNotVisible boolean

Update the object even if he is not visible?.

animations Array.<SpriteAnimationData>

The list of SpriteAnimationData representing gdjs.SpriteAnimation instances.

SpritePointObject

Represents a point in a coordinate system.

Properties:
Name Type Description
x number

X position of the point.

y number

Y position of the point.

VariableDataObject

Data representation of a GDevelop variable

Properties:
Name Type Argument Description
name string <optional>

The name of the variable. Used if a child variable.

value string <optional>

The value of the variable, either string or number. Leave blank for structures.

children Array.<VariableData> <optional>

The children of the structure. Leave blank if value is defined.