std-simulation-canvas
Level: Atom | Entity: SimulationCanvas | Persistence: runtime
2 states, 4 events, 5 transitions
Live Preview
schema.orb
{
"name": "SimulationCanvasOrbital",
"orbitals": [
{
"name": "SimulationCanvasOrbital",
"entity": {
"name": "SimulationCanvas",
"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": "SimulationCanvasSimulationCanvas",
"linkedEntity": "SimulationCanvas",
"category": "interaction",
"stateMachine": {
"states": [
{
"name": "idle",
"isInitial": true
},
{
"name": "running"
}
],
"events": [
{
"key": "INIT",
"name": "Initialize"
},
{
"key": "START",
"name": "Start"
},
{
"key": "STOP",
"name": "Stop"
},
{
"key": "RESET",
"name": "Reset"
}
],
"transitions": [
{
"from": "idle",
"to": "idle",
"event": "INIT",
"effects": [
[
"fetch",
"SimulationCanvas"
],
[
"render-ui",
"main",
{
"type": "simulation-canvas",
"preset": "pendulum",
"width": 800,
"height": 400,
"running": false,
"speed": 1
}
]
]
},
{
"from": "idle",
"to": "running",
"event": "START",
"effects": [
[
"render-ui",
"main",
{
"type": "simulation-canvas",
"preset": "pendulum",
"width": 800,
"height": 400,
"running": true,
"speed": 1
}
]
]
},
{
"from": "running",
"to": "idle",
"event": "STOP",
"effects": [
[
"render-ui",
"main",
{
"type": "simulation-canvas",
"preset": "pendulum",
"width": 800,
"height": 400,
"running": false,
"speed": 1
}
]
]
},
{
"from": "running",
"to": "running",
"event": "RESET",
"effects": [
[
"render-ui",
"main",
{
"type": "simulation-canvas",
"preset": "pendulum",
"width": 800,
"height": 400,
"running": true,
"speed": 1
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "RESET",
"effects": [
[
"render-ui",
"main",
{
"type": "simulation-canvas",
"preset": "pendulum",
"width": 800,
"height": 400,
"running": false,
"speed": 1
}
]
]
}
]
}
}
],
"pages": [
{
"name": "SimulationCanvasSimulationPage",
"path": "/simulationcanvass",
"traits": [
{
"ref": "SimulationCanvasSimulationCanvas"
}
]
}
]
}
],
"description": "2D physics simulation renderer atom using the `simulation-canvas` pattern. Runs built-in Euler integration for educational presets (pendulum, spring, etc.). Supports start, stop, and reset controls."
}
Loading preview...
Orbital Visualization
Loading visualization...
Entity Fields
| Field | Type | Default |
|---|---|---|
| id | string | - |
| name | string | - |
| description | string | - |
| status | string | "active" |
| createdAt | string | - |
States
| State | Type |
|---|---|
| idle | Initial |
| running | - |
Events
| Event | Payload |
|---|---|
| INIT | - |
| START | - |
| STOP | - |
| RESET | - |
Transitions
| From | Event | To | Effects |
|---|---|---|---|
| idle | INIT | idle | 2 effects |
| idle | START | running | 1 effect |
| running | STOP | idle | 1 effect |
| running | RESET | running | 1 effect |
| idle | RESET | idle | 1 effect |