@almadar/std 16.137.0 → 16.138.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.
|
@@ -144,10 +144,10 @@ orbital WorldMapBoard2DOrbital {
|
|
|
144
144
|
fontFamily: @config.fontFamily
|
|
145
145
|
backgroundAsset: @config.backgroundAsset
|
|
146
146
|
hudBackgroundAsset: @config.hudBackgroundAsset
|
|
147
|
-
hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: (array/concat [ { label: "Region", value: @config.region, iconUrl: @config.regionIconAsset }, { label: "Turn", value: @entity.turn, iconUrl: @config.turnIconAsset }, { label: "Gold", value: @entity.gold, iconUrl: @config.goldIconAsset } ] @config.extraStats) }, { type:
|
|
147
|
+
hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: (array/concat [ { label: "Region", value: @config.region, iconUrl: @config.regionIconAsset }, { label: "Turn", value: @entity.turn, iconUrl: @config.turnIconAsset }, { label: "Gold", value: @entity.gold, iconUrl: @config.goldIconAsset } ] @config.extraStats) }, { type: stack, direction: horizontal, gap: xs, align: center, children: [ { type: icon, name: map-pin }, { type: typography, variant: caption, content: "Waypoints" } ] } ] }
|
|
148
148
|
addons: { type: stack, direction: vertical, gap: sm, children: (array/concat [ { type: button, action: ADVANCE_TURN, label: "Pass Turn", iconAsset: @config.travelIconAsset, variant: primary } ] @config.extraAddons) }
|
|
149
149
|
overlay: (if (!= @entity.result "none") { type: game-menu, title: (if (== @entity.result "victory") "VICTORY" "DEFEAT"), subtitle: (if (== @entity.result "victory") "The realm is secured" "Your heroes have fallen"), options: [] } null)
|
|
150
|
-
children: [ { type: canvas, camera: { zoom: (math/min 1 (/ 5 (+ 1 (math/max (array/max @entity.tiles "x") (array/max @entity.tiles "y"))))), pos: { x: (/ (+ (array/min @entity.tiles "x") (array/max @entity.tiles "x")) 2), y: (/ (+ (array/min @entity.tiles "y") (array/max @entity.tiles "y")) 2) } }, projection: "isometric", showMinimap: true, tileClickEvent: HERO_MOVE, unitClickEvent: HERO_SELECT, children: [
|
|
150
|
+
children: [ { type: canvas, camera: { mode: "isometric", zoom: (math/min 1 (/ 5 (+ 1 (math/max (array/max @entity.tiles "x") (array/max @entity.tiles "y"))))), pos: { x: (/ (+ (array/min @entity.tiles "x") (array/max @entity.tiles "x")) 2), y: (/ (+ (array/min @entity.tiles "y") (array/max @entity.tiles "y")) 2) } }, projection: "isometric", showMinimap: true, tileClickEvent: HERO_MOVE, unitClickEvent: HERO_SELECT, children: [
|
|
151
151
|
{ type: draw-shape-layer, items: (array/map @entity.tiles (fn t { type: draw-shape, shape: "cell", position: { x: (object/get @t x), y: (object/get @t y) }, fill: "#5c94fc", stroke: "rgba(255,255,255,0.35)", strokeWidth: 1 })) }
|
|
152
152
|
{ type: draw-sprite-layer, items: (array/filter (array/map @entity.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (if (object/get (object/get @t terrainSprite) url) (object/get @t terrainSprite) (object/get (object/get @config.assetManifest terrains) (object/get @t terrain))), anchor: "center", width: 0.5, height: 0.5 })) (fn s (object/get (object/get @s asset) url))) }
|
|
153
153
|
{ type: draw-sprite-layer, items: (array/map @config.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
|
|
@@ -192,10 +192,10 @@ orbital WorldMapBoard2DOrbital {
|
|
|
192
192
|
fontFamily: @config.fontFamily
|
|
193
193
|
backgroundAsset: @config.backgroundAsset
|
|
194
194
|
hudBackgroundAsset: @config.hudBackgroundAsset
|
|
195
|
-
hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: (array/concat [ { label: "Region", value: @config.region, iconUrl: @config.regionIconAsset }, { label: "Turn", value: @entity.turn, iconUrl: @config.turnIconAsset }, { label: "Gold", value: @entity.gold, iconUrl: @config.goldIconAsset } ] @config.extraStats) }, { type:
|
|
195
|
+
hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: (array/concat [ { label: "Region", value: @config.region, iconUrl: @config.regionIconAsset }, { label: "Turn", value: @entity.turn, iconUrl: @config.turnIconAsset }, { label: "Gold", value: @entity.gold, iconUrl: @config.goldIconAsset } ] @config.extraStats) }, { type: stack, direction: horizontal, gap: xs, align: center, children: [ { type: icon, name: map-pin }, { type: typography, variant: caption, content: "Waypoints" } ] } ] }
|
|
196
196
|
addons: { type: stack, direction: vertical, gap: sm, children: (array/concat [ { type: button, action: ADVANCE_TURN, label: "Pass Turn", iconAsset: @config.travelIconAsset, variant: primary } ] @config.extraAddons) }
|
|
197
197
|
overlay: (if (!= @entity.result "none") { type: game-menu, title: (if (== @entity.result "victory") "VICTORY" "DEFEAT"), subtitle: (if (== @entity.result "victory") "The realm is secured" "Your heroes have fallen"), options: [] } null)
|
|
198
|
-
children: [ { type: canvas, camera: { zoom: (math/min 1 (/ 5 (+ 1 (math/max (array/max @entity.tiles "x") (array/max @entity.tiles "y"))))), pos: { x: (/ (+ (array/min @entity.tiles "x") (array/max @entity.tiles "x")) 2), y: (/ (+ (array/min @entity.tiles "y") (array/max @entity.tiles "y")) 2) } }, projection: "isometric", showMinimap: true, tileClickEvent: HERO_MOVE, unitClickEvent: HERO_SELECT, children: [
|
|
198
|
+
children: [ { type: canvas, camera: { mode: "isometric", zoom: (math/min 1 (/ 5 (+ 1 (math/max (array/max @entity.tiles "x") (array/max @entity.tiles "y"))))), pos: { x: (/ (+ (array/min @entity.tiles "x") (array/max @entity.tiles "x")) 2), y: (/ (+ (array/min @entity.tiles "y") (array/max @entity.tiles "y")) 2) } }, projection: "isometric", showMinimap: true, tileClickEvent: HERO_MOVE, unitClickEvent: HERO_SELECT, children: [
|
|
199
199
|
{ type: draw-shape-layer, items: (array/map @entity.tiles (fn t { type: draw-shape, shape: "cell", position: { x: (object/get @t x), y: (object/get @t y) }, fill: "#5c94fc", stroke: "rgba(255,255,255,0.35)", strokeWidth: 1 })) }
|
|
200
200
|
{ type: draw-sprite-layer, items: (array/filter (array/map @entity.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (if (object/get (object/get @t terrainSprite) url) (object/get @t terrainSprite) (object/get (object/get @config.assetManifest terrains) (object/get @t terrain))), anchor: "center", width: 0.5, height: 0.5 })) (fn s (object/get (object/get @s asset) url))) }
|
|
201
201
|
{ type: draw-sprite-layer, items: (array/map @config.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
|
|
@@ -2205,6 +2205,7 @@
|
|
|
2205
2205
|
"children": [
|
|
2206
2206
|
{
|
|
2207
2207
|
"camera": {
|
|
2208
|
+
"mode": "isometric",
|
|
2208
2209
|
"pos": {
|
|
2209
2210
|
"x": [
|
|
2210
2211
|
"/",
|
|
@@ -2697,89 +2698,6 @@
|
|
|
2697
2698
|
],
|
|
2698
2699
|
"type": "game-hud"
|
|
2699
2700
|
},
|
|
2700
|
-
{
|
|
2701
|
-
"camera": {
|
|
2702
|
-
"zoom": 0.08
|
|
2703
|
-
},
|
|
2704
|
-
"children": [
|
|
2705
|
-
{
|
|
2706
|
-
"items": [
|
|
2707
|
-
"array/map",
|
|
2708
|
-
"@entity.tiles",
|
|
2709
|
-
[
|
|
2710
|
-
"fn",
|
|
2711
|
-
"t",
|
|
2712
|
-
{
|
|
2713
|
-
"fill": [
|
|
2714
|
-
"if",
|
|
2715
|
-
[
|
|
2716
|
-
"object/get",
|
|
2717
|
-
"@t",
|
|
2718
|
-
"passable"
|
|
2719
|
-
],
|
|
2720
|
-
"rgba(120,140,120,0.75)",
|
|
2721
|
-
"rgba(50,50,55,0.85)"
|
|
2722
|
-
],
|
|
2723
|
-
"position": {
|
|
2724
|
-
"x": [
|
|
2725
|
-
"object/get",
|
|
2726
|
-
"@t",
|
|
2727
|
-
"x"
|
|
2728
|
-
],
|
|
2729
|
-
"y": [
|
|
2730
|
-
"object/get",
|
|
2731
|
-
"@t",
|
|
2732
|
-
"y"
|
|
2733
|
-
]
|
|
2734
|
-
},
|
|
2735
|
-
"shape": "cell",
|
|
2736
|
-
"type": "draw-shape"
|
|
2737
|
-
}
|
|
2738
|
-
]
|
|
2739
|
-
],
|
|
2740
|
-
"type": "draw-shape-layer"
|
|
2741
|
-
},
|
|
2742
|
-
{
|
|
2743
|
-
"items": [
|
|
2744
|
-
"array/map",
|
|
2745
|
-
"@entity.units",
|
|
2746
|
-
[
|
|
2747
|
-
"fn",
|
|
2748
|
-
"u",
|
|
2749
|
-
{
|
|
2750
|
-
"fill": [
|
|
2751
|
-
"if",
|
|
2752
|
-
[
|
|
2753
|
-
"==",
|
|
2754
|
-
[
|
|
2755
|
-
"object/get",
|
|
2756
|
-
"@u",
|
|
2757
|
-
"team"
|
|
2758
|
-
],
|
|
2759
|
-
"player"
|
|
2760
|
-
],
|
|
2761
|
-
"#4ade80",
|
|
2762
|
-
"#f87171"
|
|
2763
|
-
],
|
|
2764
|
-
"position": [
|
|
2765
|
-
"object/get",
|
|
2766
|
-
"@u",
|
|
2767
|
-
"position"
|
|
2768
|
-
],
|
|
2769
|
-
"radiusX": 0.35,
|
|
2770
|
-
"radiusY": 0.35,
|
|
2771
|
-
"shape": "ellipse",
|
|
2772
|
-
"type": "draw-shape"
|
|
2773
|
-
}
|
|
2774
|
-
]
|
|
2775
|
-
],
|
|
2776
|
-
"type": "draw-shape-layer"
|
|
2777
|
-
}
|
|
2778
|
-
],
|
|
2779
|
-
"projection": "isometric",
|
|
2780
|
-
"showMinimap": false,
|
|
2781
|
-
"type": "canvas"
|
|
2782
|
-
},
|
|
2783
2701
|
{
|
|
2784
2702
|
"align": "center",
|
|
2785
2703
|
"children": [
|
|
@@ -3504,6 +3422,7 @@
|
|
|
3504
3422
|
"children": [
|
|
3505
3423
|
{
|
|
3506
3424
|
"camera": {
|
|
3425
|
+
"mode": "isometric",
|
|
3507
3426
|
"pos": {
|
|
3508
3427
|
"x": [
|
|
3509
3428
|
"/",
|
|
@@ -3996,89 +3915,6 @@
|
|
|
3996
3915
|
],
|
|
3997
3916
|
"type": "game-hud"
|
|
3998
3917
|
},
|
|
3999
|
-
{
|
|
4000
|
-
"camera": {
|
|
4001
|
-
"zoom": 0.08
|
|
4002
|
-
},
|
|
4003
|
-
"children": [
|
|
4004
|
-
{
|
|
4005
|
-
"items": [
|
|
4006
|
-
"array/map",
|
|
4007
|
-
"@entity.tiles",
|
|
4008
|
-
[
|
|
4009
|
-
"fn",
|
|
4010
|
-
"t",
|
|
4011
|
-
{
|
|
4012
|
-
"fill": [
|
|
4013
|
-
"if",
|
|
4014
|
-
[
|
|
4015
|
-
"object/get",
|
|
4016
|
-
"@t",
|
|
4017
|
-
"passable"
|
|
4018
|
-
],
|
|
4019
|
-
"rgba(120,140,120,0.75)",
|
|
4020
|
-
"rgba(50,50,55,0.85)"
|
|
4021
|
-
],
|
|
4022
|
-
"position": {
|
|
4023
|
-
"x": [
|
|
4024
|
-
"object/get",
|
|
4025
|
-
"@t",
|
|
4026
|
-
"x"
|
|
4027
|
-
],
|
|
4028
|
-
"y": [
|
|
4029
|
-
"object/get",
|
|
4030
|
-
"@t",
|
|
4031
|
-
"y"
|
|
4032
|
-
]
|
|
4033
|
-
},
|
|
4034
|
-
"shape": "cell",
|
|
4035
|
-
"type": "draw-shape"
|
|
4036
|
-
}
|
|
4037
|
-
]
|
|
4038
|
-
],
|
|
4039
|
-
"type": "draw-shape-layer"
|
|
4040
|
-
},
|
|
4041
|
-
{
|
|
4042
|
-
"items": [
|
|
4043
|
-
"array/map",
|
|
4044
|
-
"@entity.units",
|
|
4045
|
-
[
|
|
4046
|
-
"fn",
|
|
4047
|
-
"u",
|
|
4048
|
-
{
|
|
4049
|
-
"fill": [
|
|
4050
|
-
"if",
|
|
4051
|
-
[
|
|
4052
|
-
"==",
|
|
4053
|
-
[
|
|
4054
|
-
"object/get",
|
|
4055
|
-
"@u",
|
|
4056
|
-
"team"
|
|
4057
|
-
],
|
|
4058
|
-
"player"
|
|
4059
|
-
],
|
|
4060
|
-
"#4ade80",
|
|
4061
|
-
"#f87171"
|
|
4062
|
-
],
|
|
4063
|
-
"position": [
|
|
4064
|
-
"object/get",
|
|
4065
|
-
"@u",
|
|
4066
|
-
"position"
|
|
4067
|
-
],
|
|
4068
|
-
"radiusX": 0.35,
|
|
4069
|
-
"radiusY": 0.35,
|
|
4070
|
-
"shape": "ellipse",
|
|
4071
|
-
"type": "draw-shape"
|
|
4072
|
-
}
|
|
4073
|
-
]
|
|
4074
|
-
],
|
|
4075
|
-
"type": "draw-shape-layer"
|
|
4076
|
-
}
|
|
4077
|
-
],
|
|
4078
|
-
"projection": "isometric",
|
|
4079
|
-
"showMinimap": false,
|
|
4080
|
-
"type": "canvas"
|
|
4081
|
-
},
|
|
4082
3918
|
{
|
|
4083
3919
|
"align": "center",
|
|
4084
3920
|
"children": [
|
|
@@ -2205,6 +2205,7 @@
|
|
|
2205
2205
|
"children": [
|
|
2206
2206
|
{
|
|
2207
2207
|
"camera": {
|
|
2208
|
+
"mode": "isometric",
|
|
2208
2209
|
"pos": {
|
|
2209
2210
|
"x": [
|
|
2210
2211
|
"/",
|
|
@@ -2697,89 +2698,6 @@
|
|
|
2697
2698
|
],
|
|
2698
2699
|
"type": "game-hud"
|
|
2699
2700
|
},
|
|
2700
|
-
{
|
|
2701
|
-
"camera": {
|
|
2702
|
-
"zoom": 0.08
|
|
2703
|
-
},
|
|
2704
|
-
"children": [
|
|
2705
|
-
{
|
|
2706
|
-
"items": [
|
|
2707
|
-
"array/map",
|
|
2708
|
-
"@entity.tiles",
|
|
2709
|
-
[
|
|
2710
|
-
"fn",
|
|
2711
|
-
"t",
|
|
2712
|
-
{
|
|
2713
|
-
"fill": [
|
|
2714
|
-
"if",
|
|
2715
|
-
[
|
|
2716
|
-
"object/get",
|
|
2717
|
-
"@t",
|
|
2718
|
-
"passable"
|
|
2719
|
-
],
|
|
2720
|
-
"rgba(120,140,120,0.75)",
|
|
2721
|
-
"rgba(50,50,55,0.85)"
|
|
2722
|
-
],
|
|
2723
|
-
"position": {
|
|
2724
|
-
"x": [
|
|
2725
|
-
"object/get",
|
|
2726
|
-
"@t",
|
|
2727
|
-
"x"
|
|
2728
|
-
],
|
|
2729
|
-
"y": [
|
|
2730
|
-
"object/get",
|
|
2731
|
-
"@t",
|
|
2732
|
-
"y"
|
|
2733
|
-
]
|
|
2734
|
-
},
|
|
2735
|
-
"shape": "cell",
|
|
2736
|
-
"type": "draw-shape"
|
|
2737
|
-
}
|
|
2738
|
-
]
|
|
2739
|
-
],
|
|
2740
|
-
"type": "draw-shape-layer"
|
|
2741
|
-
},
|
|
2742
|
-
{
|
|
2743
|
-
"items": [
|
|
2744
|
-
"array/map",
|
|
2745
|
-
"@entity.units",
|
|
2746
|
-
[
|
|
2747
|
-
"fn",
|
|
2748
|
-
"u",
|
|
2749
|
-
{
|
|
2750
|
-
"fill": [
|
|
2751
|
-
"if",
|
|
2752
|
-
[
|
|
2753
|
-
"==",
|
|
2754
|
-
[
|
|
2755
|
-
"object/get",
|
|
2756
|
-
"@u",
|
|
2757
|
-
"team"
|
|
2758
|
-
],
|
|
2759
|
-
"player"
|
|
2760
|
-
],
|
|
2761
|
-
"#4ade80",
|
|
2762
|
-
"#f87171"
|
|
2763
|
-
],
|
|
2764
|
-
"position": [
|
|
2765
|
-
"object/get",
|
|
2766
|
-
"@u",
|
|
2767
|
-
"position"
|
|
2768
|
-
],
|
|
2769
|
-
"radiusX": 0.35,
|
|
2770
|
-
"radiusY": 0.35,
|
|
2771
|
-
"shape": "ellipse",
|
|
2772
|
-
"type": "draw-shape"
|
|
2773
|
-
}
|
|
2774
|
-
]
|
|
2775
|
-
],
|
|
2776
|
-
"type": "draw-shape-layer"
|
|
2777
|
-
}
|
|
2778
|
-
],
|
|
2779
|
-
"projection": "isometric",
|
|
2780
|
-
"showMinimap": false,
|
|
2781
|
-
"type": "canvas"
|
|
2782
|
-
},
|
|
2783
2701
|
{
|
|
2784
2702
|
"align": "center",
|
|
2785
2703
|
"children": [
|
|
@@ -3504,6 +3422,7 @@
|
|
|
3504
3422
|
"children": [
|
|
3505
3423
|
{
|
|
3506
3424
|
"camera": {
|
|
3425
|
+
"mode": "isometric",
|
|
3507
3426
|
"pos": {
|
|
3508
3427
|
"x": [
|
|
3509
3428
|
"/",
|
|
@@ -3996,89 +3915,6 @@
|
|
|
3996
3915
|
],
|
|
3997
3916
|
"type": "game-hud"
|
|
3998
3917
|
},
|
|
3999
|
-
{
|
|
4000
|
-
"camera": {
|
|
4001
|
-
"zoom": 0.08
|
|
4002
|
-
},
|
|
4003
|
-
"children": [
|
|
4004
|
-
{
|
|
4005
|
-
"items": [
|
|
4006
|
-
"array/map",
|
|
4007
|
-
"@entity.tiles",
|
|
4008
|
-
[
|
|
4009
|
-
"fn",
|
|
4010
|
-
"t",
|
|
4011
|
-
{
|
|
4012
|
-
"fill": [
|
|
4013
|
-
"if",
|
|
4014
|
-
[
|
|
4015
|
-
"object/get",
|
|
4016
|
-
"@t",
|
|
4017
|
-
"passable"
|
|
4018
|
-
],
|
|
4019
|
-
"rgba(120,140,120,0.75)",
|
|
4020
|
-
"rgba(50,50,55,0.85)"
|
|
4021
|
-
],
|
|
4022
|
-
"position": {
|
|
4023
|
-
"x": [
|
|
4024
|
-
"object/get",
|
|
4025
|
-
"@t",
|
|
4026
|
-
"x"
|
|
4027
|
-
],
|
|
4028
|
-
"y": [
|
|
4029
|
-
"object/get",
|
|
4030
|
-
"@t",
|
|
4031
|
-
"y"
|
|
4032
|
-
]
|
|
4033
|
-
},
|
|
4034
|
-
"shape": "cell",
|
|
4035
|
-
"type": "draw-shape"
|
|
4036
|
-
}
|
|
4037
|
-
]
|
|
4038
|
-
],
|
|
4039
|
-
"type": "draw-shape-layer"
|
|
4040
|
-
},
|
|
4041
|
-
{
|
|
4042
|
-
"items": [
|
|
4043
|
-
"array/map",
|
|
4044
|
-
"@entity.units",
|
|
4045
|
-
[
|
|
4046
|
-
"fn",
|
|
4047
|
-
"u",
|
|
4048
|
-
{
|
|
4049
|
-
"fill": [
|
|
4050
|
-
"if",
|
|
4051
|
-
[
|
|
4052
|
-
"==",
|
|
4053
|
-
[
|
|
4054
|
-
"object/get",
|
|
4055
|
-
"@u",
|
|
4056
|
-
"team"
|
|
4057
|
-
],
|
|
4058
|
-
"player"
|
|
4059
|
-
],
|
|
4060
|
-
"#4ade80",
|
|
4061
|
-
"#f87171"
|
|
4062
|
-
],
|
|
4063
|
-
"position": [
|
|
4064
|
-
"object/get",
|
|
4065
|
-
"@u",
|
|
4066
|
-
"position"
|
|
4067
|
-
],
|
|
4068
|
-
"radiusX": 0.35,
|
|
4069
|
-
"radiusY": 0.35,
|
|
4070
|
-
"shape": "ellipse",
|
|
4071
|
-
"type": "draw-shape"
|
|
4072
|
-
}
|
|
4073
|
-
]
|
|
4074
|
-
],
|
|
4075
|
-
"type": "draw-shape-layer"
|
|
4076
|
-
}
|
|
4077
|
-
],
|
|
4078
|
-
"projection": "isometric",
|
|
4079
|
-
"showMinimap": false,
|
|
4080
|
-
"type": "canvas"
|
|
4081
|
-
},
|
|
4082
3918
|
{
|
|
4083
3919
|
"align": "center",
|
|
4084
3920
|
"children": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/std",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.138.0",
|
|
4
4
|
"description": "Standard library operators for Almadar (math, string, array, etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@almadar/core": "^10.
|
|
51
|
+
"@almadar/core": "^10.28.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@almadar/eslint-plugin": "^2.14.0",
|