tween on positions
This commit is contained in:
@@ -1,51 +1,54 @@
|
||||
[
|
||||
{
|
||||
"chan": "gps:agents",
|
||||
"events": [
|
||||
{
|
||||
"eventName": "moving",
|
||||
"mappings": [
|
||||
{
|
||||
"id": "aid",
|
||||
"assign": {
|
||||
"position.x": "coords.x",
|
||||
"position.z": "coords.y"
|
||||
{
|
||||
"chan": "gps:agents",
|
||||
"events": [
|
||||
{
|
||||
"eventName": "moving",
|
||||
"mappings": [
|
||||
{
|
||||
"id": "aid",
|
||||
"assign": {
|
||||
"position.x": "coords.x",
|
||||
"position.z": "coords.y",
|
||||
"position.y": "coords.z"
|
||||
},
|
||||
"tween": true,
|
||||
"tweenDelay": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
"animate": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventName": "rotating",
|
||||
"mappings": [
|
||||
{
|
||||
"id": "aid",
|
||||
"assign": {
|
||||
"r": "rotangle"
|
||||
},
|
||||
"animate": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"chan": "agent:*",
|
||||
"events": [
|
||||
{
|
||||
"eventName": "aging",
|
||||
"mappings": [
|
||||
{
|
||||
"id": "aid",
|
||||
"assign": {
|
||||
"fill": {
|
||||
"arguments": ["age"],
|
||||
"transformer": "rgb(${Math.round(255 * age / 10)},0,${Math.round(255 * (1 - age / 10))})"
|
||||
}
|
||||
{
|
||||
"eventName": "rotating",
|
||||
"mappings": [
|
||||
{
|
||||
"id": "aid",
|
||||
"assign": {
|
||||
"r": "rotangle"
|
||||
},
|
||||
"tween": true,
|
||||
"tweenDelay": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"chan": "agent:*",
|
||||
"events": [
|
||||
{
|
||||
"eventName": "aging",
|
||||
"mappings": [
|
||||
{
|
||||
"id": "aid",
|
||||
"assign": {
|
||||
"fill": {
|
||||
"arguments": ["age"],
|
||||
"transformer": "rgb(${Math.round(255 * age / 10)},0,${Math.round(255 * (1 - age / 10))})"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user