Talos docs

GET /entities

Since 0.6

Still a bare array however it is narrowed; how many matched and where the next page starts are the x-argus-total and x-argus-next-cursor headers.

Plain text

Request

Query parameters

ParameterShapeMeaning
ida,b,coin#*the entity's id is one of these; an item with * or ? is a pattern
namepatternthe entity's name matches (* any run of characters, ? exactly one)
tagstringthe entity carries this tag exactly
componentstringthe entity carries a component of this type
nearx,y,z,radiusthe entity's position is within radius metres of the point
insideminx,miny,minz,maxx,maxy,maxzthe entity's position is inside this box, bounds included
fieldstransform,animkeep only these top-level fields of each entity; id is always kept
limitintegerreturn at most this many
cursorthe last page's x-argus-next-cursorstart the page there

Response

Response: array of EntitySnapshot

Everything the agent can see about one entity at one frame.

FieldTypePresentDescription
idstringalwaysStable scene id, unique within the scene. The key for GET /entity/:id.
namestringalwaysHuman-readable label from the scene file. Not unique.
tagsTagsalwaysScene tags, in declaration order. The ?tag= filter matches one of these exactly.
positionnumber[3]alwaysWorld-space position, [x, y, z], metres.
rotationnumber[4]alwaysWorld-space rotation as a quaternion, [x, y, z, w].
scalenumber[3]alwaysLocal scale, [x, y, z].
parentstringsometimesParent entity id, absent at the root.
staticbooleanalwaysTrue when the entity is marked static (never moves; excluded from trace deltas).
velocityVelocitysometimesLinear and angular velocity. Absent for entities with no rigid body.
componentsComponentsalwaysScene components on this entity, in declaration order.
overrides{ string: Props }sometimesWhat a behavior has written over this entity's components with entity.set, by component type — and only what it has written, so an entity nothing has touched has none.
scriptScriptStateViewsometimesThe behavior's ctx.state, if it has a script component.
animAnimStateViewsometimesAnimator state, if it has an animator component.
vehicleVehicleViewsometimesWhat its vehicle is doing, if it is a running vehicle. Everything a tester driving it through its input actions needs to steer by; ?fields=vehicle keeps just this.
spriteSpriteViewsometimesWhat its sprite shows, if it has one: the animation, the frame, the view the last frame drew and the picture's world bounds. ?fields=sprite keeps just this.
tilemapTilemapViewsometimesIts tilemap, if it has one: each layer's size and filled cells, the chunks the last frame drew, the collision rectangles and the world bounds. ?fields=tilemap keeps just this.
frameintegeralwaysThe frame this snapshot was taken at. Correlates with /capture, /events and /trace.

Response: AnimStateView

One animator's restorable playhead, what gates gameplay, and its exact runtime (lane rule 35).

FieldTypePresentDescription
statestringalwaysCurrent state machine state.
timenumberalwaysPlayhead in seconds.
oncestringsometimesThe one-shot playing (ctx.animator.play). Absent when none is.
layersAnimLayerStateView[]sometimesEach declared layer: its name, state and one-shot. Absent with no layers.
speednumbersometimesThe animator-wide playback rate when it is not 1 (0 is a hit-stop).
windowsstring[]sometimesThe animation event windows open now (an attack's hit window).
runtimeOpaqueStatesometimesThe animator's exact runtime (backend argus-animator); hand it back as it is. Missing or of another version, a restore uses state and time only.

Response: AnimLayerStateView

One animator layer in a snapshot (AnimStateView::layers).

FieldTypePresentDescription
namestringalwaysThe layer's name, as the scene declares it.
statestringsometimesThe state playing on it. Absent when it is empty.
oncestringsometimesThe one-shot playing on it. Absent when none is.

Response: OpaqueState

Backend state a snapshot carries but nothing outside the backend interprets.

FieldTypePresentDescription
backendstringalwaysWhich backend wrote this, e.g. rapier3d. A snapshot is only restorable into the same one.
versionintegeralwaysThe backend's format version. A mismatch means the blob cannot be restored.
datastringalwaysThe blob, base64.

Response: ScriptStateView

One behavior's restorable ctx.state.

FieldTypePresentDescription
modulestringalwaysThe module specifier.
statePropsalwaysctx.state. Always an object.

Response: SpriteView

A sprite component as it plays and was last drawn.

FieldTypePresentDescription
animationstringsometimesThe animation playing (or stopped on); absent while a still frame shows.
framestringalwaysThe frame showing.
frameIndexintegeralwaysIts entry in the animation's frame list, 0 up.
playingbooleanalwaysFalse once stopped or a non-looping animation reached its end.
speednumberalwaysPlayback multiplier (ctx.sprite.speed).
viewintegeralwaysThe view the last drawn frame showed: 0 the front, counting counter-clockwise seen from above.
viewsintegeralwaysHow many views the frame has (1: the same from every side).
visiblebooleanalwaysWhether it is drawn (ctx.sprite.visible).
opacitynumberalways0..1; below 1 it is drawn see-through.
boundsnumber[3][2]alwaysWorld-space box of the picture showing, [min, max]: for a sprite that turns to the camera, the box it sweeps as it turns, so it does not depend on where the camera is.

Response: TilemapView

A tilemap component as it stands and was last drawn.

FieldTypePresentDescription
layersTilemapLayerView[]alwaysEvery layer, in the component's order.
chunksDrawnintegeralwaysChunks (16 × 16 cells, one draw each) the last frame drew.
collisionRectsintegeralwaysBoxes in the collision body (merged rectangles of solid cells); 0 with none.
boundsnumber[3][2]alwaysWorld-space box of every layer, [min, max].

Response: TilemapLayerView

One tilemap layer's size and fill.

FieldTypePresentDescription
namestringalwaysIts name (ctx.tilemap calls it this).
widthintegeralwaysCells across.
heightintegeralwaysCells down.
tilesintegeralwaysCells that hold a tile.

Response: VehicleView

A running vehicle, as GET /entities reports it: how it is driven, and where it is going.

FieldTypePresentDescription
inputstringalwaysWho owns its movement. "auto": the engine, from the actions, every tick; a behaviour's ctx.vehicle.drive is ignored. "script": a behaviour, through ctx.vehicle.drive; holds on the actions move nothing.
actionsVehicleActionsalwaysThe actions it reads, by role, each with its kind — only those the scene's gameplay context binds (an unbound role reads 0 and is left out).
speednumberalwaysm/s along its forward; negative while reversing.
forwardnumber[3]alwaysIts nose: the entity's -Z in world axes, unit length.
steerAnglenumberalwaysThe front wheels' angle now, radians, positive right — the sign the steer action has.
maxSteernumberalwaysThe wheels' angle at full lock, radians, at a standstill (it shrinks with speed).
wheelbasenumberalwaysFront axle to rear axle, metres.
minTurnRadiusnumberalwaysThe tightest circle it can turn at its speed now, metres: wheelbase / tan(lock), with the lock the steering's speed reduction leaves.
brakeDecelnumberalwaysThe deceleration full brake gives on the level, m/s²: what stopping at a mark takes.
topSpeednumberalwaysThe fastest it goes flat out on the level, m/s (before drag).
throttlenumberalwaysThe throttle and brake in force this tick, 0..1, after the reverse rule.
brakenumberalwaysSee throttle.
gearintegeralways1 forward, -1 reverse.
wheelsOnGroundintegeralwaysHow many of its wheels touch the ground.
driftVehicleDriftViewsometimesThe drift, only on a vehicle that has a drift block.

Response: VehicleActions

VehicleView::actions: the input action a vehicle reads for each role, where the scene binds it.

FieldTypePresentDescription
throttleVehicleActionsometimesDrives it forward, 0..1 (a button reads 1).
brakeVehicleActionsometimesSlows it; held at a standstill, reverses.
steerVehicleActionsometimesOne axis, -1..1, +1 turning right.
handbrakeVehicleActionsometimesLocks the wheels whose handbrake is set.

Response: VehicleDriftView

VehicleView::drift: what a tester or a game reads of an arcade drift.

FieldTypePresentDescription
activebooleanalwaysA drift is held now.
anglenumberalwaysThe angle between where it points and where it travels, radians, positive right like steerAngle; 0 when not drifting.
chargenumberalwaysSeconds of boost-earning slide in this drift.
tierintegeralwaysThe boost tier the charge has reached: 0 none.
boostTimenumberalwaysSeconds of drift boost left; 0 when none.

Response: Velocity

Linear and angular velocity in world space.

FieldTypePresentDescription
linearnumber[3]alwaysMetres per second, [x, y, z].
angularnumber[3]alwaysRadians per second about each world axis, [x, y, z].

Example

curl "http://127.0.0.1:7700/entities"

Start a server with argus run --serve; the port is --port (7700 by default). The request and response fields are in the query API guide.