@blackbelt-technology/pi-dashboard-deck3d 0.9.0 → 0.11.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.
- package/.pi/skills/deck3d/SKILL.agent.md +78 -0
- package/.pi/skills/deck3d/SKILL.md +68 -0
- package/.pi/skills/deck3d/reference/effects.md +185 -2
- package/.pi/skills/deck3d/reference/ir-fields.md +26 -3
- package/.pi/skills/deck3d-from-pptx/SKILL.md +134 -0
- package/.pi/skills/deck3d-from-pptx/reference/steps.md +72 -0
- package/README.md +30 -2
- package/assets/preview/stub-chrome.png +0 -0
- package/assets/preview/stub-icon.json +59 -0
- package/assets/preview/stub-layout.json +195 -0
- package/assets/preview/stub-outline.json +48 -0
- package/dist/cli.js +11780 -5934
- package/dist/runtime.js +5916 -4007
- package/fixtures/business-2031/assets/stub-chrome.png +0 -0
- package/fixtures/business-2031/assets/stub-icon.json +59 -0
- package/fixtures/business-2031/assets/stub-layout.json +195 -0
- package/fixtures/business-2031/assets/stub-outline.json +48 -0
- package/fixtures/business-2031/build-overrides.mjs +58 -13
- package/fixtures/business-2031/deck.agent.md +60 -0
- package/fixtures/business-2031/deck.json +133 -8
- package/fixtures/business-2031/overrides.json +133 -8
- package/package.json +8 -4
- package/scripts/gen-stub-assets.ts +31 -0
- package/src/art/cutout.ts +97 -0
- package/src/art/decode.ts +169 -0
- package/src/art/icon.ts +380 -0
- package/src/art/png.ts +232 -0
- package/src/art/trace.ts +288 -0
- package/src/check/rules.ts +13 -8
- package/src/cli.ts +313 -51
- package/src/compare/index.ts +131 -0
- package/src/compare/ssim.ts +91 -0
- package/src/fx/art-geometry.ts +137 -0
- package/src/fx/art3d.meta.json +30 -0
- package/src/fx/art3d.ts +131 -0
- package/src/fx/bank.meta.json +26 -0
- package/src/fx/bank.ts +8 -0
- package/src/fx/compose.ts +5 -4
- package/src/fx/crane.meta.json +26 -0
- package/src/fx/crane.ts +8 -0
- package/src/fx/dolly.ts +5 -1
- package/src/fx/fade.ts +5 -1
- package/src/fx/flythrough.ts +5 -1
- package/src/fx/frame-chrome.meta.json +17 -0
- package/src/fx/frame-chrome.ts +134 -0
- package/src/fx/haze.meta.json +19 -0
- package/src/fx/haze.ts +91 -0
- package/src/fx/icon3d.meta.json +21 -0
- package/src/fx/icon3d.ts +167 -0
- package/src/fx/index.ts +96 -66
- package/src/fx/iris.ts +5 -1
- package/src/fx/meta.schema.json +10 -2
- package/src/fx/path.meta.json +25 -0
- package/src/fx/path.ts +8 -0
- package/src/fx/persistent.ts +11 -0
- package/src/fx/revolve.meta.json +26 -0
- package/src/fx/revolve.ts +8 -0
- package/src/fx/slide-layer.meta.json +26 -0
- package/src/fx/slide-layer.ts +557 -0
- package/src/fx/slide-space.ts +142 -0
- package/src/fx/stub-assets.ts +117 -0
- package/src/fx/swing.meta.json +26 -0
- package/src/fx/swing.ts +8 -0
- package/src/fx/types.ts +63 -2
- package/src/ir/merge.ts +5 -2
- package/src/ir/schema.json +140 -3
- package/src/ir/types.ts +54 -0
- package/src/ir/validate.ts +91 -3
- package/src/parse/harvest/index.ts +4 -1
- package/src/parse/markdown.ts +38 -7
- package/src/pptx/baseline.ts +183 -0
- package/src/pptx/extract.ts +161 -0
- package/src/pptx/fallback.ts +70 -0
- package/src/pptx/import.ts +256 -0
- package/src/pptx/master.ts +135 -0
- package/src/pptx/media.ts +81 -0
- package/src/pptx/package.ts +109 -0
- package/src/pptx/ref.ts +100 -0
- package/src/pptx/shapes.ts +276 -0
- package/src/pptx/stage.ts +82 -0
- package/src/pptx/text.ts +202 -0
- package/src/pptx/theme.ts +194 -0
- package/src/pptx/types.ts +159 -0
- package/src/pptx/xfrm.ts +93 -0
- package/src/pptx/xml.ts +106 -0
- package/src/pptx/zip.ts +239 -0
- package/src/render/assets.ts +57 -0
- package/src/render/build.ts +75 -0
- package/src/render/index.ts +7 -2
- package/src/render/template.html +1 -1
- package/src/runtime/assets.ts +75 -0
- package/src/runtime/fade.ts +110 -0
- package/src/runtime/hud.ts +37 -9
- package/src/runtime/index.ts +431 -67
- package/src/runtime/post.ts +11 -5
- package/src/runtime/scene.ts +25 -2
- package/src/runtime/transition.ts +222 -0
- package/src/runtime/types.ts +13 -2
- package/src/serve/index.ts +199 -16
- package/src/util/cleanup.ts +13 -0
- package/src/util/confine.ts +15 -0
- package/src/variants/pick.ts +282 -0
- package/src/variants/render.ts +179 -0
- package/src/variants/schema.json +48 -0
- package/src/variants/style.ts +318 -0
|
@@ -3167,7 +3167,8 @@
|
|
|
3167
3167
|
80
|
|
3168
3168
|
]
|
|
3169
3169
|
}
|
|
3170
|
-
}
|
|
3170
|
+
},
|
|
3171
|
+
"transition": "fade"
|
|
3171
3172
|
},
|
|
3172
3173
|
"agentgap": {
|
|
3173
3174
|
"camera": {
|
|
@@ -3782,6 +3783,14 @@
|
|
|
3782
3783
|
},
|
|
3783
3784
|
{
|
|
3784
3785
|
"id": "trail"
|
|
3786
|
+
},
|
|
3787
|
+
{
|
|
3788
|
+
"id": "slide-layer",
|
|
3789
|
+
"params": {
|
|
3790
|
+
"layout": "stub-layout",
|
|
3791
|
+
"slide": "s01",
|
|
3792
|
+
"mode": "free"
|
|
3793
|
+
}
|
|
3785
3794
|
}
|
|
3786
3795
|
],
|
|
3787
3796
|
"diagram": {
|
|
@@ -3817,6 +3826,16 @@
|
|
|
3817
3826
|
},
|
|
3818
3827
|
{
|
|
3819
3828
|
"id": "orbit"
|
|
3829
|
+
},
|
|
3830
|
+
{
|
|
3831
|
+
"id": "icon3d",
|
|
3832
|
+
"params": {
|
|
3833
|
+
"asset": "stub-icon",
|
|
3834
|
+
"layout": "stub-layout",
|
|
3835
|
+
"slide": "s01",
|
|
3836
|
+
"item": "s01-i005",
|
|
3837
|
+
"card": true
|
|
3838
|
+
}
|
|
3820
3839
|
}
|
|
3821
3840
|
],
|
|
3822
3841
|
"diagram": {
|
|
@@ -3846,6 +3865,18 @@
|
|
|
3846
3865
|
},
|
|
3847
3866
|
{
|
|
3848
3867
|
"id": "sao"
|
|
3868
|
+
},
|
|
3869
|
+
{
|
|
3870
|
+
"id": "art3d",
|
|
3871
|
+
"params": {
|
|
3872
|
+
"outline": "stub-outline",
|
|
3873
|
+
"scale": 1.6,
|
|
3874
|
+
"x": 4.5,
|
|
3875
|
+
"y": 2.2,
|
|
3876
|
+
"z": 1.2,
|
|
3877
|
+
"sway": 0.3,
|
|
3878
|
+
"sweep": true
|
|
3879
|
+
}
|
|
3849
3880
|
}
|
|
3850
3881
|
],
|
|
3851
3882
|
"diagram": {
|
|
@@ -3881,6 +3912,9 @@
|
|
|
3881
3912
|
},
|
|
3882
3913
|
{
|
|
3883
3914
|
"id": "volumetric-spot"
|
|
3915
|
+
},
|
|
3916
|
+
{
|
|
3917
|
+
"id": "haze"
|
|
3884
3918
|
}
|
|
3885
3919
|
],
|
|
3886
3920
|
"diagram": {
|
|
@@ -4009,7 +4043,8 @@
|
|
|
4009
4043
|
"Renewal"
|
|
4010
4044
|
]
|
|
4011
4045
|
}
|
|
4012
|
-
}
|
|
4046
|
+
},
|
|
4047
|
+
"transition": "iris"
|
|
4013
4048
|
},
|
|
4014
4049
|
"support": {
|
|
4015
4050
|
"camera": {
|
|
@@ -4073,7 +4108,8 @@
|
|
|
4073
4108
|
85
|
|
4074
4109
|
]
|
|
4075
4110
|
}
|
|
4076
|
-
}
|
|
4111
|
+
},
|
|
4112
|
+
"transition": "flythrough"
|
|
4077
4113
|
},
|
|
4078
4114
|
"partners": {
|
|
4079
4115
|
"camera": {
|
|
@@ -4087,6 +4123,9 @@
|
|
|
4087
4123
|
"effects": [
|
|
4088
4124
|
{
|
|
4089
4125
|
"id": "starfield"
|
|
4126
|
+
},
|
|
4127
|
+
{
|
|
4128
|
+
"id": "swing"
|
|
4090
4129
|
}
|
|
4091
4130
|
],
|
|
4092
4131
|
"diagram": {
|
|
@@ -4099,7 +4138,8 @@
|
|
|
4099
4138
|
"Evidence"
|
|
4100
4139
|
]
|
|
4101
4140
|
}
|
|
4102
|
-
}
|
|
4141
|
+
},
|
|
4142
|
+
"transition": "swing"
|
|
4103
4143
|
},
|
|
4104
4144
|
"smb": {
|
|
4105
4145
|
"camera": {
|
|
@@ -4116,6 +4156,9 @@
|
|
|
4116
4156
|
},
|
|
4117
4157
|
{
|
|
4118
4158
|
"id": "pixelate"
|
|
4159
|
+
},
|
|
4160
|
+
{
|
|
4161
|
+
"id": "path"
|
|
4119
4162
|
}
|
|
4120
4163
|
],
|
|
4121
4164
|
"diagram": {
|
|
@@ -4128,6 +4171,32 @@
|
|
|
4128
4171
|
"Self-serve"
|
|
4129
4172
|
]
|
|
4130
4173
|
}
|
|
4174
|
+
},
|
|
4175
|
+
"transition": "path",
|
|
4176
|
+
"cameraPath": {
|
|
4177
|
+
"ease": "inOut",
|
|
4178
|
+
"keys": [
|
|
4179
|
+
{
|
|
4180
|
+
"t": 0.3,
|
|
4181
|
+
"offset": [
|
|
4182
|
+
0.15,
|
|
4183
|
+
0.2,
|
|
4184
|
+
0
|
|
4185
|
+
],
|
|
4186
|
+
"look": 0.2,
|
|
4187
|
+
"roll": 6
|
|
4188
|
+
},
|
|
4189
|
+
{
|
|
4190
|
+
"t": 0.65,
|
|
4191
|
+
"offset": [
|
|
4192
|
+
-0.1,
|
|
4193
|
+
0.12,
|
|
4194
|
+
0.05
|
|
4195
|
+
],
|
|
4196
|
+
"look": 0.9,
|
|
4197
|
+
"fov": 50
|
|
4198
|
+
}
|
|
4199
|
+
]
|
|
4131
4200
|
}
|
|
4132
4201
|
},
|
|
4133
4202
|
"metrics": {
|
|
@@ -4142,6 +4211,9 @@
|
|
|
4142
4211
|
"effects": [
|
|
4143
4212
|
{
|
|
4144
4213
|
"id": "volume-perlin"
|
|
4214
|
+
},
|
|
4215
|
+
{
|
|
4216
|
+
"id": "revolve"
|
|
4145
4217
|
}
|
|
4146
4218
|
],
|
|
4147
4219
|
"diagram": {
|
|
@@ -4154,7 +4226,8 @@
|
|
|
4154
4226
|
"Stop test"
|
|
4155
4227
|
]
|
|
4156
4228
|
}
|
|
4157
|
-
}
|
|
4229
|
+
},
|
|
4230
|
+
"transition": "revolve"
|
|
4158
4231
|
},
|
|
4159
4232
|
"risks": {
|
|
4160
4233
|
"camera": {
|
|
@@ -4168,6 +4241,9 @@
|
|
|
4168
4241
|
"effects": [
|
|
4169
4242
|
{
|
|
4170
4243
|
"id": "aurora"
|
|
4244
|
+
},
|
|
4245
|
+
{
|
|
4246
|
+
"id": "crane"
|
|
4171
4247
|
}
|
|
4172
4248
|
],
|
|
4173
4249
|
"diagram": {
|
|
@@ -4180,7 +4256,8 @@
|
|
|
4180
4256
|
"Trust"
|
|
4181
4257
|
]
|
|
4182
4258
|
}
|
|
4183
|
-
}
|
|
4259
|
+
},
|
|
4260
|
+
"transition": "crane"
|
|
4184
4261
|
},
|
|
4185
4262
|
"close": {
|
|
4186
4263
|
"camera": {
|
|
@@ -4194,6 +4271,9 @@
|
|
|
4194
4271
|
"effects": [
|
|
4195
4272
|
{
|
|
4196
4273
|
"id": "horizon-gates"
|
|
4274
|
+
},
|
|
4275
|
+
{
|
|
4276
|
+
"id": "bank"
|
|
4197
4277
|
}
|
|
4198
4278
|
],
|
|
4199
4279
|
"diagram": {
|
|
@@ -4206,7 +4286,8 @@
|
|
|
4206
4286
|
"One account"
|
|
4207
4287
|
]
|
|
4208
4288
|
}
|
|
4209
|
-
}
|
|
4289
|
+
},
|
|
4290
|
+
"transition": "bank"
|
|
4210
4291
|
}
|
|
4211
4292
|
},
|
|
4212
4293
|
"deck": {
|
|
@@ -4215,6 +4296,50 @@
|
|
|
4215
4296
|
"rail": "tunnel",
|
|
4216
4297
|
"titleEdge": "contrast"
|
|
4217
4298
|
},
|
|
4218
|
-
"effects": [
|
|
4299
|
+
"effects": [
|
|
4300
|
+
{
|
|
4301
|
+
"id": "frame-chrome",
|
|
4302
|
+
"params": {
|
|
4303
|
+
"layers": [
|
|
4304
|
+
{
|
|
4305
|
+
"asset": "stub-chrome",
|
|
4306
|
+
"anchor": "tl",
|
|
4307
|
+
"size": 0.2
|
|
4308
|
+
},
|
|
4309
|
+
{
|
|
4310
|
+
"asset": "stub-chrome",
|
|
4311
|
+
"anchor": "br",
|
|
4312
|
+
"size": 0.2
|
|
4313
|
+
}
|
|
4314
|
+
]
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
],
|
|
4318
|
+
"assets": [
|
|
4319
|
+
{
|
|
4320
|
+
"id": "stub-chrome",
|
|
4321
|
+
"path": "assets/stub-chrome.png",
|
|
4322
|
+
"sha256": "18e31b20ccff3e15d4a4f14a6919eb66b3a36633767d020979b96f1fcd120f70",
|
|
4323
|
+
"mime": "image/png"
|
|
4324
|
+
},
|
|
4325
|
+
{
|
|
4326
|
+
"id": "stub-icon",
|
|
4327
|
+
"path": "assets/stub-icon.json",
|
|
4328
|
+
"sha256": "a786d8b3958bb5b7bf6356c92912851e07194681f6eb635652e4c8f473c2b160",
|
|
4329
|
+
"mime": "application/json"
|
|
4330
|
+
},
|
|
4331
|
+
{
|
|
4332
|
+
"id": "stub-layout",
|
|
4333
|
+
"path": "assets/stub-layout.json",
|
|
4334
|
+
"sha256": "a37d0f9cb722c7d7741d96cc9a24e5b1392b2eccde2bca9002546aa3f3375f74",
|
|
4335
|
+
"mime": "application/json"
|
|
4336
|
+
},
|
|
4337
|
+
{
|
|
4338
|
+
"id": "stub-outline",
|
|
4339
|
+
"path": "assets/stub-outline.json",
|
|
4340
|
+
"sha256": "d9590f9a1d9dd462416cee0b6d61250d4dbfa7b43eb71b2ae11ed76f9a405615",
|
|
4341
|
+
"mime": "application/json"
|
|
4342
|
+
}
|
|
4343
|
+
]
|
|
4219
4344
|
}
|
|
4220
4345
|
}
|
|
@@ -5,7 +5,51 @@
|
|
|
5
5
|
"rail": "tunnel",
|
|
6
6
|
"titleEdge": "contrast"
|
|
7
7
|
},
|
|
8
|
-
"effects": [
|
|
8
|
+
"effects": [
|
|
9
|
+
{
|
|
10
|
+
"id": "frame-chrome",
|
|
11
|
+
"params": {
|
|
12
|
+
"layers": [
|
|
13
|
+
{
|
|
14
|
+
"asset": "stub-chrome",
|
|
15
|
+
"anchor": "tl",
|
|
16
|
+
"size": 0.2
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"asset": "stub-chrome",
|
|
20
|
+
"anchor": "br",
|
|
21
|
+
"size": 0.2
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"assets": [
|
|
28
|
+
{
|
|
29
|
+
"id": "stub-chrome",
|
|
30
|
+
"path": "assets/stub-chrome.png",
|
|
31
|
+
"sha256": "18e31b20ccff3e15d4a4f14a6919eb66b3a36633767d020979b96f1fcd120f70",
|
|
32
|
+
"mime": "image/png"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "stub-icon",
|
|
36
|
+
"path": "assets/stub-icon.json",
|
|
37
|
+
"sha256": "a786d8b3958bb5b7bf6356c92912851e07194681f6eb635652e4c8f473c2b160",
|
|
38
|
+
"mime": "application/json"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "stub-layout",
|
|
42
|
+
"path": "assets/stub-layout.json",
|
|
43
|
+
"sha256": "a37d0f9cb722c7d7741d96cc9a24e5b1392b2eccde2bca9002546aa3f3375f74",
|
|
44
|
+
"mime": "application/json"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "stub-outline",
|
|
48
|
+
"path": "assets/stub-outline.json",
|
|
49
|
+
"sha256": "d9590f9a1d9dd462416cee0b6d61250d4dbfa7b43eb71b2ae11ed76f9a405615",
|
|
50
|
+
"mime": "application/json"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
9
53
|
"slides": {
|
|
10
54
|
"how-business-changes-by-2031": {
|
|
11
55
|
"effects": [
|
|
@@ -139,7 +183,8 @@
|
|
|
139
183
|
80
|
|
140
184
|
]
|
|
141
185
|
}
|
|
142
|
-
}
|
|
186
|
+
},
|
|
187
|
+
"transition": "fade"
|
|
143
188
|
},
|
|
144
189
|
"agentgap": {
|
|
145
190
|
"effects": [
|
|
@@ -585,6 +630,14 @@
|
|
|
585
630
|
},
|
|
586
631
|
{
|
|
587
632
|
"id": "trail"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"id": "slide-layer",
|
|
636
|
+
"params": {
|
|
637
|
+
"layout": "stub-layout",
|
|
638
|
+
"slide": "s01",
|
|
639
|
+
"mode": "free"
|
|
640
|
+
}
|
|
588
641
|
}
|
|
589
642
|
],
|
|
590
643
|
"diagram": {
|
|
@@ -612,6 +665,16 @@
|
|
|
612
665
|
},
|
|
613
666
|
{
|
|
614
667
|
"id": "orbit"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"id": "icon3d",
|
|
671
|
+
"params": {
|
|
672
|
+
"asset": "stub-icon",
|
|
673
|
+
"layout": "stub-layout",
|
|
674
|
+
"slide": "s01",
|
|
675
|
+
"item": "s01-i005",
|
|
676
|
+
"card": true
|
|
677
|
+
}
|
|
615
678
|
}
|
|
616
679
|
],
|
|
617
680
|
"diagram": {
|
|
@@ -633,6 +696,18 @@
|
|
|
633
696
|
},
|
|
634
697
|
{
|
|
635
698
|
"id": "sao"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"id": "art3d",
|
|
702
|
+
"params": {
|
|
703
|
+
"outline": "stub-outline",
|
|
704
|
+
"scale": 1.6,
|
|
705
|
+
"x": 4.5,
|
|
706
|
+
"y": 2.2,
|
|
707
|
+
"z": 1.2,
|
|
708
|
+
"sway": 0.3,
|
|
709
|
+
"sweep": true
|
|
710
|
+
}
|
|
636
711
|
}
|
|
637
712
|
],
|
|
638
713
|
"diagram": {
|
|
@@ -660,6 +735,9 @@
|
|
|
660
735
|
},
|
|
661
736
|
{
|
|
662
737
|
"id": "volumetric-spot"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"id": "haze"
|
|
663
741
|
}
|
|
664
742
|
],
|
|
665
743
|
"diagram": {
|
|
@@ -756,7 +834,8 @@
|
|
|
756
834
|
"Renewal"
|
|
757
835
|
]
|
|
758
836
|
}
|
|
759
|
-
}
|
|
837
|
+
},
|
|
838
|
+
"transition": "iris"
|
|
760
839
|
},
|
|
761
840
|
"support": {
|
|
762
841
|
"effects": [
|
|
@@ -804,12 +883,16 @@
|
|
|
804
883
|
85
|
|
805
884
|
]
|
|
806
885
|
}
|
|
807
|
-
}
|
|
886
|
+
},
|
|
887
|
+
"transition": "flythrough"
|
|
808
888
|
},
|
|
809
889
|
"partners": {
|
|
810
890
|
"effects": [
|
|
811
891
|
{
|
|
812
892
|
"id": "starfield"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"id": "swing"
|
|
813
896
|
}
|
|
814
897
|
],
|
|
815
898
|
"diagram": {
|
|
@@ -822,7 +905,8 @@
|
|
|
822
905
|
"Evidence"
|
|
823
906
|
]
|
|
824
907
|
}
|
|
825
|
-
}
|
|
908
|
+
},
|
|
909
|
+
"transition": "swing"
|
|
826
910
|
},
|
|
827
911
|
"smb": {
|
|
828
912
|
"effects": [
|
|
@@ -831,6 +915,9 @@
|
|
|
831
915
|
},
|
|
832
916
|
{
|
|
833
917
|
"id": "pixelate"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"id": "path"
|
|
834
921
|
}
|
|
835
922
|
],
|
|
836
923
|
"diagram": {
|
|
@@ -843,12 +930,41 @@
|
|
|
843
930
|
"Self-serve"
|
|
844
931
|
]
|
|
845
932
|
}
|
|
933
|
+
},
|
|
934
|
+
"transition": "path",
|
|
935
|
+
"cameraPath": {
|
|
936
|
+
"ease": "inOut",
|
|
937
|
+
"keys": [
|
|
938
|
+
{
|
|
939
|
+
"t": 0.3,
|
|
940
|
+
"offset": [
|
|
941
|
+
0.15,
|
|
942
|
+
0.2,
|
|
943
|
+
0
|
|
944
|
+
],
|
|
945
|
+
"look": 0.2,
|
|
946
|
+
"roll": 6
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"t": 0.65,
|
|
950
|
+
"offset": [
|
|
951
|
+
-0.1,
|
|
952
|
+
0.12,
|
|
953
|
+
0.05
|
|
954
|
+
],
|
|
955
|
+
"look": 0.9,
|
|
956
|
+
"fov": 50
|
|
957
|
+
}
|
|
958
|
+
]
|
|
846
959
|
}
|
|
847
960
|
},
|
|
848
961
|
"metrics": {
|
|
849
962
|
"effects": [
|
|
850
963
|
{
|
|
851
964
|
"id": "volume-perlin"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"id": "revolve"
|
|
852
968
|
}
|
|
853
969
|
],
|
|
854
970
|
"diagram": {
|
|
@@ -861,12 +977,16 @@
|
|
|
861
977
|
"Stop test"
|
|
862
978
|
]
|
|
863
979
|
}
|
|
864
|
-
}
|
|
980
|
+
},
|
|
981
|
+
"transition": "revolve"
|
|
865
982
|
},
|
|
866
983
|
"risks": {
|
|
867
984
|
"effects": [
|
|
868
985
|
{
|
|
869
986
|
"id": "aurora"
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
"id": "crane"
|
|
870
990
|
}
|
|
871
991
|
],
|
|
872
992
|
"diagram": {
|
|
@@ -879,12 +999,16 @@
|
|
|
879
999
|
"Trust"
|
|
880
1000
|
]
|
|
881
1001
|
}
|
|
882
|
-
}
|
|
1002
|
+
},
|
|
1003
|
+
"transition": "crane"
|
|
883
1004
|
},
|
|
884
1005
|
"close": {
|
|
885
1006
|
"effects": [
|
|
886
1007
|
{
|
|
887
1008
|
"id": "horizon-gates"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"id": "bank"
|
|
888
1012
|
}
|
|
889
1013
|
],
|
|
890
1014
|
"diagram": {
|
|
@@ -897,7 +1021,8 @@
|
|
|
897
1021
|
"One account"
|
|
898
1022
|
]
|
|
899
1023
|
}
|
|
900
|
-
}
|
|
1024
|
+
},
|
|
1025
|
+
"transition": "bank"
|
|
901
1026
|
}
|
|
902
1027
|
}
|
|
903
1028
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackbelt-technology/pi-dashboard-deck3d",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Deterministic Markdown → self-contained 3D presentation engine: Deck IR, mermaid harvest in headless chromium, three.js runtime, effects corpus and props. Exposed as the deck3d CLI and the deck3d pi skill.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
],
|
|
24
24
|
"pi": {
|
|
25
25
|
"skills": [
|
|
26
|
-
".pi/skills/deck3d"
|
|
26
|
+
".pi/skills/deck3d",
|
|
27
|
+
".pi/skills/deck3d-from-pptx"
|
|
27
28
|
]
|
|
28
29
|
},
|
|
29
30
|
"exports": {
|
|
@@ -53,19 +54,22 @@
|
|
|
53
54
|
"build:cli": "node scripts/build-cli.mjs",
|
|
54
55
|
"gen:ir-fields": "tsx scripts/gen-ir-fields.ts",
|
|
55
56
|
"gen:effects": "tsx scripts/gen-effects.ts",
|
|
57
|
+
"gen:stub-assets": "tsx scripts/gen-stub-assets.ts",
|
|
56
58
|
"build": "npm run build:harvest && npm run build:runtime && npm run build:cli && npm run gen:ir-fields && npm run gen:effects",
|
|
57
59
|
"prepublishOnly": "npm run build"
|
|
58
60
|
},
|
|
59
61
|
"dependencies": {
|
|
60
62
|
"ajv": "^8.17.1",
|
|
61
63
|
"esbuild": "^0.28.2",
|
|
64
|
+
"fast-xml-parser": "^5.11.2",
|
|
65
|
+
"fflate": "^0.8.3",
|
|
62
66
|
"mermaid": "11.17.2",
|
|
63
67
|
"opentype.js": "^1.3.4",
|
|
64
68
|
"playwright": "^1.62.1",
|
|
65
69
|
"three": "0.160.0"
|
|
66
70
|
},
|
|
67
71
|
"peerDependencies": {
|
|
68
|
-
"@earendil-works/pi-coding-agent": ">=1.
|
|
72
|
+
"@earendil-works/pi-coding-agent": ">=1.3.0"
|
|
69
73
|
},
|
|
70
74
|
"peerDependenciesMeta": {
|
|
71
75
|
"@earendil-works/pi-coding-agent": {
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
}
|
|
74
78
|
},
|
|
75
79
|
"devDependencies": {
|
|
76
|
-
"@earendil-works/pi-coding-agent": "^1.
|
|
80
|
+
"@earendil-works/pi-coding-agent": "^1.3.0",
|
|
77
81
|
"@types/opentype.js": "^1.3.8",
|
|
78
82
|
"@types/three": "^0.160.0",
|
|
79
83
|
"tsx": "^4.21.0",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes the stub asset bundle to `assets/preview/` and
|
|
3
|
+
* `fixtures/business-2031/assets/` (see `src/fx/stub-assets.ts`).
|
|
4
|
+
* `--check` fails when a committed copy drifted. Run by `npm run gen:stub-assets`.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { dirname, join } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { stubFiles } from "../src/fx/stub-assets.js";
|
|
10
|
+
|
|
11
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
12
|
+
const dirs = [join(root, "assets", "preview"), join(root, "fixtures", "business-2031", "assets")];
|
|
13
|
+
const check = process.argv.includes("--check");
|
|
14
|
+
let stale = 0;
|
|
15
|
+
for (const dir of dirs) {
|
|
16
|
+
mkdirSync(dir, { recursive: true });
|
|
17
|
+
for (const [name, data] of Object.entries(stubFiles())) {
|
|
18
|
+
const path = join(dir, name);
|
|
19
|
+
const bytes = typeof data === "string" ? Buffer.from(data) : Buffer.from(data);
|
|
20
|
+
if (check) {
|
|
21
|
+
if (!existsSync(path) || !readFileSync(path).equals(bytes)) {
|
|
22
|
+
console.error(`stale: ${path}`);
|
|
23
|
+
stale++;
|
|
24
|
+
}
|
|
25
|
+
} else writeFileSync(path, bytes);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (check) {
|
|
29
|
+
if (stale) process.exit(1);
|
|
30
|
+
console.log("stub assets up to date");
|
|
31
|
+
} else console.log(`wrote stub assets to ${dirs.join(", ")}`);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `art cutout` (spec deck3d-art-tooling): colour-to-alpha against `--bg`
|
|
3
|
+
* (GIMP-style: each pixel's alpha is the least opacity that reproduces it
|
|
4
|
+
* over the background, and its colour is un-blended accordingly), optional
|
|
5
|
+
* split into one image per 8-connected opaque region with a source-pixel
|
|
6
|
+
* bounding-box index, and an optional `--max` downscale of each output.
|
|
7
|
+
*/
|
|
8
|
+
import { cropRgba, type RgbaImage, resizeRgba } from "./png.js";
|
|
9
|
+
import { parseHex } from "./trace.js";
|
|
10
|
+
|
|
11
|
+
export function colorToAlpha(img: RgbaImage, bgHex: string): RgbaImage {
|
|
12
|
+
const bg = parseHex(bgHex);
|
|
13
|
+
const out = new Uint8Array(img.data.length);
|
|
14
|
+
for (let i = 0; i < img.data.length; i += 4) {
|
|
15
|
+
let a = 0;
|
|
16
|
+
for (let c = 0; c < 3; c++) {
|
|
17
|
+
const v = img.data[i + c];
|
|
18
|
+
const b = bg[c];
|
|
19
|
+
const ac = v > b ? (v - b) / (255 - b || 1) : v < b ? (b - v) / (b || 1) : 0;
|
|
20
|
+
a = Math.max(a, ac);
|
|
21
|
+
}
|
|
22
|
+
const srcA = img.data[i + 3] / 255;
|
|
23
|
+
for (let c = 0; c < 3; c++) {
|
|
24
|
+
const v = img.data[i + c];
|
|
25
|
+
out[i + c] = a > 0 ? Math.round(Math.min(255, Math.max(0, (v - bg[c]) / a + bg[c]))) : 0;
|
|
26
|
+
}
|
|
27
|
+
out[i + 3] = Math.round(a * srcA * 255);
|
|
28
|
+
}
|
|
29
|
+
return { width: img.width, height: img.height, data: out };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Region {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
w: number;
|
|
36
|
+
h: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** 8-connected regions of pixels with alpha above `threshold`, scan order; tiny ones dropped. */
|
|
40
|
+
export function opaqueRegions(img: RgbaImage, threshold = 8, minArea = 16): Region[] {
|
|
41
|
+
const { width, height, data } = img;
|
|
42
|
+
const seen = new Uint8Array(width * height);
|
|
43
|
+
const out: Region[] = [];
|
|
44
|
+
const stack: number[] = [];
|
|
45
|
+
for (let s = 0; s < width * height; s++) {
|
|
46
|
+
if (seen[s] || data[s * 4 + 3] <= threshold) continue;
|
|
47
|
+
let minX = width;
|
|
48
|
+
let minY = height;
|
|
49
|
+
let maxX = -1;
|
|
50
|
+
let maxY = -1;
|
|
51
|
+
let count = 0;
|
|
52
|
+
seen[s] = 1;
|
|
53
|
+
stack.push(s);
|
|
54
|
+
while (stack.length) {
|
|
55
|
+
const p = stack.pop() as number;
|
|
56
|
+
const x = p % width;
|
|
57
|
+
const y = (p / width) | 0;
|
|
58
|
+
count++;
|
|
59
|
+
minX = Math.min(minX, x);
|
|
60
|
+
maxX = Math.max(maxX, x);
|
|
61
|
+
minY = Math.min(minY, y);
|
|
62
|
+
maxY = Math.max(maxY, y);
|
|
63
|
+
for (let dy = -1; dy <= 1; dy++) {
|
|
64
|
+
for (let dx = -1; dx <= 1; dx++) {
|
|
65
|
+
const nx = x + dx;
|
|
66
|
+
const ny = y + dy;
|
|
67
|
+
if (nx < 0 || ny < 0 || nx >= width || ny >= height) continue;
|
|
68
|
+
const q = ny * width + nx;
|
|
69
|
+
if (!seen[q] && data[q * 4 + 3] > threshold) {
|
|
70
|
+
seen[q] = 1;
|
|
71
|
+
stack.push(q);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (count >= minArea) out.push({ x: minX, y: minY, w: maxX - minX + 1, h: maxY - minY + 1 });
|
|
77
|
+
}
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Downscale so the longest side is at most `max` (never upscales). */
|
|
82
|
+
export function fitMax(img: RgbaImage, max: number | undefined): RgbaImage {
|
|
83
|
+
if (!max || Math.max(img.width, img.height) <= max) return img;
|
|
84
|
+
const k = max / Math.max(img.width, img.height);
|
|
85
|
+
return resizeRgba(img, img.width * k, img.height * k);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface CutoutPiece {
|
|
89
|
+
region: Region;
|
|
90
|
+
image: RgbaImage;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function cutout(img: RgbaImage, bgHex: string, opts: { split?: boolean; max?: number } = {}): CutoutPiece[] {
|
|
94
|
+
const alpha = colorToAlpha(img, bgHex);
|
|
95
|
+
if (!opts.split) return [{ region: { x: 0, y: 0, w: img.width, h: img.height }, image: fitMax(alpha, opts.max) }];
|
|
96
|
+
return opaqueRegions(alpha).map((r) => ({ region: r, image: fitMax(cropRgba(alpha, r.x, r.y, r.w, r.h), opts.max) }));
|
|
97
|
+
}
|