@womp/spark-agent 17.7.0 → 17.7.2

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 CHANGED
@@ -4,6 +4,23 @@ Notable changes to `@womp/spark-agent`, newest first. Versions follow
4
4
  [Semantic Versioning](https://semver.org/). Add an entry with each version bump; describe what
5
5
  changed for hosts and users, and how to migrate across breaking changes.
6
6
 
7
+ ## 17.7.2 — 2026-11-24
8
+
9
+ ### Changed
10
+
11
+ - Choose editable outlines or swept profiles from the target geometry. Teach the scene-editing
12
+ skill to fit long Bézier spans with deliberate handles and verify contour, cross-sections and
13
+ material transitions between anchors. Include a two-anchor bend and guidance for refitting
14
+ an existing curve.
15
+
16
+ ## 17.7.1 — 2026-11-22
17
+
18
+ ### Changed
19
+
20
+ - Consolidate Curve authoring in the scene-editing skill. Prefer sparse curves for forms defined by a
21
+ path and changing cross-sections, fit Bézier handles and per-axis profiles, and tune sampling from
22
+ visible defects. Add a worked three-anchor strap with a tapered profile and a 30° end roll.
23
+
7
24
  ## 17.7.0 — 2026-11-19
8
25
 
9
26
  ### Changed
@@ -39,7 +39,7 @@ export function createSceneCapability(host) {
39
39
  skills: [
40
40
  {
41
41
  name: "scene-editing",
42
- version: "69",
42
+ version: "76",
43
43
  description: "Inspect the open scene and edit its objects, materials, curves, and environment.",
44
44
  instructions: `Use womp.scene.access(callback) for both inspection and edits. Inspect targets inside each callback using scene.nodes({ name, type, parentId, ids, offset, limit }) and detailed getters; filters are optional, name is a case-insensitive substring, and results default to 100 (maximum 1000). Page with offset as needed. Inspection reflects changes made in the callback. scene.unitMultiplier gives project units. Do not reuse an earlier inspection as current state.
45
45
  Use womp.scene.health() to refresh whole-scene health or womp.scene.health(objectIds) to check specific objects (mapped to their owning Areas).
@@ -64,19 +64,21 @@ cameraReadDepthOfField() inspects the current camera. cameraSetDepthOfField({ena
64
64
  For text, nodeSetTextSize(id, {fontSize, depth}) sets font em size and extrusion in project units, not a bounding box. Layout width and additional letter spacing also use project units; spacing clamps to ±25 mm. Line height is a multiplier clamped to 0.5–3. The origin anchors the first baseline; alignment uses the layout width. Empty text clears its geometry.
65
65
  Decals require an existing loaded image and receiving geometry. Projection is a uniform cube: native scale.x (public size.z) controls all dimensions, not independent width/height/depth. Restriction to an Area requires that parent Area; root decals project globally. Missing image data can yield no projection even when no resource is pending.
66
66
  nodeCreate(SVG, parentAreaId) creates an editable SVG node. Set structured paths with nodeSetSvgPaths(id, paths) and read them with nodeGetSvgPaths(id). Each path has closed and at least two segments; point, handleIn and handleOut are 2D vectors in project units, with handles relative to their point. SVG coordinates are local to the node, with y up. Unrotated SVG geometry lies in the node's Y–Z plane facing ±X; nodeSetRot(id, {x: 0, y: -90, z: 0}) faces it toward +Z with path x to the right. Fill uses the nonzero rule: a contour wound opposite to its enclosing contour cuts a hole, and same-direction overlaps merge. nodeSetSvgDepth(id, depth) sets normal extrusion in project units, including the parent Area scale; nodeGetSvgDepth reads it back. Native local depth must be 0.01–1000 mm. Generic nodeSetSize does not set this depth. SVG nodes have no round or color property; color them with a material. Inspect the visible result before claiming holes or exact thickness.
67
- nodeCreate(Curve, parentId) creates an empty curve with zero blend. curvePointAdd(curveId, point, index?) returns the new index; omit index to append or supply an integer from 0 through point count to insert before that position.
68
- Point defaults: position/rotation/handles zero, profile size {x:1,y:1,z:1} in project units, the curve's material, fixed false, round 0. Pass {} for defaults.
69
- Removing all points is supported. One point renders a single profile primitive, not a path.
70
- New curves are V3 Bezier curves unless the run disables Curve V3; then they are V2 splines whose points are control points without handles, and handle calls fail.
71
- On a Bezier curve, points are anchors: the span from anchor A to anchor B is the cubic through A, A + handleOut(A), B + handleIn(B), B. Handles are offsets from their anchor in the curve frame and project units; pass them to curvePointAdd or set them later. Zero handles make a straight span.
72
- Use the fewest anchors that reproduce the shape: ends, corners, inflections, and where profile size, rotation or material must change. Bend the spans between them with handles instead of adding closely spaced anchors, and remove anchors that handles make redundant. A smooth join has opposite, collinear handles. Close a loop with curveSetClosed rather than repeating its first anchor.
73
- Handle lengths decide how few anchors suffice, so for a path given by a formula or a traced outline, sample it with a few hundred points (at most 2000) and call curveFit(points, {tolerance?, closed?}): it returns the fewest anchors {pos, handleIn, handleOut, index} within tolerance, keeping sharp turns as corners; index is the sample each anchor sits on. Pass each anchor to curvePointAdd in order. It is pure math in the points' own units and frame. Omit tolerance: the default, 0.2% of the points' extent, is already finer than renders and prints resolve, and anything under 0.1% is refused because it only adds anchors.
74
- Curves render sampled profiles, not a continuous sweep: the curve's blend fuses its samples into one surface and joins the curve to what came before it. nodeSetDensity(curveId, 250) is the finest sampling; higher values change nothing.
75
- For a smooth loft, such as a limb, a pant leg, a tail or a body, give the curve an Ellipsoid profile and make each anchor a thin slice along the path: its y, the slice thickness, about 0.15 of its width, and its rotation turning y along the path. Ellipsoid samples are spaced by their thinnest side, so thin slices sample densely. Then set the curve's blend to 1 to 2 mm: less leaves visible ridges. The blend adds to the loft's size, widening it by about the blend radius and lengthening each end by about half of it, so make the profiles that much smaller than the measured widths; a large blend swells the form and melts the details on it. Cylinder and Sphere profiles are spaced by their diameter and stay ridged. A thin rail, wire or trim keeps a blend of a few millimetres so it stays thin. Shape a rolled cuff or sloped hem with the loft's own end anchors, not a separate curve, ring or cut: stack three or four anchors close together at the end, the lowest ones thicker, tilt them all about 20° from front to back so the end drops at the back, then continue the loft level. The tilt's sign depends on which way the loft faces, so check the slope in a side view.
67
+
68
+ ## Curve authoring
69
+ - Choose the construction by the geometry. Use standalone primitives for simple volumes. For a custom planar outline at constant thickness, extrude the closed SVG contours once, using as few Bézier spans as each contour needs. For a form defined by a path and cross-sections, try one editable V3 Curve when a single profile type can describe the sections along it. Use intersected SVG outlines where independent projected contours define the shape, and Boolean cuts or joins for cross-sections that need several shapes.
70
+ - Choose the profile by its cross-section. Each curve blends samples of one primitive type. Set it with nodeSetPrimType before adding points. Use Cube for broad flat faces. Use Ellipsoid for rounded sections or flatten one axis for a broad thin section with a soft edge. Sphere uses size.x as a uniform diameter when creating or resizing points. Use separate curves where the primitive type changes.
71
+ - Size and orient each profile. For Cube and Ellipsoid, set the sample length along the path, transverse width and thickness independently in project units with curvePointAdd's size or curvePointSetSize. Orient the profile for the intended cross-section and face normal. Change roll about the path to twist a broad face. Set the end profile to follow a sloped end, then check the slope from the side. Size and rotation ease between anchors independently of the handles. Keep the curve-node scale at its default while sizing points.
72
+ - Plan V3 curves with the fewest anchors and simplest handles that fit the intended form. Start an open curve with its endpoints and add controls only where the path, cross-section, roll or material needs independent adjustment. Fit each span across as many measured stations as its handles allow. Use crowns and inflections inside a span as checkpoints when the span can carry them. A span from A to B uses A, A + handleOut(A), B + handleIn(B), B. These handle offsets use the curve frame and project units. Aim the outgoing handle along the departure tangent and the incoming handle back along the arrival tangent. At a smooth join, choose one unit tangent T and set handleOut = T * outgoingLength and handleIn = -T * incomingLength. Fit both positive lengths independently across their spans. Two zero handles make a straight span.
73
+ - Worked V3 bend. A quarter turn of radius 30 mm in XY from (0, 0, 0) to (30, 30, 0) departs along +X and arrives along +Y. Set handleOut at the start to (16.57, 0, 0) mm and handleIn at the end to (0, -16.57, 0) mm, converted to project units. The midpoint of the span is about (21.21, 8.79, 0) mm and serves as a fit checkpoint. Use two anchors with the same Sphere diameter for a constant circular profile along this bend.
74
+ - Fit densely traced V3 paths in script memory before laying out anchors. Use curveFit(points, {tolerance?, closed?}) on ordered samples in the curve's own frame and units. For an existing Bézier, sample along the evaluated spans to capture its shape between the old anchors. The fitter accepts up to 2000 samples and returns {pos, handleIn, handleOut, index}. Use index to recover profile measurements when available, then check the eased cross-sections between anchors. Choose positional tolerance for the visible contour and nearby clearances. The default is 0.2% of the samples' extent and the minimum is 0.1%. For a loop, pass closed: true to curveFit and close the authored curve with curveSetClosed.
75
+ - Tune sampling after the contour and cross-sections are right. Generated primitive count depends on path length, profile size and density as well as the authored spans. V3 spacing uses Sphere diameter, Cylinder width or the smallest dimension of Cube or Ellipsoid, so thinner slices can generate more primitives. For rounded Ellipsoid lofts, axial length near 0.15 of transverse width and blend near 0.2 of that width are starting values. For a wide thin section, choose blend relative to its thickness and clearances, then check the edge and face. Blend takes local millimetres before parent scaling. Curve blend fuses its samples and can also join the curve to earlier geometry in the Area. Evaluate at the existing density first. For beading, gaps or bands, check orientation, axial length, overlap and blend. Raise nodeSetDensity for visible undersampling when the Area has headroom. Density is capped at 250 and native primitive budgets also limit sampling. Extra overlap or blend can swell surfaces and close gaps.
76
+ - Check the fit before detailing. When adjacent V3 spans share a smooth sweep and their intermediate anchors appear redundant, test a longer fit in script memory. Use curveFit on the sampled path or fit the handles across the combined span directly. Compare the centerline and eased profiles at intermediate stations before editing. Keep the simplest fit that preserves the intended silhouette, depth, taper, roll, material transitions and clearances. After applying a refit, check the affected area and joins from a matching and an oblique view. Add an anchor only when a visible or measured mismatch needs independent control after adjusting the existing handles and profiles. For a profile-only change, subdivide the fitted cubic at the new anchor to preserve its path.
77
+ - API details. nodeCreate(Curve, parentId) creates an empty curve with zero blend. curvePointAdd returns the inserted index. Omit the index to append, or pass an integer from zero through the point count to insert before it. Pass {} for a point with zero position, rotation and handles, size {x:1,y:1,z:1} in project units, the curve's material, fixed false and round 0. Zero points are allowed and one point gives a single primitive. New curves use V3 Bezier unless the run disables it, in which case they use V2 spline control points. V1/V2 node transforms are read-only, so edit their points. Handles, closure and the strap example below require V3.
78
+
79
+ ## Area settings, transforms and materials
76
80
  nodeSetUnionResolution(unionId, resolution) sets a dimensionless detail level, clamped to 0.01–0.65: higher is finer and costs more voxels. Set the owning outermost Area, not a nested Union. Material emission ranges from 0 to 1.
77
81
  nodeSetBlend and mirror goop take radii in millimetres before parent scaling, regardless of project units, and clamp to 0–500 mm. This does not apply to the FlowIR Boolean Blend port, which takes native units; the geometry-nodes skill gives its conversion.
78
- V1/V2 curve transforms are read-only;
79
- edit their points instead. Handles and closure are available only on V3 Bezier curves.
80
82
  Typed rotations are right-handed intrinsic XYZ Euler degrees, relative to the parent (R = Rx Ry Rz), including curve points and mirrors.
81
83
  Points and curve mirrors use the owning curve frame; primitive mirrors use the primitive's parent frame.
82
84
  lookAt(origin, target) aligns local +Z; both points must be in the same parent-local space. For a segment along a different local axis,
@@ -96,9 +98,9 @@ Groups are organizational only; move and rotate their child Areas individually,
96
98
  An Area is an outermost Union with no Union ancestor: it has its own modeller, bounds, and volumetric resolution. Nested Unions share that Area's resolution, even through Groups.
97
99
  Choose Area boundaries for evaluation needs, not individual editability: parts within an Area remain independently editable. Sibling Areas under a Group can overlap without blending together, while each blends internally and has independent resolution. Keep required shared smooth joins or Boolean evaluation within one Area; overlapping independent Areas are not a watertight Boolean union. Build each continuous surface in one Area with its parts blended, such as a garment with its sleeves, trousers with both legs and the seat, or a body with its limbs: parts in separate Areas never blend, so splitting them leaves a visible seam where they meet.
98
100
  Prioritize requested visual fidelity over minimizing voxel use. An Area too coarse for its detail renders jagged or stair-stepped edges, lumpy flat faces, rounded-off corners, blurred or merged small features, and thin parts that break up or vanish. Wide views hide this: judge detail from a close-up where the smallest important features fill much of the frame. When correctly authored geometry shows these symptoms, increase its owning Area's resolution, up to 0.65 as needed, and compare the same close-up; distinguish sampling loss from material/lighting contrast or authored gaps. A higher voxel count is acceptable when detail improves within engine limits. If resolution is insufficient or hits resource limits/downscaling, consider smaller independent Areas where shared blending or Booleans are unnecessary.
99
- Sphere uses size.x as uniform diameter (y/z do not stretch it), including new or resized spherical curve points. Ellipsoid uses x, y and z as its three diameters: use it for oval and organic forms, such as a head, a limb, a fish body or a shoe toe, and as the profile of a curve whose sections are oval; a rounded Cube keeps flat faces and reads as a box, so never use one for a soft or rounded part: a rolled cuff, hem or band around a limb is a Torus or a short Ellipsoid loft. Build a character or any soft, moulded or organic form, including its shoes and soles, only from Ellipsoids, curves and SVG outlines; keep Cubes for machined, flat-faced parts, such as a buckle, a crate or a wall. Capsule is a cylinder with round ends, x its diameter and y its full height. Cylinder/Cone/Pyramid use x as base diameter/width and y as height;
100
- Torus lies in local XZ (axis +Y), with x as outer diameter and y as tube thickness. For Capsule and these four primitives, nodeSetSize accepts {x, y}; z follows x even when supplied. Cube and Ellipsoid use all three dimensions; Ellipsoid supports independent XYZ sizes for both primitives and curve-point profiles. Node and curve-point round are dimensionless fractions clamped to [0, 1], not radii in project units; rounding does not set size. Cube rounding reaches half its shortest dimension at 1, so a shallow Cube retains broad flat faces rather than becoming an ellipsoid.
101
- Womp shapes are signed distance fields. Build the way Womp's library assets are made: many small parts, each with a clear role and its own material, fused, carved and shaped with field operations rather than stacked as plain primitives.
101
+ Sphere uses size.x as a uniform diameter. Use an Ellipsoid for a simple rounded volume with independent dimensions, such as a head, a fish body or a shoe toe. Use Cube where the part needs flat faces, such as a buckle, a crate or a wall. Capsule is a cylinder with round ends, x its diameter and y its full height. Cylinder/Cone/Pyramid use x as base diameter/width and y as height;
102
+ Torus lies in local XZ (axis +Y), with x as outer diameter and y as tube thickness. For Capsule and these four primitives, nodeSetSize accepts {x, y}; z follows x even when supplied. Cube and Ellipsoid use all three dimensions. Node and curve-point round are dimensionless fractions clamped to [0, 1], not radii in project units; rounding does not set size. Cube rounding reaches half its shortest dimension at 1, so a shallow Cube retains broad flat faces rather than becoming an ellipsoid.
103
+ Womp shapes are signed distance fields. Build continuous main forms with fitted geometry, then add distinct parts and materials where they describe visible structure. Use field operations to fuse, carve and shape their interfaces.
102
104
  - Fuse parts that grow out of each other, such as a head into a neck, a limb into a torso or a handle into a pot, with nodeSetBlend on the joining part. A blend reaches only what was built before that part in the same Area. Start it at about a third of the thinner part's thickness, then judge the join in a close-up: too much dissolves small parts into lumps and swells rims, too little leaves a hard crease. To blend a curve into a body without changing its own smoothing, put it in its own Union inside the body's Area and set that Union's blend. Build a hand as a palm, a thumb and four fingers, posed as in the image even when curled into a fist or holding something: each finger a short curve from knuckle to tip; put the fingers and thumb in their own Union with no blend between them and set that Union's blend to fuse them into the palm, so they join the palm without melting into each other; and the wrist starting inside its sleeve or cuff.
103
105
  - Keep a crisp seam, blend 0, where two colours or a panel gap meet. Make windows, lights and lenses real parts, not paint. Glaze an opening with real glass, a material with transmittance about 0.5, as a thin panel or SVG outline set at the true angle and curvature of the surface it fills, flush in a thin frame, with a simple interior behind it, such as seats and a dashboard, so it reads as glass rather than a black plate. Use Stain sparingly, only for markings that lie flat on a surface, such as a stripe, a logo or an animal's coat pattern: a Stain shape (nodeSetOp with OperationType.Stain) placed after the geometry recolours the surface inside it and leaves the shape unchanged.
104
106
  - Shape each small detail as a miniature of the real part, never a placeholder block or disc: its real outline, housing and inner face, such as a mirror's shaped housing on its arm or a vent carved with fins inside. Place it where the real one is and keep it clear of neighbouring parts, such as a wheel or a door line.
@@ -107,18 +109,18 @@ Womp shapes are signed distance fields. Build the way Womp's library assets are
107
109
  - Build an upper volume such as a cabin, canopy, helmet or lid as one solid in the body's colour, shaped and blended onto the body, then set its windows or openings into it with Subtract cuts or thin inset panels. A core of another colour capped with a separate slab reads as stacked parts.
108
110
  - Put a sub-assembly that joins or cuts as one unit in a nested Union: its blend fuses the whole unit to what came before, and a Subtract Union cuts all its children at once, such as every window of a cabin.
109
111
  - Model one side of a symmetric object and mirror it: nodeSetMirror(id, slot, axis, planePosition) reflects a Primitive or Curve across a plane in its parent frame, so one wheel, eye, fender or wing makes the pair and later edits stay symmetric.
110
- - Shape a flowing main mass, such as a car body, hull, fuselage, torso, head or beak, as one curve lofted along its length: each anchor's profile size {x, y, z} is the cross-section there, so 4 to 8 anchors of changing width and height, joined by long handles, give one smooth tapering form instead of a stack of boxes.
111
- - Shape a mass whose outline is its character, and differs from above and from the side, from those real outlines, such as a shoe sole, a hull, a blade or a guitar body: draw the outline seen from above as one closed SVG path, asymmetric where the real one is, and extrude it through the height; after it, draw the side outline as a second SVG facing sideways, extruded through the width, with OperationType.Intersect. The result has both true silhouettes, which a loft along a centre line cannot give, and a blend of a few millimetres on the Intersect node rounds its edges. Intersect the parts that sit on it, such as a shoe's upper, with the same outline so they follow it.
112
+ - For a hollow or recess with a continuous rim, fit the shell and cutter together. Adjust the cutter's offset, cross-section and taper to shape the remaining wall before adding raised details. Inspect the rim and wall from an oblique view.
113
+ - To intersect two independently fitted outlines, draw the top as a closed SVG path, preserving any asymmetry, and extrude it through the height. Draw the side as a second SVG facing sideways and extruded through the width, with OperationType.Intersect. Set the blend for the intended edge radius and verify the resulting contours. Intersect mating parts with the same outline when they need to follow that surface.
112
114
  - Keep surfaces smooth and continuous, as if cast in one mould: shape bumpers, intakes, spoilers, face plates, panels, feet and bases to follow the body's curvature, with a curve or a rounded shape, and fillet each one into the body with a blend of a few millimetres. A flat block laid on a curved surface, a hard ledge or a stair-step reads as stacked parts. Round boxes with nodeSetRound; keep sharp only what is sharp on the real thing.
113
115
  - Give every visibly distinct part its own material and colour.
114
- Before building, settle a reference in numbers: the side, front and top silhouettes with their key heights, widths and lengths. After each stage, screenshot the build from the matching view and compare it with that reference, or with the user's image, and fix the largest mismatch in proportion or silhouette before adding detail. Finish with fine detail at its real scale, such as meshes, treads, fasteners, seams and trim: build one, then repeat it or copy its assembly with cloneSubtree.
116
+ Before building, settle the target in numbers: the side, front and top silhouettes with their key heights, widths and lengths, using actual references when available. Inspect the main forms from matching views and fix their largest mismatch before adding detail. Batch related changes and capture the views needed to check their effect. A rounded outline may enclose a broad flat face; preserve that distinction rather than inflating every section. Finish with fine detail at its real scale, such as meshes, treads, fasteners, seams and trim: build one, then repeat it or copy its assembly with cloneSubtree.
115
117
  Build and verify coarse geometry and unfamiliar operations before replicating details. Check one representative result, then repeat it.
116
118
  Construct both sides of a joint from shared attachment points and axes. Create each mounted part together with its contact or mounting geometry, derived from the supporting surface; preserve intended clearances and separate editability. If contact is uncertain, check the authored positions, dimensions, and axes in 3D: projected overlap is not a connection.
117
119
  Fix unintended gaps, floating attachments, and fragmented geometry before decorative detail or presentation. Use inspection to identify a concrete defect and verify its correction, not merely to collect screenshots or healthy receipts.
118
120
  Reference fidelity:
119
121
  When recreating an image, treat its visible geometry and level of detail as the target—not merely its subject, colors, or list of parts. Preserve the user's chosen workflow and editability requirements.
120
122
  Establish a comparison view matching the reference's angle, projection, and subject framing as closely as practical. Match silhouette, proportions, pose, and negative spaces first; then local contours, thickness, curvature, surface transitions, and defining details. Infer unseen geometry conservatively. Size each defining detail, such as a printed graphic, a face, a held object, a hand or a shoe, from the image: measure its width and height as fractions of the subject's height, and its position, and build it at that size; details estimated by eye come out too small and too simple.
121
- Compare each rendered pass directly with the source. Identify the largest remaining visible shape mismatch, edit it, and verify that it improved before moving to smaller details. Use close-ups when the comparison view cannot resolve a feature; return to the comparison view afterward. Adjust sampling or resolution when visible faceting or segmentation requires it—not as a substitute for reshaping.
123
+ Compare the main forms and each major repair with the source. Identify the largest remaining visible shape mismatch, edit it, and verify that it improved before moving to smaller details. Use close-ups when the comparison view cannot resolve a feature; return to the comparison view afterward. Adjust sampling or resolution when visible faceting or segmentation requires it—not as a substitute for reshaping.
122
124
  Do not stop at semantic resemblance or after a fixed number of screenshots. Continue while substantial visible mismatches remain and supported edits are making progress, within the available budget. If progress stalls or the chosen representation cannot achieve the requested fidelity, explain the specific limitation and ask before changing workflows. Before finishing, compare the latest render with the reference and address the largest remaining visible mismatch; if substantial differences remain, identify the concrete stopping reason rather than treating an approximation disclaimer as completion.
123
125
 
124
126
  await cloneSubtree(id, { parentId?, name?, index? }) copies a node and its complete hierarchy with fresh IDs,
@@ -149,6 +151,52 @@ A failed script can retain earlier committed effects. Use receipts and inspect u
149
151
  "print(await womp.scene.health());",
150
152
  "print(await womp.scene.health([objectId]));",
151
153
  "print(await womp.scene.access(scene => scene.nodes({ name: 'body' })));",
154
+ `print(await womp.scene.access(scene => {
155
+ // V3 Bezier curve with independently sized and oriented profiles.
156
+ const mm = (x, y, z) => ({ x: x * scene.unitMultiplier, y: y * scene.unitMultiplier, z: z * scene.unitMultiplier });
157
+ const area = scene.nodeCreate(scene.NodeType.Union, 0);
158
+ scene.nodeSetPos(area, mm(0, 5, 0));
159
+ const curve = scene.nodeCreate(scene.NodeType.Curve, area);
160
+ scene.nodeSetName(curve, "Three-anchor tapered strap");
161
+ scene.nodeSetPrimType(curve, scene.PrimitiveType.Cube);
162
+ // These settings were checked for this strap's flat cross-section and scale.
163
+ const sliceLength = 0.8;
164
+ scene.nodeSetDensity(curve, 160);
165
+ scene.nodeSetBlend(curve, 0.6);
166
+ scene.nodeSetUnionResolution(area, 0.65);
167
+ const material = scene.materialCreate();
168
+ scene.materialSetColor(material, { r: 154, g: 158, b: 161 });
169
+ scene.materialSetRoughness(material, 0.82);
170
+ scene.materialSetMetalness(material, 0.08);
171
+ scene.nodeSetMaterialId(curve, material);
172
+
173
+ // The centerline is y = 15 * (1 - (x / 40) ** 2) mm, so its end slopes are +0.75 and -0.75.
174
+ // The crown anchor sets the widest profile independently of both ends.
175
+ const spanThird = 40 / 3;
176
+ const degrees = radians => radians * 180 / Math.PI;
177
+ const heading = Math.atan(0.75);
178
+ const roll = Math.PI / 6;
179
+ // Express Rz(-heading) * Rx(roll) in the API's intrinsic XYZ order.
180
+ const rightRotation = {
181
+ x: degrees(Math.atan2(Math.cos(heading) * Math.sin(roll), Math.cos(roll))),
182
+ y: degrees(Math.asin(-Math.sin(heading) * Math.sin(roll))),
183
+ z: degrees(Math.atan2(-Math.sin(heading) * Math.cos(roll), Math.cos(heading))),
184
+ };
185
+ scene.curvePointAdd(curve, {
186
+ pos: mm(-40, 0, 0), handleOut: mm(spanThird, 10, 0),
187
+ size: mm(sliceLength, 9, 3), rot: { x: 0, y: 0, z: degrees(heading) },
188
+ });
189
+ scene.curvePointAdd(curve, {
190
+ pos: mm(0, 15, 0), handleIn: mm(-spanThird, 0, 0), handleOut: mm(spanThird, 0, 0),
191
+ size: mm(sliceLength, 14, 3),
192
+ });
193
+ scene.curvePointAdd(curve, {
194
+ pos: mm(40, 0, 0), handleIn: mm(-spanThird, 10, 0),
195
+ size: mm(sliceLength, 9, 3), rot: rightRotation,
196
+ });
197
+ // At x = -20 and +20 mm the centerline passes y = 11.25 mm. The roll eases from the crown to the right end.
198
+ return { area, curve, anchors: scene.curvePointCount(curve) };
199
+ }));`,
152
200
  "const snapshot = await womp.scene.access(scene => ({ unitMultiplier: scene.unitMultiplier })); const diameter = 20 * snapshot.unitMultiplier; const result = await womp.scene.access(scene => { const areaId = scene.nodeCreate(scene.NodeType.Union, 0); const bodyId = scene.nodeCreate(scene.NodeType.Primitive, areaId); scene.nodeSetName(bodyId, '20 mm orange sphere'); scene.nodeSetPrimType(bodyId, scene.PrimitiveType.Sphere); scene.nodeSetSize(bodyId, { x: diameter, y: diameter, z: diameter }); scene.nodeSetPos(bodyId, { x: 0, y: diameter / 2, z: 0 }); const materialId = scene.materialCreate(); scene.materialSetColor(materialId, { r: 255, g: 128, b: 0 }); scene.nodeSetMaterialId(bodyId, materialId); return { areaId, bodyId }; }); print(result); await emitImage(await womp.scene.screenshot({ camera: { position: { x: diameter * 2, y: diameter * 1.5, z: diameter * 2 }, target: { x: 0, y: diameter / 2, z: 0 }, projection: 'perspective', horizontalFovDegrees: 60 } }));",
153
201
  ],
154
202
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "17.7.0",
3
+ "version": "17.7.2",
4
4
  "description": "Portable skills-based AI agent with local and durable chat transports for Womp",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",