Preskoči na vsebino

std-combat-log

Level: Atom | Entity: CombatLog | Persistence: runtime

1 states, 3 events, 3 transitions

Live Preview

schema.orb
{
"name": "CombatLogOrbital",
"orbitals": [
{
"name": "CombatLogOrbital",
"entity": {
"name": "CombatLog",
"persistence": "runtime",
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "status",
"type": "string",
"default": "active",
"values": [
"active",
"inactive",
"pending"
]
},
{
"name": "createdAt",
"type": "string"
}
]
},
"traits": [
{
"name": "CombatLogCombatLog",
"linkedEntity": "CombatLog",
"category": "interaction",
"stateMachine": {
"states": [
{
"name": "idle",
"isInitial": true
}
],
"events": [
{
"key": "INIT",
"name": "Initialize"
},
{
"key": "LOG_EVENT",
"name": "Log Event",
"payload": [
{
"name": "data",
"type": "object",
"required": true
}
]
},
{
"key": "CLEAR",
"name": "Clear"
}
],
"transitions": [
{
"from": "idle",
"to": "idle",
"event": "INIT",
"effects": [
[
"fetch",
"CombatLog"
],
[
"render-ui",
"main",
{
"type": "combat-log",
"events": "@CombatLog",
"maxVisible": 10,
"autoScroll": true,
"showTimestamps": true,
"title": "Combat Log"
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "LOG_EVENT",
"effects": [
[
"render-ui",
"main",
{
"type": "combat-log",
"events": "@CombatLog",
"maxVisible": 10,
"autoScroll": true,
"showTimestamps": true,
"title": "Combat Log"
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "CLEAR",
"effects": [
[
"render-ui",
"main",
{
"type": "combat-log",
"events": "@CombatLog",
"maxVisible": 10,
"autoScroll": true,
"showTimestamps": true,
"title": "Combat Log"
}
]
]
}
]
}
}
],
"pages": [
{
"name": "CombatLogLogPage",
"path": "/combatlogs",
"traits": [
{
"ref": "CombatLogCombatLog"
}
]
}
]
}
],
"description": "Scrollable combat event log atom using the `combat-log` pattern. Displays timestamped combat events with icons and colors. Supports appending new events and clearing the log."
}
Loading preview...

Orbital Visualization

Loading visualization...

Entity Fields

FieldTypeDefault
idstring-
namestring-
descriptionstring-
statusstring"active"
createdAtstring-

States

StateType
idleInitial

Events

EventPayload
INIT-
LOG_EVENTdata: object
CLEAR-

Transitions

FromEventToEffects
idleINITidle2 effects
idleLOG_EVENTidle1 effect
idleCLEARidle1 effect