topotopo 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/NOTICE +30 -0
  2. package/README.md +54 -16
  3. package/dist/cli.js +95 -14
  4. package/dist/core/analysis.d.ts +5 -1
  5. package/dist/core/analysis.js +8 -3
  6. package/dist/core/bake.d.ts +2 -5
  7. package/dist/core/bake.js +12 -25
  8. package/dist/core/bevel.js +165 -97
  9. package/dist/core/geometry.js +1 -1
  10. package/dist/core/imageops.d.ts +6 -0
  11. package/dist/core/imageops.js +51 -0
  12. package/dist/core/materials.d.ts +4 -0
  13. package/dist/core/materials.js +11 -0
  14. package/dist/core/packed.js +11 -0
  15. package/dist/core/particles.d.ts +1 -1
  16. package/dist/core/particles.js +1 -1
  17. package/dist/core/rbd.js +13 -1
  18. package/dist/core/scatter.d.ts +1 -1
  19. package/dist/core/scatter.js +1 -1
  20. package/dist/core/scene.d.ts +20 -0
  21. package/dist/core/scene.js +71 -0
  22. package/dist/core/snippet-lib.d.ts +1 -1
  23. package/dist/core/snippet-lib.js +1 -1
  24. package/dist/core/solidify.d.ts +38 -0
  25. package/dist/core/solidify.js +356 -0
  26. package/dist/core/tangents.d.ts +52 -0
  27. package/dist/core/tangents.js +214 -0
  28. package/dist/core/texcoord.d.ts +4 -0
  29. package/dist/core/texcoord.js +14 -0
  30. package/dist/core/topology.d.ts +22 -0
  31. package/dist/core/topology.js +70 -7
  32. package/dist/core/traceimage.d.ts +7 -0
  33. package/dist/core/traceimage.js +221 -0
  34. package/dist/core/tritri.d.ts +5 -0
  35. package/dist/core/tritri.js +120 -0
  36. package/dist/core/uv.d.ts +13 -0
  37. package/dist/core/uv.js +3 -3
  38. package/dist/core/uvreport.d.ts +66 -0
  39. package/dist/core/uvreport.js +308 -0
  40. package/dist/core/xatlas.js +32 -2
  41. package/dist/gallery/app/gallery.css +100 -0
  42. package/dist/gallery/app/gallery.js +80 -0
  43. package/dist/gallery/bake.d.ts +34 -0
  44. package/dist/gallery/bake.js +144 -0
  45. package/dist/gallery/cli.d.ts +4 -0
  46. package/dist/gallery/cli.js +157 -0
  47. package/dist/gallery/library.d.ts +124 -0
  48. package/dist/gallery/library.js +366 -0
  49. package/dist/gallery/pages.d.ts +94 -0
  50. package/dist/gallery/pages.js +148 -0
  51. package/dist/gallery/server.d.ts +21 -0
  52. package/dist/gallery/server.js +391 -0
  53. package/dist/graph/engine.js +14 -0
  54. package/dist/graph/types.d.ts +17 -0
  55. package/dist/host/artifacts.d.ts +21 -0
  56. package/dist/host/artifacts.js +58 -0
  57. package/dist/host/export-targets.d.ts +33 -0
  58. package/dist/host/export-targets.js +84 -0
  59. package/dist/index.d.ts +3 -1
  60. package/dist/index.js +2 -1
  61. package/dist/inspect.d.ts +6 -1
  62. package/dist/inspect.js +13 -1
  63. package/dist/io/common.d.ts +8 -0
  64. package/dist/io/gltf.js +236 -19
  65. package/dist/io/targets.d.ts +31 -0
  66. package/dist/io/targets.js +75 -0
  67. package/dist/mcp/docs.d.ts +1 -1
  68. package/dist/mcp/docs.js +73 -6
  69. package/dist/mcp/library.d.ts +12 -0
  70. package/dist/mcp/library.js +159 -0
  71. package/dist/mcp/server.js +29 -12
  72. package/dist/mcp/tools.d.ts +1 -1
  73. package/dist/mcp/tools.js +102 -43
  74. package/dist/nodes/bake.js +56 -36
  75. package/dist/nodes/bevel.js +4 -3
  76. package/dist/nodes/code.js +33 -7
  77. package/dist/nodes/curves.js +7 -0
  78. package/dist/nodes/generate.js +1 -1
  79. package/dist/nodes/imageops.d.ts +1 -0
  80. package/dist/nodes/imageops.js +206 -0
  81. package/dist/nodes/index.d.ts +3 -0
  82. package/dist/nodes/index.js +3 -0
  83. package/dist/nodes/material.js +3 -0
  84. package/dist/nodes/measure.js +3 -2
  85. package/dist/nodes/rbd.js +1 -1
  86. package/dist/nodes/scene.d.ts +1 -0
  87. package/dist/nodes/scene.js +53 -0
  88. package/dist/nodes/solidify.d.ts +1 -0
  89. package/dist/nodes/solidify.js +52 -0
  90. package/dist/nodes/transform.js +5 -1
  91. package/dist/nodes/util.d.ts +1 -1
  92. package/dist/nodes/wasmcall.js +1 -1
  93. package/dist/render/options.js +1 -1
  94. package/dist/render/pbr.d.ts +28 -0
  95. package/dist/render/pbr.js +378 -0
  96. package/dist/render/preview.d.ts +58 -0
  97. package/dist/render/preview.js +24 -0
  98. package/dist/render/raster.d.ts +12 -2
  99. package/dist/render/raster.js +98 -11
  100. package/dist/render/texview.d.ts +1 -1
  101. package/dist/render/texview.js +7 -2
  102. package/dist/viewer/app/camera.js +27 -7
  103. package/dist/viewer/app/embed.js +80 -0
  104. package/dist/viewer/app/export-popover.js +68 -0
  105. package/dist/viewer/app/grid.js +1 -1
  106. package/dist/viewer/app/guides.js +1 -1
  107. package/dist/viewer/app/image-view.js +114 -0
  108. package/dist/viewer/app/keymap.js +15 -3
  109. package/dist/viewer/app/layers.js +24 -5
  110. package/dist/viewer/app/main.js +71 -15
  111. package/dist/viewer/app/markers.js +1 -1
  112. package/dist/viewer/app/outliner.js +56 -15
  113. package/dist/viewer/app/outputs.css +73 -0
  114. package/dist/viewer/app/outputs.js +240 -0
  115. package/dist/viewer/app/props.js +1 -1
  116. package/dist/viewer/app/scene.js +6 -2
  117. package/dist/viewer/app/select.js +14 -3
  118. package/dist/viewer/app/selection.js +1 -1
  119. package/dist/viewer/app/status.js +20 -0
  120. package/dist/viewer/app/style.css +2 -1
  121. package/dist/viewer/app/units.js +1 -1
  122. package/dist/viewer/app/vars.js +1 -1
  123. package/dist/viewer/index.html +20 -6
  124. package/dist/viewer/outputs.d.ts +54 -0
  125. package/dist/viewer/outputs.js +436 -0
  126. package/dist/viewer/server.d.ts +19 -2
  127. package/dist/viewer/server.js +77 -9
  128. package/dist/workspace.d.ts +21 -2
  129. package/dist/workspace.js +124 -4
  130. package/kernels/pkg/README.md +21 -28
  131. package/kernels/pkg-simd/README.md +21 -28
  132. package/package.json +11 -4
package/dist/mcp/tools.js CHANGED
@@ -8,11 +8,13 @@ import { didYouMean } from '../graph/params.js';
8
8
  import { migrateGraph } from '../graph/migrate.js';
9
9
  import { catalogText, nodeDoc, TOPICS, topicList, INSTRUCTIONS } from './docs.js';
10
10
  import { summarize, inspect } from '../inspect.js';
11
- import { renderGeometry } from '../render/raster.js';
11
+ import { renderGeometryAsync } from '../render/raster.js';
12
12
  import { renderArgs } from '../render/options.js';
13
13
  import { encodePNG } from '../render/png.js';
14
14
  import { EXPORT_FORMATS, exportFormatFromPath } from '../io/export.js';
15
- import { exportFilesAsync } from '../io/files.js';
15
+ import { publishedOutputs } from '../io/targets.js';
16
+ import { ArtifactStore } from '../host/artifacts.js';
17
+ import { prepareTarget, serializeExport, writeExportFiles, writeTargets } from '../host/export-targets.js';
16
18
  import { evalGroup } from '../core/groups.js';
17
19
  import { Geometry } from '../core/geometry.js';
18
20
  import { verifyTools } from './verify.js';
@@ -55,8 +57,9 @@ function reportText(name, r, extraNotes = []) {
55
57
  const FRAME_PROP = {
56
58
  frame: { type: 'number', description: 'frame to cook at (default 1; frame 1 = time 0, 24 fps). Only time-dependent nodes (solver, @Frame wrangles, "=frame" params) change between frames.' },
57
59
  };
58
- function pngContent(g, o) {
59
- const r = renderGeometry(g, o);
60
+ /** Render to a PNG content block; shading "pbr" reads texture files through the host. */
61
+ async function pngContent(g, o, host) {
62
+ const r = await renderGeometryAsync(g, o, (t) => host.readFile(t));
60
63
  const png = encodePNG(r.rgba, r.width, r.height, (d) => zlib.deflateSync(d, { level: 6 }));
61
64
  return { img: { type: 'image', data: Buffer.from(png).toString('base64'), mimeType: 'image/png' }, notes: r.notes, png };
62
65
  }
@@ -65,30 +68,19 @@ function pngContent(g, o) {
65
68
  * Landscape bundle, or the single file of other formats). Textures are read through the host; USD texture paths are
66
69
  * written relative to the output file. Returns the report text.
67
70
  */
68
- export async function writeExport(geo, format, p, a, host) {
69
- const warnings = [];
70
- const outDir = format === 'unreal_landscape' && !/\.json$/i.test(p) ? p : path.dirname(p);
71
- const res = await exportFilesAsync(geo, format, p, {
72
- upAxis: a.up_axis, scale: a.scale, splitByName: a.split_by_name ?? true, custom: a.custom_attribs,
73
- materials: a.materials, compress: a.compress, quantize: a.quantize, attributes: a.attributes, pcg: a.pcg || a.pcg_struct, pcgStruct: a.pcg_struct,
74
- precision: a.precision, instancing: a.instancing, instances: a.instances, meshes: a.meshes,
75
- layer: a.layer, layers: a.layers, heightMin: a.height_min, heightMax: a.height_max, heightfield: a.heightfield, tile_size: a.tile_size,
76
- deflate: (d) => zlib.deflateSync(d, { level: 6 }),
77
- readFile: (t) => host.readFile(t),
78
- texturePath: (t) => {
79
- const abs = host.resolvePath(t);
80
- return /^[a-z][a-z0-9+.-]*:\/\//i.test(abs) ? abs : path.relative(outDir, abs).split(path.sep).join('/');
81
- },
82
- warn: (m) => warnings.push(m),
83
- });
84
- for (const f of res.files) {
85
- fs.mkdirSync(path.dirname(f.path), { recursive: true });
86
- fs.writeFileSync(f.path, f.bytes);
87
- }
88
- const total = res.files.reduce((s, f) => s + f.bytes.byteLength, 0);
71
+ export async function writeExport(geo, format, p, a, host, record) {
72
+ const res = await serializeExport(geo, format, p, a, host);
73
+ writeExportFiles(res.files);
74
+ if (res.files.length)
75
+ record?.(res.files.map((f) => f.path));
76
+ return exportReport(res.files, res.outDir, format, res.summary, res.warnings);
77
+ }
78
+ /** "wrote <file or N files in dir> (format, KB): summary", then any warnings. */
79
+ function exportReport(files, outDir, format, summary, warnings) {
80
+ const total = files.reduce((s, f) => s + f.bytes.byteLength, 0);
89
81
  const rel = (f) => path.relative(outDir, f).split(path.sep).join('/');
90
- const list = res.files.length === 1 ? res.files[0].path : `${res.files.length} files in ${outDir}: ${res.files.slice(0, 12).map((f) => rel(f.path)).join(', ')}${res.files.length > 12 ? ', …' : ''}`;
91
- return `wrote ${list} (${format}, ${(total / 1024).toFixed(1)} KB): ${res.summary}${warnings.length ? '\nwarnings:\n ' + [...new Set(warnings)].join('\n ') : ''}`;
82
+ const list = files.length === 1 ? files[0].path : `${files.length} files in ${outDir}: ${files.slice(0, 12).map((f) => rel(f.path)).join(', ')}${files.length > 12 ? ', …' : ''}`;
83
+ return `wrote ${list} (${format}, ${(total / 1024).toFixed(1)} KB): ${summary}${warnings.length ? '\nwarnings:\n ' + warnings.join('\n ') : ''}`;
92
84
  }
93
85
  function renderOpts(a, g, label) {
94
86
  const ro = renderArgs(a); // views (presets, persp@az, section), overlays, shading, labels … (src/render/options.ts)
@@ -137,7 +129,8 @@ const RENDER_PROPS = {
137
129
  label_pieces: { type: 'boolean', description: 'number connected pieces (#0, #1, … in connectivity order)' },
138
130
  label_attrib: { type: 'string', description: 'label each distinct value of a string/int attribute (e.g. "name") on its elements; colours match color_by' },
139
131
  legend: { type: 'boolean', description: 'legend for color_by (gradient bar with min/max, or categorical swatches) and highlight' },
140
- shading: { type: 'string', enum: ['default', 'flat', 'matcap', 'ao'], description: 'flat: facets (ignores N); matcap: clay that reads form; ao: screen-space ambient occlusion darkens creases and cavities' },
132
+ shading: { type: 'string', enum: ['default', 'flat', 'matcap', 'ao', 'pbr'], description: 'flat: facets (ignores N); matcap: clay that reads form; ao: screen-space ambient occlusion darkens creases and cavities; pbr: the exported metallic-roughness material (base colour, normal, orm/roughness maps, emissive, unlit) under a fixed studio light rig, deterministic' },
133
+ exposure: { type: 'number', description: 'shading "pbr": exposure in stops (default 0)' },
141
134
  ao_radius: { type: 'number', description: 'shading "ao": sample radius in pixels (default 10)' },
142
135
  look_at: { type: 'array', items: { type: 'number' }, description: 'look-at point [x,y,z] (same as target)' },
143
136
  ortho_scale: { type: 'number', description: 'ortho/section views: world width across a view (default: fit the bbox)' },
@@ -148,13 +141,20 @@ const RENDER_PROPS = {
148
141
  texture: { type: 'string', description: 'adds the "texture" view and picks what it shows: an image name, "image/layer", or a material name (its maps as a labelled strip); "" = every image. A geometry holding only images renders as the texture view by default' },
149
142
  };
150
143
  export function makeTools(ws, opts = {}) {
144
+ // One file per graph node, overwritten by each render: agents render after most edits, so a new file per render
145
+ // would pile up in exports/renders (save_to keeps a copy elsewhere).
146
+ const renderDestination = (name, node) => path.join(ws.exportDir, 'renders', `${name}-${node}`.replace(/[^A-Za-z0-9_.-]/g, '_') + '.png');
151
147
  const engine = ws.engine;
152
148
  /** The text (+ optional render) of a cook report. */
153
- const reportResult = (name, r, a, extraNotes = []) => {
149
+ const reportResult = async (name, r, a, extraNotes = []) => {
154
150
  const content = [{ type: 'text', text: reportText(name, r, extraNotes) }];
155
151
  if (r.geo && a.render) {
156
152
  const ro = renderOpts(typeof a.render === 'object' ? a.render : {}, r.geo, `${name}/${r.target}${atFrame(r)}`);
157
- const { img, notes } = pngContent(r.geo, ro);
153
+ const { img, notes, png } = await pngContent(r.geo, ro, engine.host);
154
+ const renderPath = renderDestination(name, r.target);
155
+ fs.mkdirSync(path.dirname(renderPath), { recursive: true });
156
+ fs.writeFileSync(renderPath, png);
157
+ new ArtifactStore(ws.exportDir).record([renderPath], { graph: name, node: r.target, format: 'png' });
158
158
  content.push(img);
159
159
  if (notes.length)
160
160
  content.push({ type: 'text', text: 'render: ' + notes.join('; ') });
@@ -175,6 +175,35 @@ export function makeTools(ws, opts = {}) {
175
175
  throw new Error(reportText(name, r));
176
176
  return { r, name, geo: r.geo };
177
177
  };
178
+ /** export without a path: the graph's targets (the default output's, a named one's, or all), inside exports/ */
179
+ const exportTargets = async (a) => {
180
+ const name = a.graph ?? a.name ?? 'main', spec = ws.getGraph(name);
181
+ const published = publishedOutputs(name, spec, engine.findOutput(spec).name);
182
+ const hint = (o) => `edit {ops:[{op:"export"${o === undefined ? '' : `, output:"${o}"`}, export:"glb"}]}`;
183
+ let chosen = published;
184
+ if (!a.all) {
185
+ const p = a.output === undefined ? published[0] : published.find((x) => x.output === a.output);
186
+ if (!p)
187
+ return text(`graph "${name}" publishes no output "${a.output}" (outputs: ${published.slice(1).map((x) => x.output).join(', ') || 'none'})`, true);
188
+ if (!p.target)
189
+ return text(`${a.output === undefined ? 'the default output' : `output "${a.output}"`} of "${name}" has no export target: set one with ${hint(a.output)}, or pass path`, true);
190
+ chosen = [p];
191
+ }
192
+ const targets = chosen.filter((p) => p.target);
193
+ if (!targets.length)
194
+ return text(`no output of "${name}" has an export target: set one with ${hint(undefined)}, or pass path`, true);
195
+ const prepared = [];
196
+ for (const p of targets) {
197
+ const r = await ws.cook(name, p.node, a.frame);
198
+ if (!r.ok || !r.geo)
199
+ return text(reportText(name, r), true);
200
+ prepared.push(await prepareTarget(r.geo, name, p, ws.exportDir, engine.host));
201
+ }
202
+ writeTargets(prepared, ws.exportDir);
203
+ const skipped = chosen.filter((p) => !p.target).map((p) => p.label);
204
+ return text(prepared.map((p) => exportReport(p.files, ws.exportDir, p.target.format, `${p.label}: ${p.summary}`, p.warnings)).join('\n')
205
+ + (skipped.length ? `\nno export target (skipped): ${skipped.join(', ')}` : ''));
206
+ };
178
207
  const tools = [
179
208
  {
180
209
  name: 'catalog',
@@ -228,7 +257,7 @@ export function makeTools(ws, opts = {}) {
228
257
  type: 'object',
229
258
  required: ['graph'],
230
259
  properties: {
231
- graph: { type: 'object', description: '{"nodes": {name: {"type", "in", "params"}}, "output": name, "vars": {...}, "params": {var: {"type", "desc", "min", "max", "options", "label", "step"}}}' },
260
+ graph: { type: 'object', description: '{"nodes": {name: {"type", "in", "params"}}, "output": name, "outputs": {id: {"node": name, "label": "Published result", "export": "glb"}}, "export": "glb", "vars": {...}, "params": {var: {"type", "desc", "min", "max", "options", "label", "step"}}}. Publish intended deliverables in outputs; output remains the default. "export" (on the graph for the default output, or on a named output) is where it exports: a format, or {format, path?, ...export options}, written inside exports/ by the viewer\'s Export buttons and export {output} / {all:true}.' },
232
261
  name: { type: 'string', description: 'graph name (default "main")' },
233
262
  mode: { type: 'string', enum: ['replace', 'merge'] },
234
263
  dry_run: { type: 'boolean' },
@@ -259,7 +288,7 @@ export function makeTools(ws, opts = {}) {
259
288
  },
260
289
  {
261
290
  name: 'edit',
262
- description: 'Incrementally edit a graph, then re-cook (only affected nodes recompute). ops: {op:"set",node,params} (null removes a param) · {op:"add",node,type,in,params} · {op:"insert",node,type,params,after} (splice after a node) · {op:"remove",node} (rewires consumers) · {op:"connect",node,in:[...]} or {op:"connect",node,input:1,from:"x"} · {op:"rename",node,to} · {op:"replace",node,type?,params?,in?} · {op:"output",node} · {op:"vars",vars:{k:v}} · {op:"bypass",node,value}.',
291
+ description: 'Incrementally edit a graph, then re-cook (only affected nodes recompute). ops: {op:"set",node,params} (null removes a param) · {op:"add",node,type,in,params} · {op:"insert",node,type,params,after} (splice after a node) · {op:"remove",node} (rewires consumers) · {op:"connect",node,in:[...]} or {op:"connect",node,input:1,from:"x"} · {op:"rename",node,to} · {op:"replace",node,type?,params?,in?} · {op:"output",node} · {op:"vars",vars:{k:v}} · {op:"bypass",node,value} · {op:"export",output?,export} (the export target of a named output, or of the default output without "output": a format "glb" or {format, path?, ...export options}; null removes it).',
263
292
  inputSchema: {
264
293
  type: 'object',
265
294
  required: ['ops'],
@@ -286,13 +315,16 @@ export function makeTools(ws, opts = {}) {
286
315
  },
287
316
  {
288
317
  name: 'inspect',
289
- description: 'Inspect any node\'s output as text: summary; detail "attributes" (min/max/mean, unique strings), "topology" (watertight/manifold, pieces, volume, area, genus), "elements" (list values for a range), or "all".',
318
+ description: 'Inspect any node\'s output as text: summary; detail "attributes" (min/max/mean, unique strings), "topology" (watertight/manifold, pieces, volume, area, genus, render/export triangle health), "elements" (list values for a range), "all", or "uv" (exact uv overlaps with triangle pairs and areas, collapsed / non-finite / out-of-tile triangles, charts, utilization, per-piece texel density with resolution; json:true appends the machine-readable report).',
290
319
  inputSchema: {
291
320
  type: 'object',
292
321
  properties: {
293
322
  graph: { type: 'string', description: 'graph name (default "main")' },
294
323
  node: { type: 'string', description: 'node to inspect (default: graph output)' },
295
- detail: { type: 'string', enum: ['summary', 'attributes', 'topology', 'elements', 'all'] },
324
+ detail: { type: 'string', enum: ['summary', 'attributes', 'topology', 'elements', 'all', 'uv'] },
325
+ uv_attrib: { type: 'string', description: 'detail "uv": the uv attribute (default "uv")' },
326
+ resolution: { description: 'detail "uv": texture size in texels for texel density, n or [width, height]', anyOf: [{ type: 'number' }, { type: 'array', items: { type: 'number' } }] },
327
+ json: { type: 'boolean', description: 'detail "uv": append the report as JSON' },
296
328
  class: { type: 'string', enum: ['point', 'prim', 'vertex', 'detail', 'edge'], description: 'element class; "edge" lists unique edges (point pair, length, polygon count, dihedral angle, edge groups)' },
297
329
  attribs: { type: 'array', items: { type: 'string' } },
298
330
  start: { type: 'number' }, count: { type: 'number' },
@@ -305,7 +337,7 @@ export function makeTools(ws, opts = {}) {
305
337
  const node = r.target;
306
338
  const res = r.results.get(node);
307
339
  const head = `${name}/${node}${atFrame(r)}${res ? ` (${res.cached ? 'cached' : res.ms.toFixed(0) + ' ms'})` : ''}`;
308
- return text(head + '\n' + inspect(geo, { detail: a.detail, cls: a.class, attribs: a.attribs, start: a.start, count: a.count, group: a.group }));
340
+ return text(head + '\n' + inspect(geo, { detail: a.detail, cls: a.class, attribs: a.attribs, start: a.start, count: a.count, group: a.group, uvAttrib: a.uv_attrib, uvResolution: a.resolution, json: a.json }));
309
341
  },
310
342
  },
311
343
  {
@@ -322,13 +354,14 @@ export function makeTools(ws, opts = {}) {
322
354
  },
323
355
  run: async (a) => {
324
356
  const { geo, name, r } = await resolveNodeGeo(a);
325
- const { img, notes, png } = pngContent(geo, renderOpts(a, geo, `${name}/${r.target}${atFrame(r)}`));
357
+ const { img, notes, png } = await pngContent(geo, renderOpts(a, geo, `${name}/${r.target}${atFrame(r)}`), engine.host);
326
358
  const content = [img];
327
359
  const info = [];
328
- if (a.save_to) {
329
- const p = path.resolve(ws.dir, a.save_to);
360
+ {
361
+ const p = a.save_to ? path.resolve(ws.dir, a.save_to) : renderDestination(name, r.target);
330
362
  fs.mkdirSync(path.dirname(p), { recursive: true });
331
363
  fs.writeFileSync(p, png);
364
+ new ArtifactStore(ws.exportDir).record([p], { graph: name, node: r.target, format: 'png' });
332
365
  info.push(`saved ${p}`);
333
366
  }
334
367
  if (notes.length)
@@ -343,10 +376,11 @@ export function makeTools(ws, opts = {}) {
343
376
  description: 'Write a node\'s output to a file: .glb/.gltf (glTF via gltf-transform: materials + texture maps, vertex colours, uv, custom attributes, EXT_mesh_gpu_instancing with per-instance attributes, meshopt compression; best for Unreal/Blender/web), .obj, .usda (PointInstancer with per-instance primvars, UsdPreviewSurface materials), .ply, .stl, .geo (Houdini JSON geometry, every attribute and group, packed prims as PackedGeometry), .csv (point stream; pcg:true for Unreal PCG columns; packed instances = one row per instance + Mesh column + .meshes.json sidecar + one GLB per source), .points.json, .json (lossless topotopo). Relative paths go into the workspace. help {topic:"export"} for details. Heightfields: png16 (.png, 16-bit Unreal Landscape heightmap) or r16 (.r16/.raw) plus a .json sidecar with the height range and the Unreal scale/location, mask_png (8-bit weight layers; param layers), unreal_landscape (a directory: heightmap, every layer, manifest with the exact Landscape import settings, objects.glb and the instance stream). Textures: glb/gltf embed the image textures of materials (texture_to_material) as PNG, usda writes them to <name>_textures/ next to the file, format textures writes every image as <path>/<image>.png (layers: extra layers, or ["*"]).',
344
377
  inputSchema: {
345
378
  type: 'object',
346
- required: ['path'],
347
379
  properties: {
348
380
  graph: { type: 'string', description: 'graph name (default "main")' }, node: { type: 'string', description: 'node to look at (default: the graph output)' },
349
- path: { type: 'string', description: 'e.g. "exports/rock.glb", "exports/trees.csv", "exports/pts.points.json", "exports/terrain.png" (heightmap), "exports/level" (unreal_landscape: a directory), "exports/maps" (textures: a directory)' },
381
+ path: { type: 'string', description: 'e.g. "exports/rock.glb", "exports/trees.csv", "exports/pts.points.json", "exports/terrain.png" (heightmap), "exports/level" (unreal_landscape: a directory), "exports/maps" (textures: a directory). Without path: the graph\'s export targets (output / all), written inside exports/' },
382
+ output: { type: 'string', description: 'without path: export this named output (graph.outputs) to its target; omitted = the default output (graph.export)' },
383
+ all: { type: 'boolean', description: 'without path: export every output of the graph that has an export target' },
350
384
  format: { type: 'string', enum: EXPORT_FORMATS, description: 'default: from the extension (.points.json = pointsjson)' },
351
385
  layer: { type: 'string', description: 'heightmaps: layer to write (png16/r16 default "height", mask_png default "mask")' },
352
386
  layers: { type: 'array', items: { type: 'string' }, description: 'mask_png: layers to write, one PNG each (name_<layer>.png); textures: extra image layers to write as <image>_<layer>.png ("*" = all)' },
@@ -361,6 +395,7 @@ export function makeTools(ws, opts = {}) {
361
395
  materials: { type: 'boolean', description: 'glTF: write materials from the prim "material" attribute + table (default true)' },
362
396
  compress: { type: 'string', enum: ['none', 'meshopt', 'draco'], description: 'glTF: meshopt = EXT_meshopt_compression + quantization; draco needs the optional draco3dgltf package' },
363
397
  quantize: { type: 'boolean', description: 'glTF: KHR_mesh_quantization (smaller, lossy) without compression' },
398
+ tangents: { type: 'string', enum: ['auto', 'preserve', 'none'], description: 'glTF TANGENT: auto (default) = MikkTSpace for normal-mapped materials, a valid supplied "tangent" attribute elsewhere; preserve = the supplied attribute wherever it exists (malformed = error); none = never' },
364
399
  attributes: { type: 'array', items: { type: 'string' }, description: 'csv / points.json: point attributes to write (default all)' },
365
400
  pcg: { type: 'boolean', description: 'csv: Unreal PCG columns (Position/Rotation/Scale/Density/Color/Seed) in Unreal space (Z-up, left-handed, cm)' },
366
401
  pcg_struct: { type: 'boolean', description: 'csv with pcg: Unreal struct-text cells ("(X=…,Y=…,Z=…)") for DataTable import with a row struct' },
@@ -372,13 +407,15 @@ export function makeTools(ws, opts = {}) {
372
407
  },
373
408
  },
374
409
  run: async (a) => {
410
+ if (a.path === undefined)
411
+ return exportTargets(a);
375
412
  const { geo, name, r } = await resolveNodeGeo(a);
376
413
  const p = path.resolve(ws.dir, a.path);
377
414
  const fmt0 = String(a.format ?? exportFormatFromPath(p)).toLowerCase();
378
415
  const ext = ({ png: 'png16', raw: 'r16' }[fmt0] ?? fmt0);
379
416
  if (!EXPORT_FORMATS.includes(ext))
380
417
  throw new Error(`unknown format "${ext}"; use ${EXPORT_FORMATS.map((f) => (f === 'pointsjson' ? '.points.json' : '.' + f)).join(' ')}`);
381
- const report = await writeExport(geo, ext, p, a, engine.host);
418
+ const report = await writeExport(geo, ext, p, a, engine.host, (files) => new ArtifactStore(ws.exportDir).record(files, { graph: name, node: r.target, format: ext }));
382
419
  return text(`${report}\n(from ${name}/${r.target}${atFrame(r)}: ${geo.numPoints} points, ${geo.numPrims} prims)`);
383
420
  },
384
421
  },
@@ -501,10 +538,32 @@ export function makeTools(ws, opts = {}) {
501
538
  if (opts.onPreview) {
502
539
  tools.push({
503
540
  name: 'preview',
504
- description: 'Start (or get the URL of) the live 3D preview web page for humans: orbit view of any graph/node that auto-refreshes after every build/edit. Returns the URL to open in a browser.',
541
+ description: 'Start (or get the URL of) the live viewer for humans: an editor viewport of the workspace (graph menu, an outliner with the graph\'s nodes, single and quad views, the graph\'s params as Controls, input layers and guides) that updates after every build/edit. Returns the URL to open in a browser.',
505
542
  inputSchema: { type: 'object', properties: {} },
506
- run: async () => text(`live preview: ${await opts.onPreview()} (updates automatically on every build/edit; click nodes in the sidebar to view intermediate results)`),
543
+ run: async () => text(`live preview: ${await opts.onPreview()} (updates automatically on every build/edit; click a node in the outliner to see its result)`),
507
544
  });
508
545
  }
546
+ // A person can add files to inputs/ at any time (the viewer's Add input, a drop, the folder). The first answer says
547
+ // what is there, later answers what is new or changed since the last one; the inputs tool's own answer counts.
548
+ let heard = null;
549
+ const inputsNote = (tool) => {
550
+ const files = ws.listInputs(), now = new Map(files.map((f) => [f.path, `${f.size}:${f.mtime}`]));
551
+ const first = heard === null, fresh = files.filter((f) => heard?.get(f.path) !== now.get(f.path));
552
+ heard = now;
553
+ if (tool === 'inputs' || !fresh.length)
554
+ return '';
555
+ const shown = fresh.slice(0, 8).map((f) => `inputs/${f.path} (${f.kind}, ${(f.size / 1024).toFixed(0)} KB)`).join(', ') + (fresh.length > 8 ? `, and ${fresh.length - 8} more` : '');
556
+ return `${first ? `inputs/ holds ${files.length} file(s) from the person` : 'new or changed in inputs/ since your last call'}: ${shown}. inputs {action:"describe", path} tells what one holds.`;
557
+ };
558
+ for (const t of tools) {
559
+ const run = t.run;
560
+ t.run = async (args) => {
561
+ const result = await run(args);
562
+ const note = inputsNote(t.name);
563
+ if (note)
564
+ result.content.push({ type: 'text', text: note });
565
+ return result;
566
+ };
567
+ }
509
568
  return tools;
510
569
  }
@@ -1,5 +1,6 @@
1
1
  import { Image, MAIN_LAYER } from '../core/image.js';
2
- import { averagedVertexNormals, bakeSamples, curvatureEdges, dilate, edgeGrid, idColor, interpolate, normalize3, resolve, triangleTangents, uvIslands, vertexPositions, vertexValues, } from '../core/bake.js';
2
+ import { averagedVertexNormals, bakeSamples, curvatureEdges, dilate, edgeGrid, idColor, interpolate, interpolateCorners, normalize3, resolve, uvIslands, vertexPositions, vertexValues, } from '../core/bake.js';
3
+ import { cornerTangents, loadMikkTSpace, mikkTSpaceReady, shadingFrame } from '../core/tangents.js';
3
4
  import { RayScene, bboxDiagonal } from '../core/analysis.js';
4
5
  import { pointNormals, resolveVertexNormals, triangulate } from '../core/topology.js';
5
6
  import { defineNode } from '../graph/registry.js';
@@ -134,12 +135,28 @@ function rayDirs(b) {
134
135
  normalize3(R);
135
136
  return R;
136
137
  }
137
- /** Point normals of a mesh: its point N when present, else area-weighted face normals. */
138
+ /**
139
+ * Point normals of a mesh: its point N when present, else area-weighted face normals. Points whose N is zero or not
140
+ * finite take the computed normal: a merge of parts with and without N fills the missing ones with zeros, which would
141
+ * bake as grey.
142
+ */
138
143
  function pointNormalsOf(g) {
139
144
  const a = g.points.get('N');
140
- if (a && a.type === 'float' && a.size === 3)
141
- return a.data;
142
- return pointNormals(g);
145
+ if (!a || a.type !== 'float' || a.size !== 3)
146
+ return pointNormals(g);
147
+ const N = a.data;
148
+ let out = null, computed = null;
149
+ for (let i = 0; i < N.length; i += 3) {
150
+ const l = Math.hypot(N[i], N[i + 1], N[i + 2]);
151
+ if (l > 1e-12 && Number.isFinite(l))
152
+ continue;
153
+ out ??= N.slice();
154
+ computed ??= pointNormals(g);
155
+ out[i] = computed[i];
156
+ out[i + 1] = computed[i + 1];
157
+ out[i + 2] = computed[i + 2];
158
+ }
159
+ return out ?? N;
143
160
  }
144
161
  /** andThen() for a callback that may itself return a promise (a cook result); keeps synchronous runs synchronous. */
145
162
  const chain = (x, f) => (x instanceof Promise ? x.then(f) : f(x));
@@ -382,9 +399,11 @@ defineBake({
382
399
  type: 'bake_normal',
383
400
  summary: 'Bake a tangent-space normal map from a high-res mesh (input 1) onto the uv of the low mesh: OpenGL or DirectX.',
384
401
  description: 'Substance Painter / Marmoset "Normal". ' + BAKE_DOC + 'For each texel a ray from cage above the low surface along -N finds ' +
385
- 'the high-res surface (within cage below); its interpolated normal is written in the low mesh\'s tangent frame (N ' +
386
- 'interpolated, T from the uv per triangle, B by handedness) as 0.5 + 0.5 n. Misses and a missing input 1 give the ' +
387
- 'flat (0.5, 0.5, 1). glTF and Blender read OpenGL; Unreal DirectX (or flip green on import).',
402
+ 'the high-res surface (within cage below); its interpolated normal is written in the low mesh\'s MikkTSpace tangent ' +
403
+ 'frame as 0.5 + 0.5 n: the frame glTF export writes as TANGENT and Blender, Unreal and Unity compute, so the map ' +
404
+ 'decodes the same everywhere (N interpolated and normalised, T the interpolated MikkTSpace tangent made ' +
405
+ 'perpendicular to N, B = w · N × T). Misses and a missing input 1 give the flat (0.5, 0.5, 1). glTF and Blender ' +
406
+ 'read OpenGL; Unreal DirectX (or flip green on import).',
388
407
  aliases: ['normal_bake', 'bake_tangent_normal', 'bake_normal_map'],
389
408
  params: {
390
409
  ...BAKE_PARAMS('normal'),
@@ -415,36 +434,37 @@ defineBake({
415
434
  ctx.warn(`${ctx.type}: no high-res mesh on input 1: the map is flat (0.5, 0.5, 1)`);
416
435
  return finish(b, out, 4, [0.5, 0.5, 1, 1]);
417
436
  }
418
- const tan = triangleTangents(b.g, b.uv, b.tris);
419
437
  const dx = p.format === 'directx' ? -1 : 1;
420
- return andThen(onHigh(b, high), (h) => {
421
- for (let i = 0; i < n; i++) {
422
- if (!(h.D[i] === h.D[i]))
423
- continue;
424
- const t = b.s.tri[i];
425
- const nx = b.N[i * 3], ny = b.N[i * 3 + 1], nz = b.N[i * 3 + 2];
426
- let tx = tan.T[t * 3], ty = tan.T[t * 3 + 1], tz = tan.T[t * 3 + 2];
427
- const d = tx * nx + ty * ny + tz * nz;
428
- tx -= nx * d;
429
- ty -= ny * d;
430
- tz -= nz * d;
431
- const tl = Math.hypot(tx, ty, tz);
432
- if (!(tl > 1e-12))
433
- continue;
434
- tx /= tl;
435
- ty /= tl;
436
- tz /= tl;
437
- const sg = tan.sign[t];
438
- const bx = (ny * tz - nz * ty) * sg, by = (nz * tx - nx * tz) * sg, bz = (nx * ty - ny * tx) * sg;
439
- const hx = h.N[i * 3], hy = h.N[i * 3 + 1], hz = h.N[i * 3 + 2];
440
- const u = hx * tx + hy * ty + hz * tz, v = hx * bx + hy * by + hz * bz, w = hx * nx + hy * ny + hz * nz;
441
- const l = Math.hypot(u, v, w) || 1;
442
- out[i * 4] = 0.5 + (0.5 * u) / l;
443
- out[i * 4 + 1] = 0.5 + (0.5 * v * dx) / l;
444
- out[i * 4 + 2] = 0.5 + (0.5 * w) / l;
438
+ const bakeWith = () => {
439
+ // the same vertex normals (cusp 60°) and uv the exporter writes, so the frame matches the exported TANGENT
440
+ const { tangents, diag } = cornerTangents(b.g, b.tris, resolveVertexNormals(b.g, 60), b.uv);
441
+ if (diag.uvDegenerate || diag.uvNonFinite)
442
+ ctx.warn(`${ctx.type}: ${diag.uvDegenerate + diag.uvNonFinite} of ${diag.triangles} triangles have collapsed or non-finite uvs: no tangent frame there (flat texels)`);
443
+ const T = interpolateCorners(b.s, tangents, 4), f = new Float64Array(9);
444
+ const collapsed = new Uint8Array(diag.triangles);
445
+ for (let t = 0; t < diag.triangles; t++) {
446
+ const u0 = b.uv[b.tris[t * 3] * 2], v0 = b.uv[b.tris[t * 3] * 2 + 1];
447
+ const du1 = b.uv[b.tris[t * 3 + 1] * 2] - u0, dv1 = b.uv[b.tris[t * 3 + 1] * 2 + 1] - v0, du2 = b.uv[b.tris[t * 3 + 2] * 2] - u0, dv2 = b.uv[b.tris[t * 3 + 2] * 2 + 1] - v0;
448
+ if (!(Math.abs(du1 * dv2 - du2 * dv1) > 0))
449
+ collapsed[t] = 1;
445
450
  }
446
- return finish(b, out, 4, [0.5, 0.5, 1, 1]);
447
- });
451
+ return andThen(onHigh(b, high), (h) => {
452
+ for (let i = 0; i < n; i++) {
453
+ if (!(h.D[i] === h.D[i]) || collapsed[b.s.tri[i]])
454
+ continue;
455
+ if (!shadingFrame(b.N[i * 3], b.N[i * 3 + 1], b.N[i * 3 + 2], T[i * 4], T[i * 4 + 1], T[i * 4 + 2], T[i * 4 + 3], f))
456
+ continue;
457
+ const hx = h.N[i * 3], hy = h.N[i * 3 + 1], hz = h.N[i * 3 + 2];
458
+ const u = hx * f[0] + hy * f[1] + hz * f[2], v = hx * f[3] + hy * f[4] + hz * f[5], w = hx * f[6] + hy * f[7] + hz * f[8];
459
+ const l = Math.hypot(u, v, w) || 1;
460
+ out[i * 4] = 0.5 + (0.5 * u) / l;
461
+ out[i * 4 + 1] = 0.5 + (0.5 * v * dx) / l;
462
+ out[i * 4 + 2] = 0.5 + (0.5 * w) / l;
463
+ }
464
+ return finish(b, out, 4, [0.5, 0.5, 1, 1]);
465
+ });
466
+ };
467
+ return mikkTSpaceReady() ? bakeWith() : loadMikkTSpace().then(bakeWith);
448
468
  },
449
469
  });
450
470
  defineBake({
@@ -11,8 +11,9 @@ defineNode({
11
11
  'for a chamfer (triangle at a box corner), rings of quads for round bevels (a sphere octant at a box corner). A ' +
12
12
  'bevelled edge ending at an unbevelled point slides its offset along the neighbouring edges and ends flush; two ' +
13
13
  'bevelled edges meeting at a point with one other edge (a cylinder rim) are mitred. Boundary and non-manifold edges ' +
14
- 'are skipped with a warning (chamfering open-mesh boundary edges is out of scope). clamp scales all offsets down just ' +
15
- 'enough that no face edge collapses past another (huge offsets stay clean). Point mode truncates the selected points: ' +
14
+ 'are skipped with a warning (chamfering open-mesh boundary edges is out of scope). clamp shrinks the offsets only ' +
15
+ 'around edges that would cross (huge offsets stay clean; one short edge does not flatten every bevel), and leaves an ' +
16
+ 'edge sharp when a zero-length neighbour leaves no room. Point mode truncates the selected points: ' +
16
17
  'every edge at the point is cut at "offset", the corner becomes a polygon, or a dome of "divisions" rings. Faces keep ' +
17
18
  'their attributes (uv is interpolated inside each face), strips take prim attributes from the larger neighbouring face, ' +
18
19
  'corner patches from the first face around the point; N is recomputed if present. Select edges with patterns: ' +
@@ -29,7 +30,7 @@ defineNode({
29
30
  mode: { type: 'enum', options: ['edges', 'points'], default: 'edges', desc: 'bevel edges, or truncate points', aliases: ['bevel_type', 'class'] },
30
31
  offset: { type: 'float', default: 0.1, min: 0, desc: 'distance from the edge across each adjacent face (points mode: along each edge)', aliases: ['distance', 'width', 'radius', 'size', 'amount'] },
31
32
  offset_mode: { type: 'enum', options: ['distance', 'fraction'], default: 'distance', desc: 'distance = offset in scene units; fraction = offset x the shortest edge at the edge\'s points (stays proportional on small faces)', aliases: ['distance_mode', 'offsetmode'] },
32
- clamp: { type: 'bool', default: true, desc: 'scale all offsets down by one factor, just enough that no bevel crosses its neighbours (Houdini Clamp Offset); warns when it does', aliases: ['clamp_offset', 'clamp_overlap'] },
33
+ clamp: { type: 'bool', default: true, desc: 'shrink the offsets where bevels would cross their neighbours, only at the edges involved (Houdini Clamp Offset, applied locally); warns when it does', aliases: ['clamp_offset', 'clamp_overlap'] },
33
34
  divisions: { type: 'int', default: 0, min: 0, max: 64, desc: '0 = flat chamfer (one strip of quads per edge); n = round profile with n+1 strips', aliases: ['segments', 'divs', 'subdivisions'] },
34
35
  shape: { type: 'float', default: 0, min: -1, max: 1, desc: 'profile convexity for round bevels: 0 = circular arc, 1 = bulges out to a nearly square corner, -0.5 = straight, -1 = concave cove', aliases: ['profile_shape', 'convexity', 'profile'] },
35
36
  },
@@ -83,8 +83,9 @@ defineNode({
83
83
  function scriptLib(ctx, wake, run) {
84
84
  const engine = ctx.engine;
85
85
  // compiled in the script realm: a synchronous node's result resolves a realm promise, so `await lib.run(...)`
86
- // continues inside the same time-limited call; only async nodes hand back an outside promise (then: wake)
87
- const realmAsync = engine.host.compile('(function(f){ return async function run(...a) { return f(...a); }; })');
86
+ // continues inside the same time-limited call; an async node hands back its outcome (see run below), which the
87
+ // realm awaits and turns back into the node's value or error
88
+ const realmAsync = engine.host.compile('(function(f){ return async function run(...a) { const r = f(...a); if (r && r.libRunOutcome) { const o = await r.libRunOutcome; if (o.failed) throw o.error; return o.value; } return r; }; })');
88
89
  return {
89
90
  Geometry, GeoBuilder, math, topology, random,
90
91
  noise: { makeNoise, fractal, makeCurl },
@@ -134,10 +135,35 @@ function scriptLib(ctx, wake, run) {
134
135
  node: `${ctx.node}/${type}`, type: def.type, p: rp.values, inputs,
135
136
  input: (i) => inputs[i] ?? new Geometry(), hasInput: (i) => !!inputs[i], inputSigs: inputs.map(() => 'script'),
136
137
  });
137
- const r = def.cook(sub);
138
- if (r && typeof r.then === 'function')
139
- r.then(wake, wake);
140
- return r;
138
+ // The script's time limit can stop it anywhere, also between starting an async node and listening to it: that
139
+ // node's promise would then reject later with nobody listening, which ends the process (MCP server included).
140
+ // So an async node's promise is awaited right inside `outcome`, with no call in between that the limit could
141
+ // stop, and `outcome` never rejects. A synchronous node returns (or throws) here, as before.
142
+ let started, thrownNow = null;
143
+ const isAsync = () => !!started && typeof started.then === 'function';
144
+ const outcome = (async () => {
145
+ try {
146
+ started = def.cook(sub);
147
+ // property reads only from here to the await: a function call is where the limit could stop the script
148
+ if (!started || typeof started.then !== 'function')
149
+ return null;
150
+ return { value: await started };
151
+ }
152
+ catch (error) {
153
+ if (!isAsync()) {
154
+ thrownNow = { error };
155
+ return null;
156
+ }
157
+ return { failed: true, error };
158
+ }
159
+ finally {
160
+ if (isAsync())
161
+ wake();
162
+ }
163
+ })();
164
+ if (thrownNow)
165
+ throw thrownNow.error;
166
+ return isAsync() ? { libRunOutcome: outcome } : started;
141
167
  }),
142
168
  warn: (m) => ctx.warn(String(m)),
143
169
  };
@@ -203,7 +229,7 @@ defineNode({
203
229
  run.stopped = true;
204
230
  }
205
231
  // what the script returned is user code too: `instanceof` (and Object.getPrototypeOf) run a Proxy's
206
- // getPrototypeOf trap here, outside the time limit, so only the engine's brand check looks at it (R-18)
232
+ // getPrototypeOf trap here, outside the time limit, so only the engine's brand check looks at it
207
233
  const bad = notGeometry(res);
208
234
  if (bad)
209
235
  throw new NodeError(`script must return a Geometry (got ${bad})`, 'return geo, a geometry from lib.run, or one built with lib.GeoBuilder / new lib.Geometry()');
@@ -271,6 +271,13 @@ defineNode({
271
271
  const a = ((a0 + (90 * k) / s) * Math.PI) / 180;
272
272
  pts2.push([cx + r * Math.cos(a), cy + r * Math.sin(a)]);
273
273
  }
274
+ // a radius of half the width or depth makes neighbouring arcs meet: keep their shared end point once
275
+ const eps = 1e-9 * Math.max(hw, hd);
276
+ for (let i = pts2.length - 1; i >= 0 && pts2.length > 3; i--) {
277
+ const q = pts2[(i + 1) % pts2.length];
278
+ if (Math.abs(pts2[i][0] - q[0]) <= eps && Math.abs(pts2[i][1] - q[1]) <= eps)
279
+ pts2.splice(i, 1);
280
+ }
274
281
  break;
275
282
  }
276
283
  case 'ngon':
@@ -463,7 +463,7 @@ defineNode({
463
463
  example: { type: 'point_grid', params: { counts: [10, 1, 10], size: [9, 0, 9], jitter: 0.3, seed: 1 } },
464
464
  cook: ({ p }) => {
465
465
  const [cx, cy, cz] = p.counts;
466
- // each count has a max, but not their product (R-17 N4: a huge grid ran the process out of heap)
466
+ // each count has a max, but not their product (a huge grid ran the process out of heap)
467
467
  if (cx * cy * cz > MAX_GRID_POINTS)
468
468
  throw new NodeError(`point_grid: counts [${cx}, ${cy}, ${cz}] give ${(cx * cy * cz).toLocaleString('en-US')} points, more than ${MAX_GRID_POINTS.toLocaleString('en-US')}`, 'lower the counts, or scatter points instead');
469
469
  const r = rng(p.seed);
@@ -0,0 +1 @@
1
+ export {};