Commit Graph
4 Commits
Author SHA1 Message Date
waozi 2423b97a0c scene/property/signal/transform: drop the Kry/Kryon prefix from the public API
KryScene->Scene, KryNode->Node, KryonProperty*->Property*,
KrySignal*->Signal*, KryTransform2D->Transform2D, and the
KRY_NODE_/KRY_SCENE_/KRYON_PROPERTY_/KRY_SIGNAL_ enum and macro
families to NODE_/SCENE_/PROPERTY_/SIGNAL_. Header guards keep their
original names (internal). The lowercase kry_ module namespaces
(kry_json, kry_term, ...) and the raymath-shadowing helpers
(KryVector2*, KryClamp, KryLerp) stay prefixed: their unprefixed names
collide with the raylib API surface kryon tracks.
2026-08-16 20:35:15 -03:00
waozi 6f40008742 scene: application-defined node kinds with property callbacks
Kinds beyond the builtin enum can now be allocated at runtime
(KryNodeRegisterCustomKind) so games can put their own entity types
into the scene tree and the editor property model without forking
KryNodeKind. Ops/destroyers/spec tables register against the returned
id like any builtin. Custom-kind property access dispatches to
registered getter/setter callbacks; indices 0..2 stay the shared
transform fields handled generically. Kind tables are growable (cap 64)
and bounds checks use the dynamic count.
2026-08-16 20:26:47 -03:00
waozi a242ab5263 scene_property.h: refer to "an IDE inspector" instead of naming Krait
Kryon's library headers should stay IDE-agnostic; the comment named Krait's
Inspector specifically, which trips downstream boundary checks that forbid
kryon library code from referencing standalone IDE repositories.
2026-08-12 19:46:20 -05:00
waozi 65a850fbf1 Add property model and signal bus for the scene tree
Property model (scene_property.h/.c):
- KrySceneRegisterProperties / KryScenePropertySpecs per-kind spec tables
- KrySceneNodeGetProperty/SetProperty read/write runtime KryNode fields
  (transform fields + kind-specific props) through the existing
  KryonPropertySpec/Value model so the editor Inspector can edit every
  field generically instead of special-casing bounds
- Builtin tables for Node2D (position/rotation/scale), Camera2D (+zoom/
  active), Sprite2D (+asset_path/size/tint); registered in
  KrySceneRegisterBuiltins

Signal bus (kry_signal.h/.c):
- KrySignalConnect / KrySignalEmit: declarative node-to-node events
- Per-kind signal handler hook dispatched on emit
- KrySignalDisconnectNode auto-invoked from KryNodeRemove so removed nodes
  don't leave dangling connections
- Connection pool keyed by scene pointer (KryScene stays a fixed struct)
2026-08-11 03:42:19 -05:00