إنتقل إلى المحتوى الرئيسي

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

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

States

StateType
idleInitial
running-

Events

EventPayload
INIT-
START-
STOP-
RESET-

Transitions

FromEventToEffects
idleINITidle2 effects
idleSTARTrunning1 effect
runningSTOPidle1 effect
runningRESETrunning1 effect
idleRESETidle1 effect