Scripter

The Scripter plugin

Constructor

new Scripter()

Members

containingAtom :Atom

The atom that contains this script

Type:

Methods

declareAction(name, callback) → {ActionDeclaration}

Parameters:
NameTypeDescription
namestring
callbackfunction
Returns:
Type: 
ActionDeclaration

declareBoolParam(args) → {BoolParamDeclaration}

Parameters:
NameTypeDescription
argsObject
Properties
NameTypeAttributesDefaultDescription
namestring

The name of the JSON Storable Param

defaultboolean<optional>
false

The default value

onChangefunction

Callback when the value changes

Returns:
Type: 
BoolParamDeclaration

declareFloatParam(args) → {FloatParamDeclaration}

Parameters:
NameTypeDescription
argsObject
Properties
NameTypeAttributesDefaultDescription
namestring

The name of the JSON Storable Param

defaultnumber<optional>
0

The default value

minnumber<optional>
0

The minimum value

maxnumber<optional>
1

The maximum value

constrainboolean<optional>
true

Whether the value can exceed the min/max settings

onChangefunction

Callback when the value changes

Returns:
Type: 
FloatParamDeclaration

declareStringParam(args) → {StringParamDeclaration}

Parameters:
NameTypeDescription
argsObject
Properties
NameTypeAttributesDefaultDescription
namestring

The name of the JSON Storable Param

defaultstring<optional>
""

The default value

onChangefunction

Callback when the value changes

Returns:
Type: 
StringParamDeclaration

onFixedUpdate(fn) → {void}

Called every physics frame

Parameters:
NameTypeDescription
fnfunction
Returns:
Type: 
void

onUpdate(fn) → {void}

Called every frame

Parameters:
NameTypeDescription
fnfunction
Returns:
Type: 
void