@womp/spark-agent 6.5.0 → 8.0.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/CHANGELOG.md +86 -0
- package/README.md +7 -4
- package/dist/agent.d.ts +3 -6
- package/dist/agent.js +41 -23
- package/dist/capabilities/geometry.d.ts +17 -5
- package/dist/capabilities/geometry.js +11 -12
- package/dist/compaction.d.ts +41 -8
- package/dist/compaction.js +241 -77
- package/dist/context-window.d.ts +23 -0
- package/dist/context-window.js +141 -0
- package/dist/generated/geometry-declarations.d.ts +1 -1
- package/dist/generated/geometry-declarations.js +1 -1
- package/dist/geometry/backendRegistry.d.ts +1 -0
- package/dist/geometry/common.d.ts +5 -2
- package/dist/geometry/common.js +18 -3
- package/dist/geometry/compiler.js +2 -2
- package/dist/geometry/diagnostics.d.ts +2 -7
- package/dist/geometry/diagnostics.js +3 -51
- package/dist/geometry/graph.d.ts +1 -1
- package/dist/geometry/graph.js +1 -0
- package/dist/geometry/index.d.ts +0 -1
- package/dist/geometry/index.js +0 -3
- package/dist/geometry/lift.js +105 -113
- package/dist/geometry/lower.js +29 -49
- package/dist/geometry/schemas/flowir-dialect.json +117 -117
- package/dist/geometry/writeParamData.js +4 -4
- package/dist/geometry.d.ts +2 -5
- package/dist/geometry.js +7 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/intent-bench.js +1 -1
- package/dist/sdk-geometry-host.d.ts +1 -1
- package/dist/sdk-geometry-host.js +253 -251
- package/dist/ui.d.ts +7 -0
- package/dist/ui.js +1 -0
- package/dist/womp-scene-api.d.ts +9 -1
- package/dist/womp-scene-api.js +41 -32
- package/package.json +2 -2
- package/dist/context-budget.d.ts +0 -65
- package/dist/context-budget.js +0 -364
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
"Float",
|
|
5
5
|
"Bool",
|
|
6
6
|
"Vec3",
|
|
7
|
-
"Geometry"
|
|
8
|
-
"Int[]",
|
|
9
|
-
"Float[]",
|
|
10
|
-
"Vec3[]"
|
|
7
|
+
"Geometry"
|
|
11
8
|
],
|
|
12
9
|
"enums": [
|
|
13
10
|
{
|
|
@@ -117,6 +114,16 @@
|
|
|
117
114
|
"to": "Vec3[]",
|
|
118
115
|
"desc": "wrap: v -> [v]"
|
|
119
116
|
},
|
|
117
|
+
{
|
|
118
|
+
"from": "Float",
|
|
119
|
+
"to": "Float[]",
|
|
120
|
+
"desc": "wrap: x -> [x]"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"from": "Int",
|
|
124
|
+
"to": "Float[]",
|
|
125
|
+
"desc": "promote then wrap: x -> [x]"
|
|
126
|
+
},
|
|
120
127
|
{
|
|
121
128
|
"from": "Float[]",
|
|
122
129
|
"to": "Vec3[]",
|
|
@@ -127,6 +134,11 @@
|
|
|
127
134
|
"to": "Float[]",
|
|
128
135
|
"desc": "extract X: [Vec3(a,b,c)] -> [a]"
|
|
129
136
|
},
|
|
137
|
+
{
|
|
138
|
+
"from": "Float[]",
|
|
139
|
+
"to": "Vec3",
|
|
140
|
+
"desc": "take first element, then splat"
|
|
141
|
+
},
|
|
130
142
|
{
|
|
131
143
|
"from": "Vec3[]",
|
|
132
144
|
"to": "Vec3",
|
|
@@ -158,6 +170,16 @@
|
|
|
158
170
|
"desc": "promote each"
|
|
159
171
|
}
|
|
160
172
|
],
|
|
173
|
+
"param": [
|
|
174
|
+
"Int",
|
|
175
|
+
"Float",
|
|
176
|
+
"Vec3"
|
|
177
|
+
],
|
|
178
|
+
"const": [
|
|
179
|
+
"Int",
|
|
180
|
+
"Float",
|
|
181
|
+
"Vec3"
|
|
182
|
+
],
|
|
161
183
|
"nodes": [
|
|
162
184
|
{
|
|
163
185
|
"name": "Primitive",
|
|
@@ -165,17 +187,17 @@
|
|
|
165
187
|
"inputs": [
|
|
166
188
|
{
|
|
167
189
|
"name": "Type",
|
|
168
|
-
"type": "PrimitiveType"
|
|
169
|
-
"enum": "PrimitiveType"
|
|
190
|
+
"type": "PrimitiveType"
|
|
170
191
|
},
|
|
171
192
|
{
|
|
172
193
|
"name": "Position",
|
|
173
194
|
"type": "Vec3",
|
|
174
|
-
"desc": "center in world space"
|
|
195
|
+
"desc": "center in world space; y is up"
|
|
175
196
|
},
|
|
176
197
|
{
|
|
177
198
|
"name": "Rotation",
|
|
178
|
-
"type": "Vec3"
|
|
199
|
+
"type": "Vec3",
|
|
200
|
+
"desc": "degrees about X, Y and Z"
|
|
179
201
|
},
|
|
180
202
|
{
|
|
181
203
|
"name": "Size",
|
|
@@ -224,18 +246,22 @@
|
|
|
224
246
|
},
|
|
225
247
|
{
|
|
226
248
|
"name": "Positions",
|
|
227
|
-
"type": "Vec3[]"
|
|
228
|
-
"lift": "len1"
|
|
249
|
+
"type": "Vec3[]"
|
|
229
250
|
},
|
|
230
251
|
{
|
|
231
252
|
"name": "Rotations",
|
|
232
253
|
"type": "Vec3[]",
|
|
233
|
-
"
|
|
254
|
+
"desc": [
|
|
255
|
+
"Left out, every instance keeps its original rotation.",
|
|
256
|
+
"Degrees about X, Y and Z; a Float or Float[] splats onto all three axes, so use CombineXYZ to turn about one axis."
|
|
257
|
+
],
|
|
258
|
+
"optional": true
|
|
234
259
|
},
|
|
235
260
|
{
|
|
236
261
|
"name": "Scales",
|
|
237
262
|
"type": "Vec3[]",
|
|
238
|
-
"
|
|
263
|
+
"desc": "Left out, every instance keeps its original size.",
|
|
264
|
+
"optional": true
|
|
239
265
|
}
|
|
240
266
|
],
|
|
241
267
|
"outputs": [
|
|
@@ -244,10 +270,9 @@
|
|
|
244
270
|
"type": "Geometry"
|
|
245
271
|
}
|
|
246
272
|
],
|
|
247
|
-
"
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
"Emit one instance per index."
|
|
273
|
+
"desc": [
|
|
274
|
+
"One copy per element of the longest of Positions, Rotations and Scales, and at least one; past the end of an input, its first value is used.",
|
|
275
|
+
"Copy i is the input geometry scaled by Scales[i], rotated by Rotations[i] about the origin, then moved by Positions[i]; the input's own position stays inside each copy, so build the input at the origin."
|
|
251
276
|
]
|
|
252
277
|
},
|
|
253
278
|
{
|
|
@@ -257,7 +282,6 @@
|
|
|
257
282
|
{
|
|
258
283
|
"name": "Operation",
|
|
259
284
|
"type": "BooleanOp",
|
|
260
|
-
"enum": "BooleanOp",
|
|
261
285
|
"desc": "Subtract removes B from A; A is the body that survives and B is the cutter. Operations apply in graph order, so Subtract also removes B from geometry unioned into A earlier."
|
|
262
286
|
},
|
|
263
287
|
{
|
|
@@ -299,18 +323,15 @@
|
|
|
299
323
|
"inputs": [
|
|
300
324
|
{
|
|
301
325
|
"name": "X",
|
|
302
|
-
"type": "Float[]"
|
|
303
|
-
"lift": "len1"
|
|
326
|
+
"type": "Float[]"
|
|
304
327
|
},
|
|
305
328
|
{
|
|
306
329
|
"name": "Y",
|
|
307
|
-
"type": "Float[]"
|
|
308
|
-
"lift": "len1"
|
|
330
|
+
"type": "Float[]"
|
|
309
331
|
},
|
|
310
332
|
{
|
|
311
333
|
"name": "Z",
|
|
312
|
-
"type": "Float[]"
|
|
313
|
-
"lift": "len1"
|
|
334
|
+
"type": "Float[]"
|
|
314
335
|
}
|
|
315
336
|
],
|
|
316
337
|
"outputs": [
|
|
@@ -319,8 +340,10 @@
|
|
|
319
340
|
"type": "Vec3[]"
|
|
320
341
|
}
|
|
321
342
|
],
|
|
322
|
-
"
|
|
323
|
-
"
|
|
343
|
+
"desc": [
|
|
344
|
+
"Builds Vec3 values from Float or Float[] components.",
|
|
345
|
+
"Arrays combine element by element: the result is as long as the longest input, and a shorter input repeats its first value.",
|
|
346
|
+
"It pairs X[i], Y[i] and Z[i]: arrays of n values give n vectors, never every combination."
|
|
324
347
|
]
|
|
325
348
|
},
|
|
326
349
|
{
|
|
@@ -329,8 +352,7 @@
|
|
|
329
352
|
"inputs": [
|
|
330
353
|
{
|
|
331
354
|
"name": "XYZ",
|
|
332
|
-
"type": "Vec3[]"
|
|
333
|
-
"lift": "len1"
|
|
355
|
+
"type": "Vec3[]"
|
|
334
356
|
}
|
|
335
357
|
],
|
|
336
358
|
"outputs": [
|
|
@@ -354,18 +376,15 @@
|
|
|
354
376
|
"inputs": [
|
|
355
377
|
{
|
|
356
378
|
"name": "Operation",
|
|
357
|
-
"type": "GeoNodeMathOp"
|
|
358
|
-
"enum": "GeoNodeMathOp"
|
|
379
|
+
"type": "GeoNodeMathOp"
|
|
359
380
|
},
|
|
360
381
|
{
|
|
361
382
|
"name": "A",
|
|
362
|
-
"type": "Float[]"
|
|
363
|
-
"lift": "len1"
|
|
383
|
+
"type": "Float[]"
|
|
364
384
|
},
|
|
365
385
|
{
|
|
366
386
|
"name": "B",
|
|
367
|
-
"type": "Float[]"
|
|
368
|
-
"lift": "len1"
|
|
387
|
+
"type": "Float[]"
|
|
369
388
|
}
|
|
370
389
|
],
|
|
371
390
|
"outputs": [
|
|
@@ -374,8 +393,8 @@
|
|
|
374
393
|
"type": "Float[]"
|
|
375
394
|
}
|
|
376
395
|
],
|
|
377
|
-
"
|
|
378
|
-
"
|
|
396
|
+
"desc": [
|
|
397
|
+
"Arrays combine element by element: the result is as long as the longest input, and a shorter input repeats its first value.",
|
|
379
398
|
"Unary ops read A and ignore B.",
|
|
380
399
|
"Trig ops take radians.",
|
|
381
400
|
"For DotProduct or CrossProduct, use MathVec3."
|
|
@@ -387,18 +406,15 @@
|
|
|
387
406
|
"inputs": [
|
|
388
407
|
{
|
|
389
408
|
"name": "Operation",
|
|
390
|
-
"type": "GeoNodeMathOp"
|
|
391
|
-
"enum": "GeoNodeMathOp"
|
|
409
|
+
"type": "GeoNodeMathOp"
|
|
392
410
|
},
|
|
393
411
|
{
|
|
394
412
|
"name": "A",
|
|
395
|
-
"type": "Vec3[]"
|
|
396
|
-
"lift": "len1"
|
|
413
|
+
"type": "Vec3[]"
|
|
397
414
|
},
|
|
398
415
|
{
|
|
399
416
|
"name": "B",
|
|
400
|
-
"type": "Vec3[]"
|
|
401
|
-
"lift": "len1"
|
|
417
|
+
"type": "Vec3[]"
|
|
402
418
|
}
|
|
403
419
|
],
|
|
404
420
|
"outputs": [
|
|
@@ -407,8 +423,8 @@
|
|
|
407
423
|
"type": "Vec3[]"
|
|
408
424
|
}
|
|
409
425
|
],
|
|
410
|
-
"
|
|
411
|
-
"
|
|
426
|
+
"desc": [
|
|
427
|
+
"Arrays combine element by element: the result is as long as the longest input, and a shorter input repeats its first value.",
|
|
412
428
|
"Unary ops read A and ignore B.",
|
|
413
429
|
"Trig ops take radians."
|
|
414
430
|
]
|
|
@@ -428,9 +444,8 @@
|
|
|
428
444
|
"type": "Float[]"
|
|
429
445
|
}
|
|
430
446
|
],
|
|
431
|
-
"
|
|
432
|
-
"
|
|
433
|
-
"Values[i] = float(i) for i in [0,n)."
|
|
447
|
+
"desc": [
|
|
448
|
+
"Values[i] = float(i) for i in [0,Count); Count is 0 or more."
|
|
434
449
|
]
|
|
435
450
|
},
|
|
436
451
|
{
|
|
@@ -439,13 +454,11 @@
|
|
|
439
454
|
"inputs": [
|
|
440
455
|
{
|
|
441
456
|
"name": "Rotations",
|
|
442
|
-
"type": "Vec3[]"
|
|
443
|
-
"lift": "len1"
|
|
457
|
+
"type": "Vec3[]"
|
|
444
458
|
},
|
|
445
459
|
{
|
|
446
460
|
"name": "Vectors",
|
|
447
|
-
"type": "Vec3[]"
|
|
448
|
-
"lift": "len1"
|
|
461
|
+
"type": "Vec3[]"
|
|
449
462
|
}
|
|
450
463
|
],
|
|
451
464
|
"outputs": [
|
|
@@ -454,9 +467,8 @@
|
|
|
454
467
|
"type": "Vec3[]"
|
|
455
468
|
}
|
|
456
469
|
],
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
"defaults: Vectors=Vec3(0,0,1).",
|
|
470
|
+
"desc": [
|
|
471
|
+
"Arrays combine element by element: the result is as long as the longest input, and a shorter input repeats its first value.",
|
|
460
472
|
"Aligns local +Z to each Vector via shortest-arc rotation."
|
|
461
473
|
]
|
|
462
474
|
},
|
|
@@ -470,18 +482,19 @@
|
|
|
470
482
|
},
|
|
471
483
|
{
|
|
472
484
|
"name": "Positions",
|
|
473
|
-
"type": "Vec3[]"
|
|
474
|
-
"lift": "len1"
|
|
485
|
+
"type": "Vec3[]"
|
|
475
486
|
},
|
|
476
487
|
{
|
|
477
488
|
"name": "Rotations",
|
|
478
489
|
"type": "Vec3[]",
|
|
479
|
-
"
|
|
490
|
+
"desc": "Left out, every primitive keeps its rotation.",
|
|
491
|
+
"optional": true
|
|
480
492
|
},
|
|
481
493
|
{
|
|
482
494
|
"name": "Scales",
|
|
483
495
|
"type": "Vec3[]",
|
|
484
|
-
"
|
|
496
|
+
"desc": "Left out, every primitive keeps its size.",
|
|
497
|
+
"optional": true
|
|
485
498
|
}
|
|
486
499
|
],
|
|
487
500
|
"outputs": [
|
|
@@ -490,9 +503,8 @@
|
|
|
490
503
|
"type": "Geometry"
|
|
491
504
|
}
|
|
492
505
|
],
|
|
493
|
-
"
|
|
494
|
-
"
|
|
495
|
-
"defaults: Scales=Vec3(1,1,1).",
|
|
506
|
+
"desc": [
|
|
507
|
+
"Element i applies to primitive i; past the end of an input, its first value is used.",
|
|
496
508
|
"Does NOT duplicate geometry (use InstancePrimitive to duplicate)."
|
|
497
509
|
]
|
|
498
510
|
},
|
|
@@ -516,7 +528,7 @@
|
|
|
516
528
|
"type": "Geometry"
|
|
517
529
|
}
|
|
518
530
|
],
|
|
519
|
-
"
|
|
531
|
+
"desc": [
|
|
520
532
|
"Assigns Material to every primitive in Geometry; geometry passes through unchanged.",
|
|
521
533
|
"Material=<id> takes an existing scene material ID, never a color, name, or hex.",
|
|
522
534
|
"Material=0 selects the scene default material.",
|
|
@@ -555,7 +567,7 @@
|
|
|
555
567
|
"type": "Geometry"
|
|
556
568
|
}
|
|
557
569
|
],
|
|
558
|
-
"
|
|
570
|
+
"desc": [
|
|
559
571
|
"Outputs geometry at slot Index (0=A, 1=B, 2=C, 3=D).",
|
|
560
572
|
"Returns empty geometry if Index is out of range [0,3]."
|
|
561
573
|
]
|
|
@@ -570,8 +582,7 @@
|
|
|
570
582
|
},
|
|
571
583
|
{
|
|
572
584
|
"name": "Type",
|
|
573
|
-
"type": "LatticeType"
|
|
574
|
-
"enum": "LatticeType"
|
|
585
|
+
"type": "LatticeType"
|
|
575
586
|
},
|
|
576
587
|
{
|
|
577
588
|
"name": "Position",
|
|
@@ -585,8 +596,8 @@
|
|
|
585
596
|
},
|
|
586
597
|
{
|
|
587
598
|
"name": "Scale",
|
|
588
|
-
"type": "
|
|
589
|
-
"desc": "uniform cell size"
|
|
599
|
+
"type": "Vec3",
|
|
600
|
+
"desc": "uniform cell size; a Float splats to all three components"
|
|
590
601
|
},
|
|
591
602
|
{
|
|
592
603
|
"name": "Thickness",
|
|
@@ -605,7 +616,7 @@
|
|
|
605
616
|
"type": "Geometry"
|
|
606
617
|
}
|
|
607
618
|
],
|
|
608
|
-
"
|
|
619
|
+
"desc": [
|
|
609
620
|
"Fills geometry with a lattice infill pattern."
|
|
610
621
|
]
|
|
611
622
|
},
|
|
@@ -641,7 +652,7 @@
|
|
|
641
652
|
"type": "Vec3[]"
|
|
642
653
|
}
|
|
643
654
|
],
|
|
644
|
-
"
|
|
655
|
+
"desc": [
|
|
645
656
|
"Scatters random points inside the SDF volume."
|
|
646
657
|
]
|
|
647
658
|
},
|
|
@@ -656,7 +667,7 @@
|
|
|
656
667
|
{
|
|
657
668
|
"name": "Spacing",
|
|
658
669
|
"type": "Vec3",
|
|
659
|
-
"desc": "
|
|
670
|
+
"desc": "each component above 0 counts as at least 1.0; a component of 0 gives no points"
|
|
660
671
|
},
|
|
661
672
|
{
|
|
662
673
|
"name": "AABBMin",
|
|
@@ -673,7 +684,7 @@
|
|
|
673
684
|
"type": "Vec3[]"
|
|
674
685
|
}
|
|
675
686
|
],
|
|
676
|
-
"
|
|
687
|
+
"desc": [
|
|
677
688
|
"Places grid-spaced points inside the SDF volume.",
|
|
678
689
|
"Only points inside the volume are output."
|
|
679
690
|
]
|
|
@@ -688,7 +699,8 @@
|
|
|
688
699
|
},
|
|
689
700
|
{
|
|
690
701
|
"name": "Density",
|
|
691
|
-
"type": "
|
|
702
|
+
"type": "Int",
|
|
703
|
+
"desc": "a whole number, 1 or more; higher gives more points, and values below 1 give no points"
|
|
692
704
|
},
|
|
693
705
|
{
|
|
694
706
|
"name": "Seed",
|
|
@@ -705,7 +717,7 @@
|
|
|
705
717
|
"type": "Vec3[]"
|
|
706
718
|
}
|
|
707
719
|
],
|
|
708
|
-
"
|
|
720
|
+
"desc": [
|
|
709
721
|
"Scatters random points on the surface of Geometry."
|
|
710
722
|
]
|
|
711
723
|
},
|
|
@@ -737,7 +749,7 @@
|
|
|
737
749
|
"type": "Vec3[]"
|
|
738
750
|
}
|
|
739
751
|
],
|
|
740
|
-
"
|
|
752
|
+
"desc": [
|
|
741
753
|
"Centered at origin.",
|
|
742
754
|
"Total points = VerticesX*VerticesY*VerticesZ.",
|
|
743
755
|
"Evenly spaced within [-Size/2, +Size/2]."
|
|
@@ -749,8 +761,7 @@
|
|
|
749
761
|
"inputs": [
|
|
750
762
|
{
|
|
751
763
|
"name": "Mode",
|
|
752
|
-
"type": "GeoNodeRemapRangeOp"
|
|
753
|
-
"enum": "GeoNodeRemapRangeOp"
|
|
764
|
+
"type": "GeoNodeRemapRangeOp"
|
|
754
765
|
},
|
|
755
766
|
{
|
|
756
767
|
"name": "Clamp",
|
|
@@ -759,28 +770,23 @@
|
|
|
759
770
|
},
|
|
760
771
|
{
|
|
761
772
|
"name": "Value",
|
|
762
|
-
"type": "Vec3[]"
|
|
763
|
-
"lift": "len1"
|
|
773
|
+
"type": "Vec3[]"
|
|
764
774
|
},
|
|
765
775
|
{
|
|
766
776
|
"name": "FromMin",
|
|
767
|
-
"type": "Vec3[]"
|
|
768
|
-
"lift": "len1"
|
|
777
|
+
"type": "Vec3[]"
|
|
769
778
|
},
|
|
770
779
|
{
|
|
771
780
|
"name": "FromMax",
|
|
772
|
-
"type": "Vec3[]"
|
|
773
|
-
"lift": "len1"
|
|
781
|
+
"type": "Vec3[]"
|
|
774
782
|
},
|
|
775
783
|
{
|
|
776
784
|
"name": "ToMin",
|
|
777
|
-
"type": "Vec3[]"
|
|
778
|
-
"lift": "len1"
|
|
785
|
+
"type": "Vec3[]"
|
|
779
786
|
},
|
|
780
787
|
{
|
|
781
788
|
"name": "ToMax",
|
|
782
|
-
"type": "Vec3[]"
|
|
783
|
-
"lift": "len1"
|
|
789
|
+
"type": "Vec3[]"
|
|
784
790
|
}
|
|
785
791
|
],
|
|
786
792
|
"outputs": [
|
|
@@ -789,9 +795,8 @@
|
|
|
789
795
|
"type": "Vec3[]"
|
|
790
796
|
}
|
|
791
797
|
],
|
|
792
|
-
"
|
|
793
|
-
"
|
|
794
|
-
"defaults: Value=1, FromMax=1, ToMax=1.",
|
|
798
|
+
"desc": [
|
|
799
|
+
"The result has one element per Value element; past the end of a bound, its first value is used.",
|
|
795
800
|
"Per-component: output = (Value-FromMin)/(FromMax-FromMin)*(ToMax-ToMin)+ToMin."
|
|
796
801
|
]
|
|
797
802
|
},
|
|
@@ -801,18 +806,15 @@
|
|
|
801
806
|
"inputs": [
|
|
802
807
|
{
|
|
803
808
|
"name": "Value",
|
|
804
|
-
"type": "Vec3[]"
|
|
805
|
-
"lift": "len1"
|
|
809
|
+
"type": "Vec3[]"
|
|
806
810
|
},
|
|
807
811
|
{
|
|
808
812
|
"name": "Min",
|
|
809
|
-
"type": "Vec3[]"
|
|
810
|
-
"lift": "len1"
|
|
813
|
+
"type": "Vec3[]"
|
|
811
814
|
},
|
|
812
815
|
{
|
|
813
816
|
"name": "Max",
|
|
814
|
-
"type": "Vec3[]"
|
|
815
|
-
"lift": "len1"
|
|
817
|
+
"type": "Vec3[]"
|
|
816
818
|
}
|
|
817
819
|
],
|
|
818
820
|
"outputs": [
|
|
@@ -821,9 +823,8 @@
|
|
|
821
823
|
"type": "Vec3[]"
|
|
822
824
|
}
|
|
823
825
|
],
|
|
824
|
-
"
|
|
825
|
-
"
|
|
826
|
-
"defaults: Value=1, Max=1.",
|
|
826
|
+
"desc": [
|
|
827
|
+
"The result has one element per Value element; past the end of a bound, its first value is used.",
|
|
827
828
|
"Per-component: output[i] = clamp(Value[i], Min[i], Max[i])."
|
|
828
829
|
]
|
|
829
830
|
},
|
|
@@ -833,18 +834,15 @@
|
|
|
833
834
|
"inputs": [
|
|
834
835
|
{
|
|
835
836
|
"name": "A",
|
|
836
|
-
"type": "Vec3[]"
|
|
837
|
-
"lift": "len1"
|
|
837
|
+
"type": "Vec3[]"
|
|
838
838
|
},
|
|
839
839
|
{
|
|
840
840
|
"name": "B",
|
|
841
|
-
"type": "Vec3[]"
|
|
842
|
-
"lift": "len1"
|
|
841
|
+
"type": "Vec3[]"
|
|
843
842
|
},
|
|
844
843
|
{
|
|
845
844
|
"name": "Factor",
|
|
846
|
-
"type": "Vec3[]"
|
|
847
|
-
"lift": "len1"
|
|
845
|
+
"type": "Vec3[]"
|
|
848
846
|
}
|
|
849
847
|
],
|
|
850
848
|
"outputs": [
|
|
@@ -853,9 +851,8 @@
|
|
|
853
851
|
"type": "Vec3[]"
|
|
854
852
|
}
|
|
855
853
|
],
|
|
856
|
-
"
|
|
857
|
-
"
|
|
858
|
-
"defaults: Factor=Vec3(1,1,1).",
|
|
854
|
+
"desc": [
|
|
855
|
+
"The result is as long as the longer of A and B; past the end of an input, its first value is used, and Factor does not lengthen it.",
|
|
859
856
|
"Per-component: output = A + (B-A)*Factor."
|
|
860
857
|
]
|
|
861
858
|
},
|
|
@@ -866,8 +863,7 @@
|
|
|
866
863
|
{
|
|
867
864
|
"name": "Domain",
|
|
868
865
|
"type": "Float[]",
|
|
869
|
-
"
|
|
870
|
-
"desc": "determines output length, min 1, values ignored"
|
|
866
|
+
"desc": "sets the output length: one value per element, at least one"
|
|
871
867
|
},
|
|
872
868
|
{
|
|
873
869
|
"name": "Min",
|
|
@@ -888,7 +884,7 @@
|
|
|
888
884
|
"type": "Float[]"
|
|
889
885
|
}
|
|
890
886
|
],
|
|
891
|
-
"
|
|
887
|
+
"desc": [
|
|
892
888
|
"Generates one random float per Domain element in [Min,Max]."
|
|
893
889
|
]
|
|
894
890
|
},
|
|
@@ -899,8 +895,7 @@
|
|
|
899
895
|
{
|
|
900
896
|
"name": "Domain",
|
|
901
897
|
"type": "Vec3[]",
|
|
902
|
-
"
|
|
903
|
-
"desc": "determines output length, min 1, values ignored"
|
|
898
|
+
"desc": "sets the output length: one value per element, at least one"
|
|
904
899
|
},
|
|
905
900
|
{
|
|
906
901
|
"name": "Min",
|
|
@@ -921,7 +916,7 @@
|
|
|
921
916
|
"type": "Vec3[]"
|
|
922
917
|
}
|
|
923
918
|
],
|
|
924
|
-
"
|
|
919
|
+
"desc": [
|
|
925
920
|
"Generates one random Vec3 per Domain element.",
|
|
926
921
|
"Each component independently sampled in [Min.xyz, Max.xyz]."
|
|
927
922
|
]
|
|
@@ -953,7 +948,7 @@
|
|
|
953
948
|
"type": "Vec3"
|
|
954
949
|
}
|
|
955
950
|
],
|
|
956
|
-
"
|
|
951
|
+
"desc": [
|
|
957
952
|
"Tight axis-aligned bounding box of Geometry's SDF volume.",
|
|
958
953
|
"Center=(Min+Max)/2, Size=Max-Min."
|
|
959
954
|
]
|
|
@@ -993,7 +988,7 @@
|
|
|
993
988
|
"type": "Int[]"
|
|
994
989
|
}
|
|
995
990
|
],
|
|
996
|
-
"
|
|
991
|
+
"desc": [
|
|
997
992
|
"Returns integer indices [0, 1, ..., len(Domain)-1].",
|
|
998
993
|
"Output length equals Domain length."
|
|
999
994
|
]
|
|
@@ -1004,8 +999,7 @@
|
|
|
1004
999
|
"inputs": [
|
|
1005
1000
|
{
|
|
1006
1001
|
"name": "Angles",
|
|
1007
|
-
"type": "Vec3[]"
|
|
1008
|
-
"lift": "len1"
|
|
1002
|
+
"type": "Vec3[]"
|
|
1009
1003
|
}
|
|
1010
1004
|
],
|
|
1011
1005
|
"outputs": [
|
|
@@ -1014,10 +1008,16 @@
|
|
|
1014
1008
|
"type": "Vec3[]"
|
|
1015
1009
|
}
|
|
1016
1010
|
],
|
|
1017
|
-
"
|
|
1011
|
+
"desc": [
|
|
1018
1012
|
"Per-element: takes Angles[i].x as angle in radians.",
|
|
1019
1013
|
"Output[i] = Vec3(sin(a), 0, cos(a))."
|
|
1020
1014
|
]
|
|
1021
1015
|
}
|
|
1016
|
+
],
|
|
1017
|
+
"outputs": [
|
|
1018
|
+
{
|
|
1019
|
+
"name": "Geometry",
|
|
1020
|
+
"type": "Geometry"
|
|
1021
|
+
}
|
|
1022
1022
|
]
|
|
1023
1023
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildIncomingMap,
|
|
1
|
+
import { buildIncomingMap, paramName, resolveParamTypeIds, } from "./common.js";
|
|
2
2
|
/**
|
|
3
3
|
* Build a map from IR param name → value-node backend ID by inspecting
|
|
4
4
|
* a graph for value nodes connected to GroupInputParam nodes.
|
|
@@ -17,10 +17,10 @@ export function buildParamMap(graph, graphExt, gipTypeId, valueTypeIds) {
|
|
|
17
17
|
});
|
|
18
18
|
if (!gipEdge)
|
|
19
19
|
continue;
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
20
|
+
const name = paramName(graphExt, bid, gipEdge.fromBid);
|
|
21
|
+
if (!name)
|
|
22
22
|
continue;
|
|
23
|
-
paramMap.set(
|
|
23
|
+
paramMap.set(name, bid);
|
|
24
24
|
}
|
|
25
25
|
return paramMap;
|
|
26
26
|
}
|
package/dist/geometry.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export { backendRegistry, compileGeometry, flowirRegistry, migrateGraphExt, readEditableGeometry, } from "./geometry/compiler.js";
|
|
2
|
-
export { createGeoNodesRegistry
|
|
2
|
+
export { createGeoNodesRegistry } from "./geometry/index.js";
|
|
3
3
|
export type { GeometryGraph, GraphData } from "./geometry/graph.js";
|
|
4
4
|
export { graphDataSchema, geometryGraphSchema, graphExtSchema, } from "./geometry/graph.js";
|
|
5
5
|
export { migrateParameterOverrides, readParameterOverrides, } from "./geometry/parameters.js";
|
|
6
6
|
export type { BackendNodeSchema, BackendPort, BackendValue, GraphExt, } from "./geometry/backendRegistry.js";
|
|
7
|
-
export declare function geometryReference():
|
|
8
|
-
rules: string;
|
|
9
|
-
catalog: string;
|
|
10
|
-
};
|
|
7
|
+
export declare function geometryReference(): string;
|
package/dist/geometry.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import * as flowir from "@womp/flowir";
|
|
2
2
|
import { flowirRegistry } from "./geometry/compiler.js";
|
|
3
3
|
export { backendRegistry, compileGeometry, flowirRegistry, migrateGraphExt, readEditableGeometry, } from "./geometry/compiler.js";
|
|
4
|
-
export { createGeoNodesRegistry
|
|
4
|
+
export { createGeoNodesRegistry } from "./geometry/index.js";
|
|
5
5
|
export { graphDataSchema, geometryGraphSchema, graphExtSchema, } from "./geometry/graph.js";
|
|
6
6
|
export { migrateParameterOverrides, readParameterOverrides, } from "./geometry/parameters.js";
|
|
7
7
|
let reference;
|
|
8
8
|
export function geometryReference() {
|
|
9
|
-
reference ??= {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Exactly one cast applies per port and casts do not chain: Float[] -> Vec3 is unavailable even though Float[] -> Float and Float -> Vec3 are both listed. Build the vector with CombineXYZ instead.
|
|
16
|
-
${flowir.renderDslRulesBlock()}`,
|
|
17
|
-
catalog: flowir.renderSchemaBlock(flowirRegistry.getSchema()),
|
|
18
|
-
};
|
|
9
|
+
reference ??= `${flowir.renderPrompt(flowirRegistry)}
|
|
10
|
+
|
|
11
|
+
An example program:
|
|
12
|
+
param Float diameter = 14.0 min=2 max=60 step=0.5
|
|
13
|
+
node gem Primitive Type=Octahedron Position=Vec3(0.0,0.0,0.0) Rotation=Vec3(0.0,45.0,0.0) Size=diameter Roundness=0.1
|
|
14
|
+
out Geometry=gem.Geometry`;
|
|
19
15
|
return reference;
|
|
20
16
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { runSparkAgent, type SparkAgentOptions, type SparkAgentResult, type SparkAgentRun, } from "./agent.js";
|
|
2
2
|
export { createSparkTools, type SparkPersistence, type SparkToolCall } from "./agent-tools.js";
|
|
3
3
|
export { convertSparkMessages } from "./model-history.js";
|
|
4
|
-
export type
|
|
5
|
-
export * from "./context-
|
|
4
|
+
export { applyCompaction, latestCompaction, type SparkCompactionLimits } from "./compaction.js";
|
|
5
|
+
export * from "./context-window.js";
|
|
6
6
|
export * from "./capabilities.js";
|
|
7
7
|
export { createSdkSceneEditor, createSdkSceneHost, type SdkSceneEditor, type SdkSceneEditorOptions, type SdkSceneEditIdentity, type SdkSceneServices, } from "./sdk-scene-host.js";
|
|
8
8
|
export { recoverSceneOperation, type SceneOperation, type SceneOperationStore } from "./scene-operations.js";
|