@almadar/std 16.158.0 → 16.159.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +8 -1
  2. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +8 -1
  3. package/behaviors/lolo/ui/core/atoms/std-list.lolo +8 -1
  4. package/behaviors/lolo/ui/core/atoms/std-related.lolo +8 -1
  5. package/behaviors/lolo/ui/core/atoms/std-selection.lolo +8 -1
  6. package/behaviors/lolo/ui/game/atoms/std-grid-tactics.lolo +3 -2
  7. package/behaviors/lolo/ui/game/atoms/ui-draw-group.lolo +39 -0
  8. package/behaviors/lolo/ui/game/atoms/ui-draw-mesh.lolo +23 -2
  9. package/behaviors/lolo/ui/game/molecules/std-tactics-board-3d.lolo +3 -2
  10. package/behaviors/registry/factory-signatures.json +16058 -34167
  11. package/behaviors/registry/ui/core/atoms/std-calendar.orb +40 -1
  12. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +40 -1
  13. package/behaviors/registry/ui/core/atoms/std-list.orb +40 -1
  14. package/behaviors/registry/ui/core/atoms/std-related.orb +40 -1
  15. package/behaviors/registry/ui/core/atoms/std-selection.orb +40 -1
  16. package/behaviors/registry/ui/game/atoms/std-grid-tactics.orb +218 -2
  17. package/behaviors/registry/ui/game/atoms/ui-draw-group.orb +114 -0
  18. package/behaviors/registry/ui/game/atoms/ui-draw-mesh.orb +81 -2
  19. package/behaviors/registry/ui/game/molecules/std-tactics-board-3d.orb +41 -0
  20. package/behaviors/registry/ui/game/organisms/ui-sokoban-board.orb +1 -475
  21. package/dist/behaviors/behaviors-registry.json +155 -1494
  22. package/dist/behaviors/exports-reader.js +8343 -15544
  23. package/dist/behaviors/functions/index.d.ts +54 -459
  24. package/dist/behaviors/functions/index.js +8344 -15530
  25. package/dist/behaviors/index.d.ts +1 -1
  26. package/dist/behaviors/index.js +8344 -15545
  27. package/dist/behaviors/query.js +8343 -15544
  28. package/dist/behaviors/registry/factory-signatures.json +16058 -34167
  29. package/dist/behaviors/registry/ui/core/atoms/std-calendar.orb +40 -1
  30. package/dist/behaviors/registry/ui/core/atoms/std-esign-flow.orb +40 -1
  31. package/dist/behaviors/registry/ui/core/atoms/std-list.orb +40 -1
  32. package/dist/behaviors/registry/ui/core/atoms/std-related.orb +40 -1
  33. package/dist/behaviors/registry/ui/core/atoms/std-selection.orb +40 -1
  34. package/dist/behaviors/registry/ui/game/atoms/std-grid-tactics.orb +218 -2
  35. package/dist/behaviors/registry/ui/game/atoms/ui-draw-group.orb +114 -0
  36. package/dist/behaviors/registry/ui/game/atoms/ui-draw-mesh.orb +81 -2
  37. package/dist/behaviors/registry/ui/game/molecules/std-tactics-board-3d.orb +41 -0
  38. package/dist/behaviors/registry/ui/game/organisms/ui-sokoban-board.orb +1 -475
  39. package/dist/behaviors-registry.json +155 -1494
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.js +8344 -15545
  42. package/dist/registry/factory-signatures.json +16058 -34167
  43. package/package.json +4 -4
  44. package/behaviors/lolo/ui/game/atoms/ui-svg-draw-group.lolo +0 -58
  45. package/behaviors/lolo/ui/game/atoms/ui-svg-draw-shape.lolo +0 -103
  46. package/behaviors/lolo/ui/game/atoms/ui-svg-draw-text.lolo +0 -58
  47. package/behaviors/lolo/ui/game/molecules/ui-svg-draw-shape-layer.lolo +0 -52
  48. package/behaviors/lolo/ui/game/molecules/ui-svg-stage.lolo +0 -98
  49. package/behaviors/registry/ui/game/atoms/ui-svg-draw-group.orb +0 -186
  50. package/behaviors/registry/ui/game/atoms/ui-svg-draw-shape.orb +0 -259
  51. package/behaviors/registry/ui/game/atoms/ui-svg-draw-text.orb +0 -195
  52. package/behaviors/registry/ui/game/molecules/ui-svg-draw-shape-layer.orb +0 -188
  53. package/behaviors/registry/ui/game/molecules/ui-svg-stage.orb +0 -362
  54. package/dist/behaviors/registry/ui/game/atoms/ui-svg-draw-group.orb +0 -186
  55. package/dist/behaviors/registry/ui/game/atoms/ui-svg-draw-shape.orb +0 -259
  56. package/dist/behaviors/registry/ui/game/atoms/ui-svg-draw-text.orb +0 -195
  57. package/dist/behaviors/registry/ui/game/molecules/ui-svg-draw-shape-layer.orb +0 -188
  58. package/dist/behaviors/registry/ui/game/molecules/ui-svg-stage.orb +0 -362
@@ -63,7 +63,7 @@ orbital CalendarEventOrbital {
63
63
  type: typography
64
64
  variant: body
65
65
  }, {
66
- action: INIT
66
+ action: RETRY
67
67
  icon: rotate-ccw
68
68
  label: Retry
69
69
  type: button
@@ -107,6 +107,13 @@ orbital CalendarEventOrbital {
107
107
  emit: { failure: CalendarEventLoadFailed, success: CalendarEventLoaded }
108
108
  })
109
109
  (render-ui main { type: spinner })
110
+ ;; the error screen's Retry button: INIT is lifecycle-only and the bus never
111
+ ;; delivers it, so the affordance must target a first-class user event
112
+ RETRY -> loading
113
+ (fetch CalendarEvent {
114
+ emit: { failure: CalendarEventLoadFailed, success: CalendarEventLoaded }
115
+ })
116
+ (render-ui main { type: spinner })
110
117
  }
111
118
 
112
119
  emits {
@@ -126,7 +126,7 @@ orbital SignatureSessionOrbital {
126
126
  type: typography
127
127
  variant: body
128
128
  }, {
129
- action: INIT
129
+ action: RETRY
130
130
  icon: rotate-ccw
131
131
  label: Retry
132
132
  type: button
@@ -153,6 +153,13 @@ orbital SignatureSessionOrbital {
153
153
  emit: { failure: SignatureSessionLoadFailed, success: SignatureSessionLoaded }
154
154
  })
155
155
  (render-ui main { type: spinner })
156
+ ;; the error screen's Retry button: INIT is lifecycle-only and the bus never
157
+ ;; delivers it, so the affordance must target a first-class user event
158
+ RETRY -> loading
159
+ (fetch SignatureSession {
160
+ emit: { failure: SignatureSessionLoadFailed, success: SignatureSessionLoaded }
161
+ })
162
+ (render-ui main { type: spinner })
156
163
  }
157
164
 
158
165
  emits {
@@ -120,7 +120,7 @@ orbital ListItemOrbital {
120
120
  type: typography
121
121
  variant: body
122
122
  }, {
123
- action: INIT
123
+ action: RETRY
124
124
  icon: rotate-ccw
125
125
  label: Retry
126
126
  type: button
@@ -147,6 +147,13 @@ orbital ListItemOrbital {
147
147
  emit: { failure: ListItemLoadFailed, success: ListItemLoaded }
148
148
  })
149
149
  (render-ui main { type: spinner })
150
+ ;; the error screen's Retry button: INIT is lifecycle-only and the bus never
151
+ ;; delivers it, so the affordance must target a first-class user event
152
+ RETRY -> loading
153
+ (fetch ListItem {
154
+ emit: { failure: ListItemLoadFailed, success: ListItemLoaded }
155
+ })
156
+ (render-ui main { type: spinner })
150
157
  }
151
158
 
152
159
  emits {
@@ -88,7 +88,7 @@ orbital RelatedItemOrbital {
88
88
  type: typography
89
89
  variant: caption
90
90
  }, {
91
- action: INIT
91
+ action: RETRY
92
92
  icon: rotate-ccw
93
93
  label: Retry
94
94
  type: button
@@ -115,6 +115,13 @@ orbital RelatedItemOrbital {
115
115
  emit: { failure: RelatedItemLoadFailed, success: RelatedItemLoaded }
116
116
  })
117
117
  (render-ui main { type: spinner })
118
+ ;; the error screen's Retry button: INIT is lifecycle-only and the bus never
119
+ ;; delivers it, so the affordance must target a first-class user event
120
+ RETRY -> loading
121
+ (fetch RelatedItem {
122
+ emit: { failure: RelatedItemLoadFailed, success: RelatedItemLoaded }
123
+ })
124
+ (render-ui main { type: spinner })
118
125
  }
119
126
 
120
127
  emits {
@@ -91,7 +91,7 @@ orbital SelectableItemOrbital {
91
91
  type: typography
92
92
  variant: body
93
93
  }, {
94
- action: INIT
94
+ action: RETRY
95
95
  icon: rotate-ccw
96
96
  label: Retry
97
97
  type: button
@@ -229,6 +229,13 @@ orbital SelectableItemOrbital {
229
229
  emit: { failure: SelectableItemLoadFailed, success: SelectableItemLoaded }
230
230
  })
231
231
  (render-ui main { type: spinner })
232
+ ;; the error screen's Retry button: INIT is lifecycle-only and the bus never
233
+ ;; delivers it, so the affordance must target a first-class user event
234
+ RETRY -> loading
235
+ (fetch SelectableItem {
236
+ emit: { failure: SelectableItemLoadFailed, success: SelectableItemLoaded }
237
+ })
238
+ (render-ui main { type: spinner })
232
239
  }
233
240
 
234
241
  emits {
@@ -11,6 +11,7 @@ orbital GridTacticsOrbital {
11
11
  health : number
12
12
  maxHealth : number
13
13
  unitType : string
14
+ yaw : number
14
15
  }
15
16
  type Tile = {
16
17
  id : string
@@ -43,7 +44,7 @@ orbital GridTacticsOrbital {
43
44
  (set @entity.tiles (if (> (array/len @config.tiles) 0) @config.tiles (array/flatten (array/map (array/range 0 @config.gridHeight) (fn gy (array/map (array/range 0 @config.gridWidth) (fn gx { id: (str/concat "t-" @gx "-" @gy), x: @gx, y: @gy, passable: true })))))))
44
45
 
45
46
  MOVE -> active when @config.running
46
- (set @entity.units (array/map @entity.units (fn u (if (and (== @u.id @payload.unitId) (and (grid/in-bounds { x: @payload.x, y: @payload.y } @config.gridWidth @config.gridHeight) (and (== (object/get (array/find @entity.tiles (fn t (and (== (object/get @t x) @payload.x) (== (object/get @t y) @payload.y)))) passable) true) (== (array/len (array/filter @entity.units (fn o (and (!= @o.id @payload.unitId) (and (> @o.health 0) (and (== (object/get (object/get @o position) x) @payload.x) (== (object/get (object/get @o position) y) @payload.y))))))) 0)))) (object/merge @u { position: { x: @payload.x, y: @payload.y } }) @u))))
47
+ (set @entity.units (array/map @entity.units (fn u (if (and (== @u.id @payload.unitId) (and (grid/in-bounds { x: @payload.x, y: @payload.y } @config.gridWidth @config.gridHeight) (and (== (object/get (array/find @entity.tiles (fn t (and (== (object/get @t x) @payload.x) (== (object/get @t y) @payload.y)))) passable) true) (== (array/len (array/filter @entity.units (fn o (and (!= @o.id @payload.unitId) (and (> @o.health 0) (and (== (object/get (object/get @o position) x) @payload.x) (== (object/get (object/get @o position) y) @payload.y))))))) 0)))) (object/merge @u { position: { x: @payload.x, y: @payload.y }, x: @payload.x, y: @payload.y, yaw:(if (and (== @payload.x (object/get (object/get @u position) x)) (== @payload.y (object/get (object/get @u position) y))) (if (object/get @u yaw) (object/get @u yaw) 0) (if (>= (math/abs (- @payload.x (object/get (object/get @u position) x))) (math/abs (- @payload.y (object/get (object/get @u position) y)))) (if (> @payload.x (object/get (object/get @u position) x)) 1.5708 -1.5708) (if (> @payload.y (object/get (object/get @u position) y)) 0 3.1416))) }) @u))))
47
48
 
48
49
  ATTACK -> active when @config.running
49
50
  (emit BURST { particles: (array/map (array/filter @entity.units (fn u (and (== @u.id @payload.targetId) (> @u.health 0)))) (fn u { id: (str/concat "fx-atk-" @u.id), type: "hit", x: (object/get (object/get @u position) x), z: (object/get (object/get @u position) y), message: (str/concat "-" @config.attackDamage), ttl: 3 })) })
@@ -60,7 +61,7 @@ orbital GridTacticsOrbital {
60
61
  AI_TURN -> active when @config.running
61
62
  (emit BURST { particles: (array/map (array/filter @entity.units (fn u (and (and (== @u.team "player") (> @u.health 0)) (> (array/len (array/filter @entity.units (fn e (and (and (== @e.team "enemy") (> @e.health 0)) (== (grid/manhattan-distance (object/get @e position) (object/get @u position)) 1))))) 0)))) (fn u { id: (str/concat "fx-ai-" @u.id), type: "hit", x: (object/get (object/get @u position) x), z: (object/get (object/get @u position) y), message: "-1", ttl: 3 })) })
62
63
  (set @entity.units (array/map @entity.units (fn u (if (and (== @u.team "player") (> @u.health 0)) (if (> (array/len (array/filter @entity.units (fn e (and (and (== @e.team "enemy") (> @e.health 0)) (== (grid/manhattan-distance (object/get @e position) (object/get @u position)) 1))))) 0) (object/merge @u { health: (math/max 0 (- @u.health 1)) }) @u) @u))))
63
- (set @entity.units (array/map @entity.units (fn u (if (and (== @u.team "enemy") (> @u.health 0)) (if (== (array/len (array/filter @entity.units (fn p (and (and (== @p.team "player") (> @p.health 0)) (== (grid/manhattan-distance (object/get @u position) (object/get @p position)) 1))))) 0) (let ((target (array/reduce (array/filter @entity.units (fn p (and (== @p.team "player") (> @p.health 0)))) null (fn nearest p (if (or (== @nearest null) (< (grid/manhattan-distance (object/get @p position) (object/get @u position)) (grid/manhattan-distance (object/get @nearest position) (object/get @u position)))) @p @nearest))))) (if (== @target null) @u (let ((nextX (math/clamp (+ (object/get (object/get @u position) x) (math/sign (- (object/get (object/get @target position) x) (object/get (object/get @u position) x)))) 0 (- @config.gridWidth 1))) (nextY (math/clamp (+ (object/get (object/get @u position) y) (math/sign (- (object/get (object/get @target position) y) (object/get (object/get @u position) y)))) 0 (- @config.gridHeight 1)))) (if (and (grid/in-bounds { x: @nextX, y: @nextY } @config.gridWidth @config.gridHeight) (and (== (object/get (array/find @entity.tiles (fn t (and (== (object/get @t x) @nextX) (== (object/get @t y) @nextY)))) passable) true) (== (array/len (array/filter @entity.units (fn o (and (!= @o.id @u.id) (and (> @o.health 0) (and (== (object/get (object/get @o position) x) @nextX) (== (object/get (object/get @o position) y) @nextY))))))) 0))) (object/merge @u { position: { x: @nextX, y: @nextY } }) @u)))) @u) @u))))
64
+ (set @entity.units (array/map @entity.units (fn u (if (and (== @u.team "enemy") (> @u.health 0)) (if (== (array/len (array/filter @entity.units (fn p (and (and (== @p.team "player") (> @p.health 0)) (== (grid/manhattan-distance (object/get @u position) (object/get @p position)) 1))))) 0) (let ((target (array/reduce (array/filter @entity.units (fn p (and (== @p.team "player") (> @p.health 0)))) null (fn nearest p (if (or (== @nearest null) (< (grid/manhattan-distance (object/get @p position) (object/get @u position)) (grid/manhattan-distance (object/get @nearest position) (object/get @u position)))) @p @nearest))))) (if (== @target null) @u (let ((nextX (math/clamp (+ (object/get (object/get @u position) x) (math/sign (- (object/get (object/get @target position) x) (object/get (object/get @u position) x)))) 0 (- @config.gridWidth 1))) (nextY (math/clamp (+ (object/get (object/get @u position) y) (math/sign (- (object/get (object/get @target position) y) (object/get (object/get @u position) y)))) 0 (- @config.gridHeight 1)))) (if (and (grid/in-bounds { x: @nextX, y: @nextY } @config.gridWidth @config.gridHeight) (and (== (object/get (array/find @entity.tiles (fn t (and (== (object/get @t x) @nextX) (== (object/get @t y) @nextY)))) passable) true) (== (array/len (array/filter @entity.units (fn o (and (!= @o.id @u.id) (and (> @o.health 0) (and (== (object/get (object/get @o position) x) @nextX) (== (object/get (object/get @o position) y) @nextY))))))) 0))) (object/merge @u { position: { x: @nextX, y: @nextY }, x: @nextX, y: @nextY, yaw: (if (== @nextX (object/get (object/get @u position) x)) (if (> @nextY (object/get (object/get @u position) y)) 0 (if (< @nextY (object/get (object/get @u position) y)) 3.1416 (if (object/get @u yaw) (object/get @u yaw) 0))) (if (> @nextX (object/get (object/get @u position) x)) 1.5708 -1.5708)) }) @u)))) @u) @u))))
64
65
  (emit UNITS_CHANGED { playersAlive: (array/len (array/filter @entity.units (fn u (and (== @u.team "player") (> @u.health 0))))), enemiesAlive: (array/len (array/filter @entity.units (fn u (and (== @u.team "enemy") (> @u.health 0))))) })
65
66
  }
66
67
 
@@ -6,6 +6,25 @@ orbital DrawGroupOrbital {
6
6
  y : number!
7
7
  z : number
8
8
  }
9
+ type DrawGroupAnimation = {
10
+ durationMs : number!
11
+ loop : boolean
12
+ keyframes : [DrawGroupAnimationKeyframesItem]!
13
+ }
14
+ type DrawGroupAnimationKeyframesItem = {
15
+ at : number!
16
+ offsetX : number
17
+ offsetY : number
18
+ offsetZ : number
19
+ rotateX : number
20
+ rotateY : number
21
+ rotateZ : number
22
+ scale : number
23
+ opacity : number
24
+ emissiveIntensity : number
25
+ color : string
26
+ emissive : string
27
+ }
9
28
 
10
29
  entity DrawGroupItem [runtime] {
11
30
  id : string!
@@ -20,6 +39,10 @@ orbital DrawGroupOrbital {
20
39
  position: @config.position
21
40
  scale: @config.scale
22
41
  rotate: @config.rotate
42
+ rotation: @config.rotation
43
+ bone: @config.bone
44
+ skeleton: @config.skeleton
45
+ animation: @config.animation
23
46
  opacity: @config.opacity
24
47
  clip: @config.clip
25
48
  items: @config.items
@@ -40,6 +63,22 @@ orbital DrawGroupOrbital {
40
63
  @label "Rotate"
41
64
  @description "Rotation in radians (painter units)."
42
65
  @tier "presentation"
66
+ rotation : [number] = []
67
+ @label "Rotation"
68
+ @description "Euler rotation `[x, y, z]` in radians (world axes) — per-axis joint rotation for the 3D backend; a group placed at a joint with children authored joint-local IS a bone. The 2D painter applies only the in-plane `z` component, after `rotate`."
69
+ @tier "presentation"
70
+ bone : string
71
+ @label "Bone"
72
+ @description "Skeleton bone name. A named group is addressable by a `draw-mesh` `skin` block (smooth skinning): the skinned mesh deforms with this group's animated transform. Names resolve within the nearest enclosing `skeleton: true` group (falling back to the canvas), so multiple instances of one rig never collide. Distinct from `id` (the hit-test handle)."
73
+ @tier "presentation"
74
+ skeleton : boolean
75
+ @label "Skeleton"
76
+ @description "Marks this group as a skeleton SCOPE: `bone` names and `skin` bindings in its subtree resolve against each other only — one scope per rig instance."
77
+ @tier "presentation"
78
+ animation : DrawGroupAnimation
79
+ @label "Animation"
80
+ @description "Keyframe animation over the group TRANSFORM tracks (`offsetX/Y/Z` in cells, `rotateX/Y/Z` in radians, `scale`; the 2D painter also honors `opacity`) — children inherit it, so nested animated groups form a joint chain. Material tracks belong on leaf meshes."
81
+ @tier "presentation"
43
82
  opacity : number
44
83
  @label "Opacity"
45
84
  @description "0..1 opacity."
@@ -6,6 +6,12 @@ orbital DrawMeshOrbital {
6
6
  y : number!
7
7
  z : number
8
8
  }
9
+ type DrawMeshSkin = {
10
+ bones : [string]!
11
+ inverseBindMatrices : [[number]]!
12
+ indices : [[number]]!
13
+ weights : [[number]]!
14
+ }
9
15
  type DrawMeshMaterial = {
10
16
  kind : "standard" | "physical" | "toon" | "basic"
11
17
  color : string
@@ -63,6 +69,9 @@ orbital DrawMeshOrbital {
63
69
  radiusBottom: @config.radiusBottom
64
70
  tube: @config.tube
65
71
  segments: @config.segments
72
+ vertices: @config.vertices
73
+ faces: @config.faces
74
+ skin: @config.skin
66
75
  rotation: @config.rotation
67
76
  pivot: @config.pivot
68
77
  material: @config.material
@@ -76,7 +85,7 @@ orbital DrawMeshOrbital {
76
85
  }
77
86
 
78
87
  config {
79
- shape : "box" | "sphere" | "capsule" | "cylinder" | "cone" | "torus" | "plane" | "circle" = box
88
+ shape : "box" | "sphere" | "capsule" | "cylinder" | "cone" | "torus" | "plane" | "circle" | "polyhedron" = box
80
89
  @label "Shape"
81
90
  @description "shape prop"
82
91
  @tier "presentation"
@@ -116,13 +125,25 @@ orbital DrawMeshOrbital {
116
125
  @label "Segments"
117
126
  @description "Curved-surface tessellation, clamped 3..64 (default 24). 4–8 + `flatShading` = low-poly."
118
127
  @tier "presentation"
128
+ vertices : [[number]] = []
129
+ @label "Vertices"
130
+ @description "`polyhedron` only: raw vertices as scene-frame `[x, y, z]` triples in cells, `z` = up."
131
+ @tier "presentation"
132
+ faces : [[number]] = []
133
+ @label "Faces"
134
+ @description "`polyhedron` only: triangle index triples into `vertices`, wound counter-clockwise seen from OUTSIDE in the scene frame."
135
+ @tier "presentation"
136
+ skin : DrawMeshSkin
137
+ @label "Skin"
138
+ @description "`polyhedron` only: smooth-skinning weights binding the vertices to named bone groups. Vertices must then be authored in BIND POSE model space; the bones' animated transforms deform them."
139
+ @tier "presentation"
119
140
  rotation : [number] = []
120
141
  @label "Rotation"
121
142
  @description "Euler rotation `[x, y, z]` in radians."
122
143
  @tier "presentation"
123
144
  pivot : "bottom" | "center" = bottom
124
145
  @label "Pivot"
125
- @description "`bottom` (default) rests the mesh on its position's ground plane; `center` centers it there."
146
+ @description "`bottom` (default) rests the mesh on its position's ground plane; `center` centers it there. For `polyhedron`, `bottom` lifts by −min(z) and `center` applies no offset — the vertices are authoritative."
126
147
  @tier "presentation"
127
148
  material : DrawMeshMaterial
128
149
  @label "Material"
@@ -31,6 +31,7 @@ orbital TacticsBoard3DOrbital {
31
31
  unitType : string
32
32
  name : string
33
33
  modelUrl : Asset
34
+ yaw : number
34
35
  }
35
36
  type Tile = {
36
37
  id : string
@@ -146,7 +147,7 @@ orbital TacticsBoard3DOrbital {
146
147
  { type: draw-shape-layer, items: (array/map @entity.attackTargets (fn a { type: draw-shape, shape: "cell", position: { x: (object/get @a x), y: (object/get @a z) }, fill: "rgba(239,68,68,0.4)" })) }
147
148
  { type: draw-shape-layer, items: (array/map (array/filter @entity.units (fn u (== (object/get @u id) @entity.selectedUnitId))) (fn u { type: draw-shape, shape: "ellipse", position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, radiusX: 0.5, radiusY: 0.2, stroke: "rgba(0,200,255,0.8)", strokeWidth: 3 })) }
148
149
  ] (array/concat
149
- (array/map (array/filter @entity.units (fn u (object/get @entity.meshAssetArt (object/get @u unitType)))) (fn u (let ((unitStates (object/get @entity.meshAssetArt (object/get @u unitType))) (unitAnim (if (<= (object/get @u health) 0) "death" "idle"))) { type: draw-group, id: (object/get @u id), position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, scale: @config.meshUnitScale, items: (if (object/get @unitStates @unitAnim) (object/get @unitStates @unitAnim) (object/get @unitStates "idle")) })))
150
+ (array/map (array/filter @entity.units (fn u (object/get @entity.meshAssetArt (object/get @u unitType)))) (fn u (let ((unitStates (object/get @entity.meshAssetArt (object/get @u unitType))) (unitAnim (if (<= (object/get @u health) 0) "death" "idle"))) { type: draw-group, id: (object/get @u id), position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, scale: @config.meshUnitScale, rotate: (- 0 (if (object/get @u yaw) (object/get @u yaw) 0)), items: (if (object/get @unitStates @unitAnim) (object/get @unitStates @unitAnim) (object/get @unitStates "idle")) })))
150
151
  (array/concat [
151
152
  { type: draw-sprite-layer, items: (array/map (array/filter @entity.units (fn u (not (object/get @entity.meshAssetArt (object/get @u unitType))))) (fn u { type: draw-sprite, position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, asset: (object/get @u modelUrl), id: (object/get @u id), width: 0.8, height: 0.8, anchor: "ground" })) }
152
153
  { type: draw-shape-layer, items: (array/map @entity.units (fn u { type: draw-shape, shape: "rect", position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, offsetY: -0.6, width: 0.8, height: 0.12, fill: "rgba(0,0,0,0.6)" })) }
@@ -214,7 +215,7 @@ orbital TacticsBoard3DOrbital {
214
215
  { type: draw-shape-layer, items: (array/map @entity.attackTargets (fn a { type: draw-shape, shape: "cell", position: { x: (object/get @a x), y: (object/get @a z) }, fill: "rgba(239,68,68,0.4)" })) }
215
216
  { type: draw-shape-layer, items: (array/map (array/filter @entity.units (fn u (== (object/get @u id) @entity.selectedUnitId))) (fn u { type: draw-shape, shape: "ellipse", position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, radiusX: 0.5, radiusY: 0.2, stroke: "rgba(0,200,255,0.8)", strokeWidth: 3 })) }
216
217
  ] (array/concat
217
- (array/map (array/filter @entity.units (fn u (object/get @entity.meshAssetArt (object/get @u unitType)))) (fn u (let ((unitStates (object/get @entity.meshAssetArt (object/get @u unitType))) (unitAnim (if (<= (object/get @u health) 0) "death" "idle"))) { type: draw-group, id: (object/get @u id), position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, scale: @config.meshUnitScale, items: (if (object/get @unitStates @unitAnim) (object/get @unitStates @unitAnim) (object/get @unitStates "idle")) })))
218
+ (array/map (array/filter @entity.units (fn u (object/get @entity.meshAssetArt (object/get @u unitType)))) (fn u (let ((unitStates (object/get @entity.meshAssetArt (object/get @u unitType))) (unitAnim (if (<= (object/get @u health) 0) "death" "idle"))) { type: draw-group, id: (object/get @u id), position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, scale: @config.meshUnitScale, rotate: (- 0 (if (object/get @u yaw) (object/get @u yaw) 0)), items: (if (object/get @unitStates @unitAnim) (object/get @unitStates @unitAnim) (object/get @unitStates "idle")) })))
218
219
  (array/concat [
219
220
  { type: draw-sprite-layer, items: (array/map (array/filter @entity.units (fn u (not (object/get @entity.meshAssetArt (object/get @u unitType))))) (fn u { type: draw-sprite, position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, asset: (object/get @u modelUrl), id: (object/get @u id), width: 0.8, height: 0.8, anchor: "ground" })) }
220
221
  { type: draw-shape-layer, items: (array/map @entity.units (fn u { type: draw-shape, shape: "rect", position: { x: (object/get @u x), y: (object/get @u y), z: (object/get @u z) }, offsetY: -0.6, width: 0.8, height: 0.12, fill: "rgba(0,0,0,0.6)" })) }