topotopo 0.4.0 → 0.5.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/NOTICE +10 -10
- package/README.md +460 -117
- package/dist/cli.js +323 -146
- package/dist/config.d.ts +48 -0
- package/dist/config.js +170 -0
- package/dist/core/bake.d.ts +14 -3
- package/dist/core/bake.js +153 -4
- package/dist/core/bevel.d.ts +3 -1
- package/dist/core/bevel.js +76 -3
- package/dist/core/decimate.d.ts +65 -0
- package/dist/core/decimate.js +409 -3
- package/dist/core/erosion.d.ts +37 -0
- package/dist/core/erosion.js +41 -1
- package/dist/core/geometry.d.ts +5 -1
- package/dist/core/geometry.js +203 -3
- package/dist/core/heightfield.d.ts +27 -4
- package/dist/core/heightfield.js +54 -16
- package/dist/core/intrinsics.d.ts +7 -0
- package/dist/core/intrinsics.js +94 -0
- package/dist/core/manifold.d.ts +12 -1
- package/dist/core/manifold.js +78 -6
- package/dist/core/materials.d.ts +7 -0
- package/dist/core/materials.js +45 -0
- package/dist/core/noise.d.ts +9 -0
- package/dist/core/noise.js +10 -1
- package/dist/core/polymerge.d.ts +21 -0
- package/dist/core/polymerge.js +327 -0
- package/dist/core/repair.d.ts +2 -0
- package/dist/core/repair.js +2 -0
- package/dist/core/report.d.ts +70 -0
- package/dist/core/report.js +275 -0
- package/dist/core/scene.js +2 -1
- package/dist/core/sha256.d.ts +4 -0
- package/dist/core/sha256.js +69 -0
- package/dist/core/shapes.d.ts +3 -0
- package/dist/core/shapes.js +34 -0
- package/dist/core/snippet-lib.d.ts +14 -1
- package/dist/core/snippet-lib.js +39 -13
- package/dist/core/tangents.d.ts +2 -0
- package/dist/core/tangents.js +5 -1
- package/dist/core/texnoise.d.ts +6 -1
- package/dist/core/texnoise.js +6 -2
- package/dist/core/texsdf.d.ts +131 -0
- package/dist/core/texsdf.js +637 -0
- package/dist/core/texture.d.ts +163 -9
- package/dist/core/texture.js +844 -20
- package/dist/core/topology.d.ts +10 -0
- package/dist/core/topology.js +168 -0
- package/dist/core/unwrap.d.ts +72 -0
- package/dist/core/unwrap.js +800 -0
- package/dist/core/usercode.d.ts +27 -0
- package/dist/core/usercode.js +87 -0
- package/dist/core/uv.d.ts +4 -18
- package/dist/core/uv.js +35 -188
- package/dist/core/uvislands.d.ts +62 -0
- package/dist/core/uvislands.js +574 -0
- package/dist/core/uvoverlap.d.ts +58 -0
- package/dist/core/uvoverlap.js +220 -0
- package/dist/core/uvpack.d.ts +64 -0
- package/dist/core/uvpack.js +628 -0
- package/dist/core/uvreport.d.ts +61 -0
- package/dist/core/uvreport.js +207 -143
- package/dist/core/wrangle.d.ts +6 -1
- package/dist/core/wrangle.js +27 -16
- package/dist/core/xatlas.d.ts +16 -1
- package/dist/core/xatlas.js +66 -62
- package/dist/engines.d.ts +63 -0
- package/dist/engines.js +180 -0
- package/dist/explain.d.ts +4 -3
- package/dist/explain.js +129 -12
- package/dist/graph/engine.d.ts +92 -29
- package/dist/graph/engine.js +298 -148
- package/dist/graph/expr.d.ts +6 -3
- package/dist/graph/expr.js +18 -8
- package/dist/graph/outputs.d.ts +23 -0
- package/dist/graph/outputs.js +41 -0
- package/dist/graph/packages.d.ts +72 -0
- package/dist/graph/packages.js +261 -0
- package/dist/graph/parallel.d.ts +3 -1
- package/dist/graph/parallel.js +4 -1
- package/dist/graph/params.d.ts +6 -0
- package/dist/graph/params.js +34 -7
- package/dist/graph/scope.d.ts +55 -0
- package/dist/graph/scope.js +14 -0
- package/dist/graph/types.d.ts +75 -12
- package/dist/graph/types.js +4 -2
- package/dist/graph/vars.d.ts +16 -0
- package/dist/graph/vars.js +80 -0
- package/dist/host/artifacts.d.ts +10 -1
- package/dist/host/artifacts.js +37 -6
- package/dist/host/cook.d.ts +241 -0
- package/dist/host/cook.js +844 -0
- package/dist/host/export-targets.d.ts +42 -5
- package/dist/host/export-targets.js +72 -13
- package/dist/host/godot-commands.d.ts +4 -0
- package/dist/host/godot-commands.js +21 -0
- package/dist/host/godot.d.ts +183 -0
- package/dist/host/godot.js +916 -0
- package/dist/host/node.d.ts +12 -7
- package/dist/host/node.js +27 -9
- package/dist/host/pool.js +51 -2
- package/dist/host/sidecars.d.ts +8 -0
- package/dist/host/sidecars.js +50 -0
- package/dist/host/types.d.ts +19 -6
- package/dist/host/version.d.ts +1 -0
- package/dist/host/version.js +3 -0
- package/dist/host/worker.js +5 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/inspect.d.ts +80 -2
- package/dist/inspect.js +265 -30
- package/dist/io/common.d.ts +25 -5
- package/dist/io/export.js +2 -1
- package/dist/io/files.d.ts +23 -4
- package/dist/io/files.js +60 -8
- package/dist/io/gltf.js +134 -47
- package/dist/io/heightmap.d.ts +3 -0
- package/dist/io/heightmap.js +1 -0
- package/dist/io/import.js +10 -0
- package/dist/io/inspect-scene.d.ts +55 -0
- package/dist/io/inspect-scene.js +155 -0
- package/dist/io/kinds.d.ts +81 -0
- package/dist/io/kinds.js +163 -0
- package/dist/io/points.d.ts +2 -1
- package/dist/io/points.js +3 -1
- package/dist/io/sidecars.d.ts +24 -0
- package/dist/io/sidecars.js +57 -0
- package/dist/io/source.d.ts +65 -0
- package/dist/io/source.js +112 -0
- package/dist/io/targets.d.ts +47 -3
- package/dist/io/targets.js +148 -13
- package/dist/io/textures.js +21 -1
- package/dist/io/unreal.js +5 -1
- package/dist/mcp/docs.d.ts +10 -1
- package/dist/mcp/docs.js +786 -143
- package/dist/mcp/inputs.d.ts +12 -5
- package/dist/mcp/inputs.js +50 -13
- package/dist/mcp/server.js +56 -27
- package/dist/mcp/tools.d.ts +14 -7
- package/dist/mcp/tools.js +196 -103
- package/dist/mcp/verify.d.ts +2 -2
- package/dist/mcp/verify.js +1 -1
- package/dist/mcp/workspace.d.ts +15 -0
- package/dist/mcp/workspace.js +349 -0
- package/dist/nodes/attributes.js +198 -1
- package/dist/nodes/bake.js +151 -47
- package/dist/nodes/beam.d.ts +1 -0
- package/dist/nodes/beam.js +201 -0
- package/dist/nodes/bevel.js +51 -3
- package/dist/nodes/cloth.js +2 -0
- package/dist/nodes/code.js +21 -9
- package/dist/nodes/curves.js +433 -93
- package/dist/nodes/flow.js +53 -33
- package/dist/nodes/generate.js +12 -38
- package/dist/nodes/heightfield.js +248 -77
- package/dist/nodes/imageops.js +16 -19
- package/dist/nodes/index.d.ts +1 -0
- package/dist/nodes/index.js +1 -0
- package/dist/nodes/material.js +89 -24
- package/dist/nodes/measure.js +43 -17
- package/dist/nodes/particles.js +2 -0
- package/dist/nodes/pcg.js +6 -5
- package/dist/nodes/procedural.js +4 -3
- package/dist/nodes/remesh.js +71 -15
- package/dist/nodes/scene.js +4 -2
- package/dist/nodes/sdf.js +10 -5
- package/dist/nodes/solid.js +20 -5
- package/dist/nodes/splines.d.ts +15 -1
- package/dist/nodes/splines.js +112 -105
- package/dist/nodes/texture.d.ts +21 -6
- package/dist/nodes/texture.js +1318 -185
- package/dist/nodes/topology.d.ts +7 -0
- package/dist/nodes/topology.js +133 -6
- package/dist/nodes/transform.js +6 -2
- package/dist/nodes/uv.js +192 -174
- package/dist/nodes/wasmcall.js +5 -1
- package/dist/open.d.ts +19 -0
- package/dist/open.js +12 -0
- package/dist/package.d.ts +288 -0
- package/dist/package.js +772 -0
- package/dist/packages/check.d.ts +32 -0
- package/dist/packages/check.js +169 -0
- package/dist/packages/commands.d.ts +57 -0
- package/dist/packages/commands.js +537 -0
- package/dist/packages/registry.d.ts +796 -0
- package/dist/packages/registry.js +2998 -0
- package/dist/packages/update.d.ts +124 -0
- package/dist/packages/update.js +476 -0
- package/dist/render/options.d.ts +2 -0
- package/dist/render/options.js +44 -5
- package/dist/render/preview.d.ts +15 -4
- package/dist/render/preview.js +6 -4
- package/dist/render/raster.d.ts +66 -5
- package/dist/render/raster.js +506 -138
- package/dist/render/texview.d.ts +6 -0
- package/dist/render/texview.js +27 -0
- package/dist/scan.d.ts +61 -0
- package/dist/scan.js +228 -0
- package/dist/session.d.ts +311 -0
- package/dist/session.js +849 -0
- package/dist/viewer/app/api.js +48 -6
- package/dist/viewer/app/cooking.js +78 -0
- package/dist/viewer/app/embed.js +27 -7
- package/dist/viewer/app/export-popover.js +118 -16
- package/dist/viewer/app/grid.js +5 -1
- package/dist/viewer/app/guides.js +122 -0
- package/dist/viewer/app/keymap.js +6 -3
- package/dist/viewer/app/layers.js +4 -4
- package/dist/viewer/app/main.js +185 -52
- package/dist/viewer/app/markers.js +60 -0
- package/dist/viewer/app/outliner.js +72 -27
- package/dist/viewer/app/output-info.js +45 -0
- package/dist/viewer/app/outputs.css +147 -8
- package/dist/viewer/app/outputs.js +168 -54
- package/dist/viewer/app/packages.js +614 -0
- package/dist/viewer/app/props.js +176 -52
- package/dist/viewer/app/scene.js +30 -5
- package/dist/viewer/app/select.js +4 -3
- package/dist/viewer/app/status.js +12 -15
- package/dist/viewer/app/style.css +65 -7
- package/dist/viewer/app/vars.js +47 -0
- package/dist/viewer/app/welcome.js +72 -0
- package/dist/viewer/graph-file.d.ts +62 -0
- package/dist/viewer/graph-file.js +175 -0
- package/dist/viewer/index.html +23 -10
- package/dist/viewer/json-edit.d.ts +13 -0
- package/dist/viewer/json-edit.js +274 -0
- package/dist/viewer/outputs.d.ts +49 -5
- package/dist/viewer/outputs.js +264 -56
- package/dist/viewer/packages.d.ts +121 -0
- package/dist/viewer/packages.js +584 -0
- package/dist/viewer/server.d.ts +14 -9
- package/dist/viewer/server.js +266 -28
- package/dist/web/app/web.css +419 -0
- package/dist/web/app/web.js +188 -0
- package/dist/{gallery → web}/bake.d.ts +4 -4
- package/dist/{gallery → web}/bake.js +24 -15
- package/dist/web/folder-page.d.ts +101 -0
- package/dist/web/folder-page.js +146 -0
- package/dist/web/folders.d.ts +280 -0
- package/dist/web/folders.js +970 -0
- package/dist/web/library.d.ts +91 -0
- package/dist/web/library.js +228 -0
- package/dist/web/markdown.d.ts +45 -0
- package/dist/web/markdown.js +677 -0
- package/dist/web/pages.d.ts +258 -0
- package/dist/web/pages.js +301 -0
- package/dist/web/server.d.ts +24 -0
- package/dist/web/server.js +1068 -0
- package/dist/workspace.d.ts +88 -118
- package/dist/workspace.js +358 -460
- package/integrations/godot/addons/topotopo/LICENSE +202 -0
- package/integrations/godot/addons/topotopo/README.md +57 -0
- package/integrations/godot/addons/topotopo/context_menu.gd +43 -0
- package/integrations/godot/addons/topotopo/dock.gd +266 -0
- package/integrations/godot/addons/topotopo/dock.tscn +72 -0
- package/integrations/godot/addons/topotopo/export_filter.gd +72 -0
- package/integrations/godot/addons/topotopo/gltf_instancing.gd +131 -0
- package/integrations/godot/addons/topotopo/icons/topotopo.svg +1 -0
- package/integrations/godot/addons/topotopo/inspector.gd +38 -0
- package/integrations/godot/addons/topotopo/instances_post_import.gd +111 -0
- package/integrations/godot/addons/topotopo/package.gd +23 -0
- package/integrations/godot/addons/topotopo/package_importer.gd +187 -0
- package/integrations/godot/addons/topotopo/plugin.cfg +7 -0
- package/integrations/godot/addons/topotopo/plugin.gd +970 -0
- package/integrations/godot/addons/topotopo/record.gd +435 -0
- package/integrations/godot/addons/topotopo/runner.gd +458 -0
- package/integrations/godot/addons/topotopo/tools/check.gd +42 -0
- package/integrations/godot/addons/topotopo/watcher.gd +199 -0
- package/kernels/pkg/README.md +2 -1
- package/kernels/pkg-simd/README.md +2 -1
- package/library/architecture/versions/1.0/architecture.topo +12 -0
- package/{shelf → library/architecture/versions/1.0/graphs}/arch.json +3 -3
- package/{shelf → library/architecture/versions/1.0/graphs}/beam_truss.json +6 -6
- package/{shelf → library/architecture/versions/1.0/graphs}/brick_wall.json +8 -8
- package/{shelf → library/architecture/versions/1.0/graphs}/door_frame.json +3 -3
- package/{shelf → library/architecture/versions/1.0/graphs}/hex_grid_floor.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/house.json +8 -8
- package/library/architecture/versions/1.0/graphs/lineup.json +42 -0
- package/{shelf → library/architecture/versions/1.0/graphs}/pillar.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/railing.json +5 -5
- package/{shelf → library/architecture/versions/1.0/graphs}/roof_gable.json +2 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/roof_hip.json +2 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/roof_skeleton.json +2 -1
- package/{shelf → library/architecture/versions/1.0/graphs}/scaffold.json +4 -4
- package/{shelf → library/architecture/versions/1.0/graphs}/spiral_stairs.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/stairs.json +6 -6
- package/{shelf → library/architecture/versions/1.0/graphs}/tile_floor.json +3 -2
- package/{shelf → library/architecture/versions/1.0/graphs}/wall_segment.json +10 -10
- package/{shelf → library/architecture/versions/1.0/graphs}/window_frame.json +2 -2
- package/library/architecture/versions/1.0/version.json +1119 -0
- package/{shelf → library/nature/versions/1.0/graphs}/bush.json +2 -2
- package/{shelf → library/nature/versions/1.0/graphs}/cliff_block.json +4 -3
- package/{shelf → library/nature/versions/1.0/graphs}/forest_patch.json +5 -5
- package/{shelf → library/nature/versions/1.0/graphs}/grass_clumps.json +2 -2
- package/library/nature/versions/1.0/graphs/lineup.json +24 -0
- package/{shelf → library/nature/versions/1.0/graphs}/log.json +6 -6
- package/{shelf → library/nature/versions/1.0/graphs}/rock.json +5 -4
- package/{shelf → library/nature/versions/1.0/graphs}/scatter_rocks.json +5 -5
- package/{shelf → library/nature/versions/1.0/graphs}/tree_lowpoly.json +3 -2
- package/library/nature/versions/1.0/nature.topo +12 -0
- package/library/nature/versions/1.0/version.json +534 -0
- package/{shelf → library/props/versions/1.0/graphs}/barrel.json +5 -4
- package/{shelf → library/props/versions/1.0/graphs}/crate.json +3 -3
- package/library/props/versions/1.0/graphs/lineup.json +18 -0
- package/{shelf → library/props/versions/1.0/graphs}/pallet.json +4 -3
- package/{shelf → library/props/versions/1.0/graphs}/pipe_run.json +3 -3
- package/{shelf → library/props/versions/1.0/graphs}/sandbag_wall.json +5 -5
- package/library/props/versions/1.0/props.topo +12 -0
- package/library/props/versions/1.0/version.json +336 -0
- package/{shelf → library/street/versions/1.0/graphs}/bench.json +5 -5
- package/{shelf → library/street/versions/1.0/graphs}/bollard.json +2 -1
- package/{shelf → library/street/versions/1.0/graphs}/cable.json +4 -4
- package/{shelf → library/street/versions/1.0/graphs}/fence.json +7 -7
- package/{shelf → library/street/versions/1.0/graphs}/lamp_post.json +2 -2
- package/library/street/versions/1.0/graphs/lineup.json +22 -0
- package/{shelf → library/street/versions/1.0/graphs}/road_strip.json +2 -2
- package/{shelf → library/street/versions/1.0/graphs}/sign_post.json +1 -1
- package/library/street/versions/1.0/street.topo +12 -0
- package/library/street/versions/1.0/version.json +421 -0
- package/package.json +17 -8
- package/dist/gallery/app/gallery.css +0 -100
- package/dist/gallery/app/gallery.js +0 -80
- package/dist/gallery/cli.d.ts +0 -4
- package/dist/gallery/cli.js +0 -157
- package/dist/gallery/library.d.ts +0 -124
- package/dist/gallery/library.js +0 -366
- package/dist/gallery/pages.d.ts +0 -94
- package/dist/gallery/pages.js +0 -148
- package/dist/gallery/server.d.ts +0 -21
- package/dist/gallery/server.js +0 -391
- package/dist/graph/migrate.d.ts +0 -23
- package/dist/graph/migrate.js +0 -58
- package/dist/mcp/library.d.ts +0 -12
- package/dist/mcp/library.js +0 -159
- package/shelf/index.json +0 -190
package/dist/io/targets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Every export format with the label the viewer shows, in the order it offers them (a Record, so none is missing). */
|
|
2
2
|
export const FORMAT_LABELS = {
|
|
3
|
-
glb: 'GLB (one file, textures inside)', gltf: 'glTF
|
|
3
|
+
glb: 'GLB (one file, textures inside)', gltf: 'glTF (JSON, textures inside)', usda: 'USD (.usda)', obj: 'OBJ', geo: 'Houdini .geo',
|
|
4
4
|
unreal_landscape: 'Unreal Landscape bundle (folder)', csv: 'CSV points (Unreal PCG)', pointsjson: 'Points JSON',
|
|
5
5
|
textures: 'PNG textures (folder)', png16: 'Heightmap, 16-bit PNG', r16: 'Heightmap, RAW .r16', mask_png: 'Masks, PNG',
|
|
6
6
|
ply: 'PLY', stl: 'STL', json: 'TopoTopo JSON',
|
|
@@ -16,22 +16,148 @@ export function targetFormat(f) {
|
|
|
16
16
|
return Object.hasOwn(FORMAT_LABELS, c) ? c : null;
|
|
17
17
|
}
|
|
18
18
|
// the export tool's options (src/mcp/tools.ts), by value type
|
|
19
|
-
const BOOLEAN = ['split_by_name', 'materials', 'custom_attribs', 'quantize', 'pcg', 'pcg_struct', 'meshes'];
|
|
19
|
+
const BOOLEAN = ['split_by_name', 'materials', 'custom_attribs', 'vertex_colors', 'quantize', 'pcg', 'pcg_struct', 'meshes'];
|
|
20
20
|
const CHOICES = { up_axis: ['y', 'z'], compress: ['none', 'meshopt', 'draco'], tangents: ['auto', 'preserve', 'none'], instancing: ['packed', 'expand'], instances: ['rows', 'expand'], precision: [32, 64] };
|
|
21
21
|
const NUMBER = ['scale', 'height_min', 'height_max', 'tile_size', 'heightfield'];
|
|
22
22
|
const NAMES = ['attributes', 'layers'];
|
|
23
23
|
const OPTIONS = [...BOOLEAN, ...Object.keys(CHOICES), ...NUMBER, ...NAMES, 'layer'];
|
|
24
|
+
/** The export tool's options among `a` (the tool's arguments), those that are set. */
|
|
25
|
+
export function exportToolOptions(a) {
|
|
26
|
+
return Object.fromEntries(OPTIONS.filter((k) => a[k] !== undefined && a[k] !== null).map((k) => [k, a[k]]));
|
|
27
|
+
}
|
|
28
|
+
const MESH = { up_axis: 'y', scale: 1, instancing: 'packed' };
|
|
29
|
+
const GLTF = { ...MESH, split_by_name: true, custom_attribs: false, vertex_colors: false, materials: true, compress: 'none', quantize: false, tangents: 'auto' };
|
|
30
|
+
/** instance rows (csv / points.json of packed prims) write one GLB per source with these */
|
|
31
|
+
const ROWS = { instances: 'rows', meshes: true, materials: true, custom_attribs: false };
|
|
32
|
+
/**
|
|
33
|
+
* The options a format reads, with the value each takes when it is not given. Every export passes them explicitly
|
|
34
|
+
* (host/export-targets.ts serializeExport) and records them in its source block, so a record replays to the same bytes
|
|
35
|
+
* even when a later version changes a default. Options whose default depends on the data (height_min / height_max:
|
|
36
|
+
* the layer's range; attributes: all; layers) are recorded only when given.
|
|
37
|
+
*/
|
|
38
|
+
export function exportDefaults(format, a = {}) {
|
|
39
|
+
switch (format) {
|
|
40
|
+
case 'glb':
|
|
41
|
+
case 'gltf': return { ...GLTF };
|
|
42
|
+
case 'usda': return { ...MESH, split_by_name: true, custom_attribs: false, materials: true };
|
|
43
|
+
case 'obj': return { ...MESH, split_by_name: true };
|
|
44
|
+
case 'ply': return { ...MESH, custom_attribs: true };
|
|
45
|
+
case 'stl': return { ...MESH };
|
|
46
|
+
case 'json': return { instancing: 'packed' };
|
|
47
|
+
case 'geo': return { precision: 64, instancing: 'packed' };
|
|
48
|
+
// PCG rows are in Unreal centimetres unless a scale is given
|
|
49
|
+
case 'csv': return { up_axis: 'y', scale: a.pcg || a.pcg_struct ? 100 : 1, pcg: false, pcg_struct: false, instancing: 'packed', ...ROWS };
|
|
50
|
+
case 'pointsjson': return { up_axis: 'y', scale: 1, instancing: 'packed', ...ROWS };
|
|
51
|
+
case 'png16':
|
|
52
|
+
case 'r16': return { layer: 'height', heightfield: 0 };
|
|
53
|
+
case 'mask_png': return a.layers ? { heightfield: 0 } : { layer: 'mask', heightfield: 0 };
|
|
54
|
+
case 'unreal_landscape': return { layer: 'height', heightfield: 0, tile_size: 0, materials: true, custom_attribs: false };
|
|
55
|
+
case 'textures': return {};
|
|
56
|
+
}
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
/** The options an export of `format` uses: the given ones over the format's defaults (keys sorted). */
|
|
60
|
+
export function resolvedExportOptions(format, a) {
|
|
61
|
+
const o = { ...exportDefaults(format, a), ...exportToolOptions(a) };
|
|
62
|
+
return Object.fromEntries(Object.keys(o).sort().map((k) => [k, o[k]]));
|
|
63
|
+
}
|
|
64
|
+
/** "custom_attribs" → "--custom-attribs" */
|
|
65
|
+
const flagOf = (k) => '--' + k.replace(/_/g, '-');
|
|
66
|
+
/** Export options as CLI flags: booleans as --name / --no-name, lists comma-joined, the rest --name value. */
|
|
67
|
+
export function exportOptionFlags(o) {
|
|
68
|
+
const out = [];
|
|
69
|
+
for (const k of Object.keys(o).sort()) {
|
|
70
|
+
const v = o[k];
|
|
71
|
+
if (v === undefined || v === null)
|
|
72
|
+
continue;
|
|
73
|
+
if (BOOLEAN.includes(k))
|
|
74
|
+
out.push(v ? flagOf(k) : '--no-' + k.replace(/_/g, '-'));
|
|
75
|
+
else if (Array.isArray(v))
|
|
76
|
+
out.push(flagOf(k), v.join(','));
|
|
77
|
+
else
|
|
78
|
+
out.push(flagOf(k), String(v));
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The export options among CLI arguments (the reverse of exportOptionFlags): every option of the export tool as a flag.
|
|
84
|
+
* Throws on a value the option does not take (targetError's checks).
|
|
85
|
+
*/
|
|
86
|
+
export function exportOptionsFromFlags(argv) {
|
|
87
|
+
const a = {};
|
|
88
|
+
const val = (f) => { const i = argv.indexOf(f); if (i < 0)
|
|
89
|
+
return undefined; const v = argv[i + 1]; if (v === undefined || v.startsWith('--'))
|
|
90
|
+
throw new Error(`${f} needs a value`); return v; };
|
|
91
|
+
for (const k of OPTIONS) {
|
|
92
|
+
const f = flagOf(k);
|
|
93
|
+
if (BOOLEAN.includes(k)) {
|
|
94
|
+
const on = argv.includes(f), off = argv.includes('--no-' + k.replace(/_/g, '-'));
|
|
95
|
+
if (on && off)
|
|
96
|
+
throw new Error(`use ${f} or --no-${k.replace(/_/g, '-')}, not both`);
|
|
97
|
+
if (on || off)
|
|
98
|
+
a[k] = on;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const v = val(f);
|
|
102
|
+
if (v === undefined)
|
|
103
|
+
continue;
|
|
104
|
+
if (NAMES.includes(k))
|
|
105
|
+
a[k] = v.split(/[\s,]+/).filter(Boolean);
|
|
106
|
+
else if (NUMBER.includes(k) || k === 'precision') {
|
|
107
|
+
const n = Number(v);
|
|
108
|
+
if (!Number.isFinite(n))
|
|
109
|
+
throw new Error(`${f} expects a number, got "${v}"`);
|
|
110
|
+
a[k] = n;
|
|
111
|
+
}
|
|
112
|
+
else
|
|
113
|
+
a[k] = v;
|
|
114
|
+
}
|
|
115
|
+
// --pcg-struct implies --pcg (the struct cells are a PCG layout)
|
|
116
|
+
if (a.pcg_struct === true && a.pcg === undefined)
|
|
117
|
+
a.pcg = true;
|
|
118
|
+
const err = targetError({ format: 'glb', ...a });
|
|
119
|
+
if (err)
|
|
120
|
+
throw new Error(err.replace(/^export option /, '').replace(/^(\w+)/, (m) => flagOf(m)));
|
|
121
|
+
return a;
|
|
122
|
+
}
|
|
24
123
|
/** A path segment Windows and POSIX both accept, and that cannot climb out of exports/. */
|
|
25
124
|
const segmentOk = (s) => !!s && s !== '.' && s !== '..' && !/[<>:"|?*\x00-\x1f]/.test(s) && !/[. ]$/.test(s) && !/^(con|prn|aux|nul|com\d|lpt\d)(\.|$)/i.test(s);
|
|
26
125
|
const pathOk = (p) => typeof p === 'string' && p.length <= 240 && !/^[A-Za-z]:|^[\\/]/.test(p) && p.replace(/\\/g, '/').split('/').every(segmentOk);
|
|
27
|
-
/**
|
|
126
|
+
/** The export path prefix that is gone ("engine:" is gone: a target is a path inside exports/); kept only to refuse it. */
|
|
127
|
+
const GONE_PREFIX = 'engine:';
|
|
128
|
+
/** A path written with the prefix that is gone. */
|
|
129
|
+
const gonePrefix = (p) => typeof p === 'string' && p.startsWith(GONE_PREFIX);
|
|
130
|
+
/** What a target still written with the prefix that is gone is told, its path as written given. */
|
|
131
|
+
export const prefixGone = (written) => {
|
|
132
|
+
const rest = written.slice(GONE_PREFIX.length);
|
|
133
|
+
return `export path "${written}": the "${GONE_PREFIX}" prefix is gone: an export target is a path inside its package's exports/ folder${rest ? ` ("${rest}")` : ''}, and a workspace inside the engine project has exports/ inside it, where the engine imports from`;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* What a valid target is warned of when a graph is validated or cooked: a path still written with the prefix that is
|
|
137
|
+
* gone, which cooks, views and freezes in versions as it is but is refused where a file would be written. null for
|
|
138
|
+
* none.
|
|
139
|
+
*/
|
|
140
|
+
export function targetWarning(t) {
|
|
141
|
+
const o = typeof t === 'string' ? null : t;
|
|
142
|
+
return o && typeof o === 'object' && gonePrefix(o.path) ? `${prefixGone(o.path)}; exporting it fails until its path is changed` : null;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Why a target is refused where it is set (the edit op "export", the viewer's Export) or a file would be written: its
|
|
146
|
+
* path still has the prefix that is gone. null for any other target (targetError checks the rest).
|
|
147
|
+
*/
|
|
148
|
+
export function targetRefusal(t) {
|
|
149
|
+
const o = typeof t === 'string' ? null : t;
|
|
150
|
+
return o && typeof o === 'object' && gonePrefix(o.path) ? prefixGone(o.path) : null;
|
|
151
|
+
}
|
|
152
|
+
/** Why a target is invalid, or null when it is valid (a path written with the prefix that is gone only warns: targetWarning). */
|
|
28
153
|
export function targetError(t) {
|
|
29
154
|
const o = typeof t === 'string' ? { format: t } : t;
|
|
30
155
|
if (!o || typeof o !== 'object' || Array.isArray(o))
|
|
31
156
|
return 'export must be a format name ("glb") or {format, path?, ...options}';
|
|
32
157
|
if (!targetFormat(o.format))
|
|
33
158
|
return `export format "${o.format}" is not one of ${TARGET_FORMATS.join(', ')} (or usd)`;
|
|
34
|
-
if (o.path
|
|
159
|
+
if (gonePrefix(o.path)) { /* a warning (targetWarning), refused where a file would be written */ }
|
|
160
|
+
else if (o.path !== undefined && !pathOk(o.path))
|
|
35
161
|
return `export path "${o.path}" must stay inside exports/: relative, without "..", a drive or a leading slash`;
|
|
36
162
|
for (const [k, v] of Object.entries(o)) {
|
|
37
163
|
if (k === 'format' || k === 'path')
|
|
@@ -59,17 +185,26 @@ export const fileStem = (s) => s.replace(/[^A-Za-z0-9_.-]+/g, '_').replace(/^\.+
|
|
|
59
185
|
export function resolveTarget(t, stem) {
|
|
60
186
|
const { format, path, ...options } = typeof t === 'string' ? { format: t } : t;
|
|
61
187
|
const f = targetFormat(format);
|
|
62
|
-
|
|
188
|
+
const gone = gonePrefix(path), rest = gone ? path.slice(GONE_PREFIX.length) : path;
|
|
189
|
+
return { format: f, path: (typeof rest === 'string' && rest ? rest : fileStem(stem) + targetExtension(f)).replace(/\\/g, '/'), options, ...(gone ? { refused: path } : {}) };
|
|
63
190
|
}
|
|
64
|
-
/** A
|
|
191
|
+
/** A target's path as written in a graph (one still written with the prefix that is gone, as it is). */
|
|
192
|
+
export const targetPathText = (t) => t.refused ?? t.path;
|
|
193
|
+
/**
|
|
194
|
+
* A graph's results, the default output first, each once and with its target if valid. The default output (the graph's
|
|
195
|
+
* output node) is the first named output of that node, when there is one, and keeps its own target (or graph.export,
|
|
196
|
+
* named after the graph, when it has none); otherwise it is an entry of its own, named after the graph, whose target
|
|
197
|
+
* is graph.export.
|
|
198
|
+
*/
|
|
65
199
|
export function publishedOutputs(graph, spec, defaultNode) {
|
|
66
200
|
const valid = (t) => (t !== undefined && t !== null && !targetError(t) ? t : null);
|
|
67
201
|
const main = valid(spec.export);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
202
|
+
const named = Object.entries(spec.outputs ?? {}), dflt = named.find(([, o]) => o?.node === defaultNode)?.[0];
|
|
203
|
+
const outputs = named.map(([id, o]) => {
|
|
204
|
+
const own = valid(o?.export), t = own ?? (id === dflt ? main : null);
|
|
205
|
+
return { output: id, node: o.node, label: o.label ?? id, default: id === dflt, target: t ? resolveTarget(t, own ? id : graph) : null, spec };
|
|
206
|
+
});
|
|
207
|
+
if (dflt !== undefined)
|
|
208
|
+
return [...outputs.filter((p) => p.default), ...outputs.filter((p) => !p.default)];
|
|
209
|
+
return [{ output: null, node: defaultNode, label: graph, default: true, target: main ? resolveTarget(main, graph) : null, spec }, ...outputs];
|
|
75
210
|
}
|
package/dist/io/textures.js
CHANGED
|
@@ -171,8 +171,10 @@ export function texturesExport(g, dir, o = {}) {
|
|
|
171
171
|
files.push({ path: joinPath(dir, f + '.png'), bytes });
|
|
172
172
|
};
|
|
173
173
|
const lines = [];
|
|
174
|
+
const fileOf = new Map();
|
|
174
175
|
for (const [name, img] of imgs) {
|
|
175
176
|
add(name, imagePNG(img, '', o.deflate));
|
|
177
|
+
fileOf.set(name, baseOf(files[files.length - 1].path));
|
|
176
178
|
const main = img.mainLayer;
|
|
177
179
|
const a = img.layer(main);
|
|
178
180
|
const ch = a ? channelsOf(a, img.count) : 1;
|
|
@@ -183,5 +185,23 @@ export function texturesExport(g, dir, o = {}) {
|
|
|
183
185
|
add(`${name}_${l}`, imagePNG(img, l, o.deflate));
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
|
-
|
|
188
|
+
// the materials (a material output's, or a mesh's) with the files of their maps, for engines to rebuild them
|
|
189
|
+
const table = mergeMaterialTables([g, ...g.packedSources]);
|
|
190
|
+
const names = Object.keys(table);
|
|
191
|
+
if (names.length) {
|
|
192
|
+
const materials = {};
|
|
193
|
+
for (const n of names) {
|
|
194
|
+
const { textures, ...values } = table[n];
|
|
195
|
+
const maps = {};
|
|
196
|
+
for (const [slot, ref] of Object.entries(textures ?? {})) {
|
|
197
|
+
if (!ref)
|
|
198
|
+
continue;
|
|
199
|
+
const img = imageRef(ref);
|
|
200
|
+
maps[slot] = img === null ? ref : fileOf.get(img) ?? ref;
|
|
201
|
+
}
|
|
202
|
+
materials[n] = { ...values, maps };
|
|
203
|
+
}
|
|
204
|
+
files.push({ path: joinPath(dir, 'materials.json'), bytes: new TextEncoder().encode(`${JSON.stringify({ materials }, null, 1)}\n`) });
|
|
205
|
+
}
|
|
206
|
+
return { files, summary: `${files.length - (names.length ? 1 : 0)} PNG file(s) in ${dir}: ${lines.join(', ')}${names.length ? ` + materials.json (${names.join(', ')})` : ''}` };
|
|
187
207
|
}
|
package/dist/io/unreal.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
// instances.meshes.json Mesh → meshes/<Mesh>.glb, one GLB per packed source (metres, Y-up, at the origin)
|
|
16
16
|
// tiles/<x>_<y>/ opt-in tile_size (quads): overlapping heightmaps, weight layers and instance CSVs;
|
|
17
17
|
// version 2 adds tiles and tile_grid; root source files and shared meshes are retained
|
|
18
|
+
// With options.source the manifest also records how the export was made ("source", io/source.ts).
|
|
18
19
|
//
|
|
19
20
|
// Unreal's import picks the component layout with FLandscapeImportHelper's rule (unrealComponents below): the
|
|
20
21
|
// largest section size (7, 15, 31, 63, 127, 255 quads) and sections per component (2, then 1) that divide the
|
|
@@ -137,7 +138,7 @@ export async function unrealLandscapeBundle(g, o = {}) {
|
|
|
137
138
|
// meshes and instances of the same geometry
|
|
138
139
|
let objects = null, expanded = null, statics = null, instances = null;
|
|
139
140
|
// Unreal's default glTF materials ignore vertex colours: the material colour must be the factor
|
|
140
|
-
const glbOpts = { materials: o.materials, readFile: o.readFile, warn: o.warn, custom: o.custom, materialColorWins: true };
|
|
141
|
+
const glbOpts = { materials: o.materials, readFile: o.readFile, warn: o.warn, custom: o.custom, vertexColors: o.vertexColors, materialColorWins: true };
|
|
141
142
|
if (g.numPrims > 0) {
|
|
142
143
|
files.push({ path: 'objects.glb', bytes: await exportGLB(g, glbOpts) });
|
|
143
144
|
objects = 'objects.glb';
|
|
@@ -193,6 +194,9 @@ export async function unrealLandscapeBundle(g, o = {}) {
|
|
|
193
194
|
};
|
|
194
195
|
if (tileComp)
|
|
195
196
|
addTiles(g, hf, tileSize, tileComp, manifest, files, weightBytes, o);
|
|
197
|
+
// how the export was made (io/source.ts); the heightmap sidecar and objects.glb inside the bundle do not repeat it
|
|
198
|
+
if (o.source)
|
|
199
|
+
manifest.source = o.source;
|
|
196
200
|
const name = o.manifestName || 'landscape.json';
|
|
197
201
|
files.unshift({ path: name, bytes: new TextEncoder().encode(JSON.stringify(manifest, null, 2) + '\n') });
|
|
198
202
|
const layoutSummary = tileComp
|
package/dist/mcp/docs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphSpec, NodeDef } from '../graph/types.ts';
|
|
2
|
-
export declare const INSTRUCTIONS = "TopoTopo: a procedural geometry engine (Houdini-SOP style) you drive with JSON node graphs.\n\nWORKFLOW\n0. inputs {action:\"list\"} \u2192 the person's own files in the
|
|
2
|
+
export declare const INSTRUCTIONS = "TopoTopo: a procedural geometry engine (Houdini-SOP style) you drive with JSON node graphs.\n\nWORKFLOW\n0. inputs {action:\"list\"} \u2192 the person's own files in the package inputs/ folder (guide curves, sites, zones, blockouts, PNG masks). Building a landscape or scene: look there first and build on them (help topic \"inputs\").\n1. catalog \u2192 see node types (100+, Houdini names work as aliases: copytopoints, attribwrangle, polyextrude, mountain\u2026) and TopoTopo's own packages, ready-made generators by full name (topotopo/architecture/house, topotopo/nature/tree_lowpoly, topotopo/street/road_strip \u2026).\n2. help {nodes:[...]} for exact params before using unfamiliar nodes; help {topic:\"wrangle\"|\"graph\"|\"recipes\"\u2026} for concepts.\n3. build {graph} the WHOLE network in one call (dry_run:true validates without cooking). Every response reports errors per node with did-you-mean hints.\n4. render to SEE it (quad view: persp/front/right/top; backfaces are tinted blue = flipped normals; views \"quad_uv\" + checker:true for UVs; overlays for specific questions: wireframe \"hard\"/\"boundary\", views \"section\", glyphs \"N\", label_groups, shading \"matcap\", see help topic \"render\"). inspect for numbers (bbox, attributes, watertightness).\n5. edit {ops} for incremental changes (set params, insert nodes, rewire) \u2014 only downstream nodes re-cook.\n6. export to glb/gltf (materials, textures, meshopt), geo (Houdini), csv (Unreal PCG points / instance rows), points.json, usda, obj/ply/stl/json for Unreal, Blender, Houdini; unreal_landscape = a whole terrain scene for Unreal. Every export records its source (graph, vars, seeds, frame, version) so it can be made again (help topic \"export\").\n7. verify: assert nodes guard invariants in the graph (watertight, counts, bbox, expr); explain {graph} reads a result in words; diff {a, b} shows what an edit changed. See help topic \"verify\".\nOUTPUTS: publish intended deliverables in graph.outputs: {\"rotor\":{\"node\":\"rotor_final\",\"label\":\"Rotor\"}}. The default graph.output stays unchanged. The viewer lists every graph and named result, its generated textures and image layers; clicking a result isolates it. Each card says what the result is (mesh, instances, points, curves, terrain, textures, material, volume or scene; its size) and offers the formats that write it: Download (the export as a file, or a zip with its sidecars) and Export (its target in exports/). Rendered images and exports are saved and visible too. Use descriptive names; keep intermediate work in the node outliner. Rename/remove edits maintain published references. In a package that publishes versions, give each output \"tags\" ([\"conifer\", \"low-poly\"]: search finds outputs by them) and a \"description\" (else its graph's is recorded); \"kind\" (mesh, instances, points, curves, terrain, textures, material, volume, scene; a mesh with scene_null sockets is a mesh; materials alone are a material) pins what it must cook to: build warns and publishing blocks when it does not.\nINSTANCING: copy_to_points {pack:true} / pack make packed instances (millions stay cheap; glb, usda and geo export them as instances, csv/points.json as one row per instance). See help topic \"instancing\".\nPCG: mask \u2192 scatter {density_mask} \u2192 orient \u2192 prune \u2192 copy_to_points {pack, variants, variant_weights}; points_along_curve, cluster, attribute_from_map. See help topic \"pcg\".\nCURVES: bezier / nurbs make spline prims (CVs + order, exact everywhere); convert_curve, resample, fillet_curve, offset_curve_3d, project_curve (roads on terrain), spline_fit, curve_attribs (curveu, frames, ramps). See help topic \"curves\".\nCLOTH: drape {steps} simulates a mesh as cloth over a collider (input 1) and the floor, from pins (pin_group / input 2) and in wind; inflate {pressure} puffs a closed mesh into a cushion or balloon. See help topic \"cloth\".\n\nCONVENTIONS: Y-up, metres, angles in degrees (wrangle trig uses radians). Houdini attribute names (P N Cd uv pscale orient up scale width name class piece). Polygons are closed prims, polylines are open prims.\nGRAPH: {\"nodes\": {\"name\": {\"type\": \"...\", \"in\": [\"upstream\", ...], \"params\": {...}}}, \"output\": \"name\", \"vars\": {\"k\": 1}}. Params accept \"=expr\" using vars by their bare name (e.g. \"=height*0.5\"), time (frame, time) and other nodes (npoints('pts'), bbox('base').size.y, ch('box1/size')). Code (wrangle, script, sdf_expr, heightfield_layer, parametric, group and assert expressions) reads vars the same way: height, not vars.height.\nHUMANS TUNE VARS: declare \"params\" for the 3\u20138 vars a person would tune ({\"k\": {type, desc, min, max, options, label, step}}); the live viewer (preview) shows them as sliders and menus. People change vars at any time, so read the graph (graphs {action:\"get\"}) before assuming a var's value. See help topic \"graph\".\nTIME: build/edit/render/inspect/export take \"frame\" (default 1). solver = per-frame feedback (growth, accumulation). See help topic \"time\".\nPARTICLES: particles(emitter points, collision mesh, field) = Houdini POPs in one node: emission, gravity/drag/wind, curl noise, fields, floor and mesh collisions, trails as polylines; steps with the frame. See help topic \"particles\".\nESCAPE HATCHES: wrangle (per-element JS with @P/@Cd syntax), script (whole-geometry JS with the engine library), sdf_expr (signed distance functions). If a node is missing, write it with these.\nTERRAIN: heightfield \u2192 heightfield_noise \u2192 heightfield_erode \u2192 masks / heightfield_path \u2192 heightfield_scatter + copy_to_points, heightfield_to_mesh; heightfield_crop works on one tile of a big map; export png16 for an Unreal Landscape, or unreal_landscape for the landscape + layers + instances bundle. See help topic \"heightfield\".\nPHYSICS: rbd_settle drops pieces (packed instances) onto a terrain/container/ground until they rest, so scattered rocks and props sit in contact; rbd_stack drops them one at a time into piles. See help topic \"rbd\".\nWORKSPACE, PACKAGE, LIBRARY: a package is a folder of graphs and the models they make, marked by one <id>.topo file; every tool works in the open package. A workspace is a folder tree with topotopo-workspace.json at its root, best inside the engine's content folder (the Godot project, Unreal's Content/): every folder in it with a .topo file is a package, its packages find each other by themselves, use the shared libraries its file lists and share one copy of each package version, and their exports stay in each package's exports/, where the engine imports them. A library is a registered folder of packages, shared across workspaces; outside a workspace a package finds packages in every registered library. The web app (topotopo web) shows the workspaces and libraries (the person's board links to them), and TopoTopo ships one library built in. The workspace tool works on all three: workspace {action:\"list\"} finds a package, {action:\"open\"} makes it the folder every tool works in, {action:\"create\"} starts one, {action:\"show\"} says what the open package's workspace holds, {action:\"check\"} cooks what it relies on and lists what broke (after a TopoTopo update). See help topic \"workspace\".\nPACKAGES: a package uses the published outputs of other packages as node types, {\"type\": \"owner/name/output\"} (help {nodes:[...]} gives their params and version); a build that names one adds it to the package once the graph validates. TopoTopo's own packages are four packages built into TopoTopo, used the same way: topotopo/architecture (walls, windows, doors, houses, roofs, stairs, railings, floors), topotopo/nature (rocks, cliffs, trees, bushes, logs, forests, grass), topotopo/props (barrels, crates, pallets, sandbags, pipes) and topotopo/street (roads, lamp posts, bollards, benches, signs, fences, cables), e.g. {\"type\": \"topotopo/nature/rock\", \"params\": {\"size\": 2}}. Only a package's graphs use packages: when the server starts it makes its folder a package if the folder holds nothing but a package's own folders (its first reply says so), and workspace {action:\"init\"} makes any other folder one when the person says so. workspace {action:\"packages\"} lists them, {action:\"search\", query?, kind?, tag?} finds outputs in the places the package looks in (\"a conifer\", every terrain) and says whether the package can use each, {action:\"libraries\", add} lists a shared library the person names for the workspace, {action:\"publish\", dry_run:true} says what publishing would do (show it to the person; publish {note} only when they say so), {action:\"outdated\"} lists newer versions, {action:\"update\", package} shows the before/after of an update, which you apply (from, to, apply:true) only when the person says so. See help topic \"packages\".";
|
|
3
3
|
/**
|
|
4
4
|
* The complete example of help topic "inputs": guides.glb's path.* curves cut roads into a heightfield and its zone.*
|
|
5
5
|
* areas mask a tree scatter; the vars a person tunes are exposed as params. test/mcp.ts cooks it on a real guides.glb.
|
|
@@ -9,9 +9,18 @@ export declare const INPUTS_EXAMPLE: GraphSpec;
|
|
|
9
9
|
export declare function graphLines(g: GraphSpec): string;
|
|
10
10
|
export declare const TOPICS: Record<string, string>;
|
|
11
11
|
export declare function topicList(): string[];
|
|
12
|
+
/** A help topic's text ("overview" or "instructions": the operating guide), or null for a name that is not a topic. */
|
|
13
|
+
export declare function topicText(name: string): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* A package output's kind and tags (NodeDef.package) as every listing says them, "mesh [conifer, low-poly]" (a working
|
|
16
|
+
* folder's output that pins no kind: "kind not pinned [...]"); '' for other node types.
|
|
17
|
+
*/
|
|
18
|
+
export declare function kindTags(def: NodeDef): string;
|
|
12
19
|
export declare function nodeDoc(def: NodeDef): string;
|
|
20
|
+
/** The catalog by category; `cli` ends it with the command line's help flags instead of the MCP help tool. */
|
|
13
21
|
export declare function catalogText(defs: NodeDef[], filter?: {
|
|
14
22
|
category?: string;
|
|
15
23
|
search?: string;
|
|
16
24
|
deprecated?: boolean;
|
|
25
|
+
cli?: boolean;
|
|
17
26
|
}): string;
|