Mesh actions are actions that can be run immediately (such as adding tweens to lights), or on interact.
Field
|
Type
|
Description
|
Type
|
String
|
Type of action.
|
Data
|
Object
|
A JSON object that describes your action. See below.
|
Conditions
|
Condition
|
Conditions needed for a task to run. For actions tied to onRefresh, these are checked when you enter the room with the mesh, or a refresh Game Action is triggered. For interactions, it's raised when the player clicks the item (requires a game action set on it).
|
Data Field
Tween
Field
|
Type
|
Default
|
Description
|
prim
|
int
|
-1
|
The prim to run the tween on. -1 targets the root prim, and -2 targets the entire linkset.
|
targ
|
str
|
|
Target object you wish to transform. Such as "position" to translate the object. This is relative to the prim (usually a THREE.Mesh). See the THREE.js mesh docs for more info.
|
from
|
obj
|
|
The start parameters to tween the object from. Such as {"x":0}
|
to
|
obj
|
|
The end parameters to tween the object to. Such as {"x":100}
|
e
|
string
|
Linear.None
|
Tween.js easing type.
|
d
|
int
|
|
Duration of the tween in milliseconds.
|
l
|
int
|
0
|
Sets nr times the animation should loop. Use -1 for infinity.
|
y
|
bool
|
false
|
Sets if the loop style should be yoyo.
|
de
|
int
|
0
|
Pre-delay before starting, milliseconds.
|
rd
|
int
|
0
|
Delay between loops, milliseconds.
|
Example: {"prim":-1, "targ":"position", "from":{"x":0}, "to":{"x":100}, "e":"Sinusoidal.InOut", "d":1000, "l":-1, "y":true}
Moves the root prim back and forth infinitely on the X axis.
Visibility
Field
|
Type
|
Default
|
Description
|
prim
|
int
|
-1
|
Selects which prim should be hidden. -2 hides the full linkset.
|
PlayAnim
Field
|
Type
|
Default
|
Description
|
anim
|
string
|
|
Animation name
|
Note: The following animations are automatically handled for you, and you don't need to create meshActions to play them: idle, idleOpen, open
PlaySound
Field
|
Type
|
Default
|
Description
|
url
|
str
|
|
URL to the sound you want to play. Must be an OGG file.
|
volume
|
float
|
1.0
|
Volume of the sound to play.
|