tween on positions

This commit is contained in:
STEINNI
2025-09-28 18:28:17 +00:00
parent 34d93cecdb
commit 8be18e8d83
8 changed files with 106 additions and 88 deletions
+49 -46
View File
@@ -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))})"
}
}
}
]
}
]
}
]