diff --git a/README.md b/README.md index 3abea67..db3530e 100644 --- a/README.md +++ b/README.md @@ -455,7 +455,8 @@ reshape a scan locally without leaving Kitbasher. Warp is desktop only. 1. Select one visible, unlocked part and choose **Warp** in the toolbar, or press `W`. 2. Choose the **Region**. With **Painted**, paint the area to bend with the usual surface - brush; the edge of the painted area stays exactly where it is. With nothing painted, or + brush. Its edge stays fixed unless you enable **Feather edge** to blend the bend into the + surrounding surface. With nothing painted, or with **Whole part**, every surface of the part can bend. Then choose **Lay grid**. 3. A coarse grid appears over the region. **Density** sets how coarse it is: coarser grids bend broadly, finer grids bend locally. Changing Density or the region lays a new grid diff --git a/docs/documentation.md b/docs/documentation.md index b41e71e..d270dc9 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -11,8 +11,8 @@ The typed content lives in `src/docs/`: - `start-guides.ts`: first assembly, interface, imports, navigation, parts, workflows, and inspection. -- `assembly-guides.ts`: transforms, alignment, contact paint, flush seams, anchors, pins, - joints, planes, No clip, and measurement. +- `assembly-guides.ts`: transforms, alignment, contact paint, Warp, Sculpt, Refine, flush seams, + anchors, pins, joints, planes, No clip, and measurement. - `workspace-guides.ts`: saving, Drive, exports, appearance, preferences, performance, headset sessions, automation, and troubleshooting. - `content.ts`: navigation order, grouping, search, and the default keyboard @@ -84,6 +84,14 @@ captures. Keep the captions consistent with the displayed priorities and gaps. The SVGs illustrate point and plane alignment, rigid residuals, multi-seam flush fitting, and the scene workflow. They are explanatory diagrams, not screenshots. +## Sculpt brush examples + +With the development server running, use `node scripts/capture-sculpt-brushes.mjs` to +regenerate the eight before-and-after images in `public/docs/images/sculpt/`. Each pair +uses the same viewport and lighting. The script selects the brush in the workbench, +drags on a practice tile, and waits for the stroke to commit before capturing the result. +Set `DOCS_CAPTURE_URL` to use another port or pass `--only=grab` to capture one brush. + ## References beside the instructions `src/docs/reference-images.ts` describes focused screenshots used inside guide diff --git a/public/docs/images/reference/sculpt.webp b/public/docs/images/reference/sculpt.webp new file mode 100644 index 0000000..6c79ee1 Binary files /dev/null and b/public/docs/images/reference/sculpt.webp differ diff --git a/public/docs/images/reference/warp.webp b/public/docs/images/reference/warp.webp new file mode 100644 index 0000000..be29cc4 Binary files /dev/null and b/public/docs/images/reference/warp.webp differ diff --git a/public/docs/images/sculpt/clay.webp b/public/docs/images/sculpt/clay.webp new file mode 100644 index 0000000..6eade49 Binary files /dev/null and b/public/docs/images/sculpt/clay.webp differ diff --git a/public/docs/images/sculpt/crease.webp b/public/docs/images/sculpt/crease.webp new file mode 100644 index 0000000..71b9c68 Binary files /dev/null and b/public/docs/images/sculpt/crease.webp differ diff --git a/public/docs/images/sculpt/draw.webp b/public/docs/images/sculpt/draw.webp new file mode 100644 index 0000000..48a09ab Binary files /dev/null and b/public/docs/images/sculpt/draw.webp differ diff --git a/public/docs/images/sculpt/flatten.webp b/public/docs/images/sculpt/flatten.webp new file mode 100644 index 0000000..93e56b1 Binary files /dev/null and b/public/docs/images/sculpt/flatten.webp differ diff --git a/public/docs/images/sculpt/grab.webp b/public/docs/images/sculpt/grab.webp new file mode 100644 index 0000000..ff4bad2 Binary files /dev/null and b/public/docs/images/sculpt/grab.webp differ diff --git a/public/docs/images/sculpt/inflate.webp b/public/docs/images/sculpt/inflate.webp new file mode 100644 index 0000000..2b6b2a2 Binary files /dev/null and b/public/docs/images/sculpt/inflate.webp differ diff --git a/public/docs/images/sculpt/mask.webp b/public/docs/images/sculpt/mask.webp new file mode 100644 index 0000000..5867719 Binary files /dev/null and b/public/docs/images/sculpt/mask.webp differ diff --git a/public/docs/images/sculpt/smooth.webp b/public/docs/images/sculpt/smooth.webp new file mode 100644 index 0000000..66ac85e Binary files /dev/null and b/public/docs/images/sculpt/smooth.webp differ diff --git a/scripts/capture-docs-reference.mjs b/scripts/capture-docs-reference.mjs index 90fd160..b3a6ac7 100644 --- a/scripts/capture-docs-reference.mjs +++ b/scripts/capture-docs-reference.mjs @@ -179,6 +179,25 @@ try { { x: 760, y: 0, width: 680, height: 540 }, ); } + await capture( + 'sculpt', + async (page) => { + await page.locator('.part-select[title="Torso shell"]').click(); + await page + .getByRole('toolbar', { name: 'Assembly tools' }) + .getByRole('button', { name: /^Sculpt\b/ }) + .click(); + await expect(page.getByRole('button', { name: 'Draw', exact: true })).toBeVisible(); + }, + right, + ); + await capture('warp', async (page) => { + await page.locator('.part-select[title="Torso shell"]').click(); + await page.keyboard.press('w'); + await page.getByRole('radio', { name: 'Whole part' }).click(); + await page.getByRole('button', { name: 'Lay grid' }).click(); + await expect(page.getByRole('radio', { name: 'Point', exact: true })).toBeVisible(); + }); await capture('refine', async (page) => { // A synthetic scan: the softened block of the Refine end-to-end tests. await page.evaluate(async () => { diff --git a/scripts/capture-sculpt-brushes.mjs b/scripts/capture-sculpt-brushes.mjs new file mode 100644 index 0000000..b7db378 --- /dev/null +++ b/scripts/capture-sculpt-brushes.mjs @@ -0,0 +1,228 @@ +// Capture matched viewport crops before and after real brush strokes on a test part. +import { chromium, expect } from '@playwright/test'; +import { mkdir, writeFile } from 'node:fs/promises'; + +const output = new URL('../public/docs/images/sculpt/', import.meta.url); +const baseURL = process.env.DOCS_CAPTURE_URL ?? 'http://127.0.0.1:5173'; +const brushes = [ + ['draw', 'Draw', 0.85], + ['grab', 'Grab', 1.65], + ['smooth', 'Smooth', 1.65], + ['flatten', 'Flatten', 1.85], + ['crease', 'Crease', 0.85], + ['clay', 'Clay Buildup', 1.1], + ['inflate', 'Inflate/Deflate', 1.0], + ['mask', 'Mask', 0.9], +]; +const only = process.argv.find((arg) => arg.startsWith('--only='))?.slice(7); +if (only && !brushes.some(([id]) => id === only)) throw new Error('Unknown brush: ' + only); +await mkdir(output, { recursive: true }); +const browser = await chromium.launch({ + channel: 'chrome', + args: ['--enable-unsafe-swiftshader'], +}); +try { + for (const [id, label, radius] of brushes) { + if (only && only !== id) continue; + const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } }); + const errors = []; + page.on('pageerror', (error) => errors.push(error.message)); + await page.goto(baseURL); + await page.locator('.part-select[title="Torso shell"]').waitFor(); + await page.evaluate(async (id) => { + const urls = performance.getEntriesByType('resource').map((entry) => entry.name); + const { useEditor } = await import( + urls.find((url) => /\/src\/core\/store\.ts(?:\?.*)?$/.test(url)) + ); + const { softBox } = await import('/tests/helpers/soft-edges.ts'); + const geometry = softBox([3.6, 2.4, 0.5], 0.28, { + indexed: true, + step: 0.14, + ripple: 0, + noise: 0, + }); + const position = geometry.getAttribute('position'); + for (let i = 0; i < position.count; i++) { + const x = position.getX(i), + y = position.getY(i), + z = position.getZ(i); + if (z < 0.49) continue; + const envelope = Math.exp(-(x * x + y * y) / 1.45); + if (id === 'flatten') position.setZ(i, z + envelope); + if (id === 'inflate') { + const left = Math.exp(-((x + 1.45) ** 2 + y * y)); + const right = Math.exp(-((x - 1.45) ** 2 + y * y)); + position.setZ(i, z + (left + right) * 0.75); + } + if (id === 'smooth') + position.setZ(i, z + envelope * 0.22 * (Math.sin(x * 13) + Math.cos(y * 11))); + } + geometry.computeVertexNormals(); + const state = useEditor.getState(); + const { presetLighting } = await import('/src/core/lighting.ts'); + state.setScene({ + lighting: { ...presetLighting('studio'), shadows: false }, + name: 'Brush example', + joints: [], + parts: [ + { + id: 'tile', + name: 'Practice tile', + source: 'Practice tile', + geometry, + color: '#bf9270', + position: [0, 0, 0], + quaternion: [0, 0, 0, 1], + scale: [1, 1, 1], + visible: true, + locked: false, + }, + ], + }); + state.select('tile'); + state.setView({ grid: false }); + window.captureEditor = useEditor; + }, id); + await page + .getByRole('toolbar', { name: 'Assembly tools' }) + .getByRole('button', { name: /^Sculpt\b/ }) + .click(); + await page.getByRole('button', { name: label, exact: true }).click(); + await page.addStyleTag({ content: '.camera-navigation { visibility: hidden }' }); + await page.waitForFunction(async () => { + const urls = performance.getEntriesByType('resource').map((entry) => entry.name); + const fiber = urls.find((url) => url.includes('/@react-three_fiber.js')); + if (!fiber) return false; + const root = (await import(fiber))._roots.get(document.querySelector('canvas')); + return !!root?.store.getState().controls; + }); + const clip = await page.evaluate( + async ({ radius, id }) => { + const urls = performance.getEntriesByType('resource').map((entry) => entry.name); + const { _roots } = await import(urls.find((url) => url.includes('/@react-three_fiber.js'))); + const canvas = document.querySelector('canvas'); + const { camera, controls, invalidate } = _roots.get(canvas).store.getState(); + camera.position.set(4, 5, 20); + controls.target.set(0, 0, 0); + controls.update(); + window.captureEditor + .getState() + .setSculptSettings({ + radius, + strength: ['clay', 'draw', 'inflate', 'crease'].includes(id) ? 0.46 : 0.85, + spacing: 0.2, + }); + invalidate(); + await new Promise((done) => requestAnimationFrame(() => requestAnimationFrame(done))); + const rect = canvas.getBoundingClientRect(); + window.projectStroke = (point) => { + const p = camera.position.clone().fromArray(point).project(camera); + return { + x: rect.x + ((1 + p.x) * rect.width) / 2, + y: rect.y + ((1 - p.y) * rect.height) / 2, + }; + }; + const center = window.projectStroke([0, 0, 0]); + const width = Math.round(Math.abs(window.projectStroke([4.6, 0, 0]).x - center.x) * 2); + const height = Math.round(width * 0.72); + return { + x: Math.round(center.x - width / 2), + y: Math.round(center.y - height / 2), + width, + height, + }; + }, + { radius, id }, + ); + const capture = async () => { + await page.mouse.move(10, 10); + return (await page.screenshot({ clip, animations: 'disabled' })).toString('base64'); + }; + const before = await capture(); + async function stroke(points) { + const history = await page.evaluate(() => window.captureEditor.getState().sculpt.past.length); + const path = await page.evaluate((points) => points.map(window.projectStroke), points); + await page.mouse.move(path[0].x, path[0].y); + await page.mouse.down(); + for (const p of path.slice(1)) await page.mouse.move(p.x, p.y, { steps: 12 }); + await page.mouse.up(); + await expect + .poll(() => page.evaluate(() => window.captureEditor.getState().sculpt.past.length)) + .toBeGreaterThan(history); + } + if (id === 'grab') + await stroke([ + [1.5, 2.12, 0.5], + [2.05, 2.97, 0.5], + ]); + else if (id === 'inflate') { + await stroke([ + [-1.75, 0, 1.18], + [-1.15, 0, 1.18], + ]); + await page.keyboard.down('Alt'); + await stroke([ + [1.15, 0, 1.18], + [1.75, 0, 1.18], + ]); + await page.keyboard.up('Alt'); + } else if (id === 'flatten') + await stroke([ + [-0.35, 0, 1.45], + [0.35, 0, 1.45], + ]); + else if (id === 'smooth') { + for (const y of [-0.45, 0, 0.45]) + await stroke([ + [-1.5, y, 0.5], + [1.5, y, 0.5], + ]); + } else if (id === 'clay') { + for (const y of [-0.55, 0, 0.55]) + await stroke([ + [-1.55, y, 0.5], + [1.55, y + 0.3, 0.5], + ]); + } else + await stroke([ + [-1.7, -0.65, 0.5], + [0, 0.25, 0.5], + [1.7, 0.65, 0.5], + ]); + const after = await capture(); + const pair = await page.evaluate( + async ([before, after]) => { + const images = await Promise.all( + [before, after].map(async (png) => { + const image = new Image(); + image.src = 'data:image/png;base64,' + png; + await image.decode(); + return image; + }), + ); + const [first] = images; + const canvas = document.createElement('canvas'); + canvas.width = first.width * 2 + 4; + canvas.height = first.height + 40; + const ctx = canvas.getContext('2d'); + ctx.fillStyle = '#202225'; + ctx.fillRect(0, 0, canvas.width, canvas.height); + ctx.font = '600 21px system-ui'; + ctx.fillStyle = '#f3f1ef'; + images.forEach((image, i) => { + const x = i * (image.width + 4); + ctx.fillText(i ? 'After' : 'Before', x + 12, 28); + ctx.drawImage(image, x, 40); + }); + return canvas.toDataURL('image/webp', 0.94).split(',')[1]; + }, + [before, after], + ); + expect(errors).toEqual([]); + await writeFile(new URL(id + '.webp', output), Buffer.from(pair, 'base64')); + console.log('Captured ' + label); + await page.close(); + } +} finally { + await browser.close(); +} diff --git a/src/docs/assembly-guides.ts b/src/docs/assembly-guides.ts index 3162c2f..a455b3d 100644 --- a/src/docs/assembly-guides.ts +++ b/src/docs/assembly-guides.ts @@ -318,6 +318,198 @@ export const assemblyGuides: DocArticle[] = [ ], related: ['tutorial-contact', 'alignment', 'flush-fit', 'planes', 'no-clip'], }, + { + id: 'warp', + title: 'Close a gap with Warp', + description: 'Bend a scanned part toward its neighbor using a grid and control points.', + group: 'Build & assemble', + icon: 'layers', + intro: + 'Use Warp when the parts are in position but their surfaces leave a gap. You can bend just the seam or reshape the whole part.', + image: referenceImages.warp, + sections: [ + { + id: 'region', + title: 'Choose where the part can bend', + steps: [ + 'Select a visible, unlocked part and press W to open Warp.', + 'Choose Painted and brush over the surface that should bend. Its boundary stays fixed. Turn on Feather edge to let the bend taper into the surrounding surface.', + 'For a bend across the entire part, choose Whole part. Leave Place points automatically on to start with handles spread across the surface.', + 'Choose Lay grid. Use a coarse Density for broad bends or a finer grid for local adjustments.', + ], + }, + { + id: 'handles', + title: 'Pull the surface into shape', + paragraphs: [ + 'Under Control points, choose Point and click the surface, or choose Line or Area and drag. A line or painted area moves as one handle. Drag a selected handle with the move arrows. Points you leave in place hold the surrounding surface.', + 'Radius sets the reach of a handle. Falloff controls how the bend fades across that reach. Shift-click to select additional points, or use Distribute points to spread new handles over the region.', + ], + }, + { + id: 'close-gap', + title: 'Fit and apply the seam', + steps: [ + 'Choose Close gap to pull the facing surface toward a nearby visible part. Overlap sets how far the surface enters its neighbor. For a manual fit, turn on Snap to neighbour and drag a point toward the seam.', + 'Check Gap to neighbour and the markers along the seam. Adjust the handles and inspect any folded triangles before applying.', + 'Use Undo to step back through your warp edits. Choose Apply to keep the resulting mesh as one scene undo step, or Cancel to discard the preview.', + ], + }, + ], + related: ['sculpt', 'refine', 'flush-fit', 'inspection'], + }, + { + id: 'sculpt', + title: 'Sculpt a part', + description: + 'Shape a surface with a mouse or pen, protect fine details with a mask, and undo individual strokes.', + group: 'Build & assemble', + icon: 'paint', + intro: + 'Select one visible, unlocked part and choose Sculpt in the toolbar. Start with Draw and drag on the part. Release to keep the stroke, or press Escape while dragging to discard it.', + image: referenceImages.sculpt, + sections: [ + { + id: 'brushes', + title: 'Choose a brush', + paragraphs: [ + 'To change the outline, use Grab. To build or cut relief, try Draw, Clay Buildup, Crease or Inflate/Deflate. Use Smooth for ripples, Flatten for a level patch, and Mask to protect a detail. Each example shows the same view before and after the stroke.', + ], + }, + { + id: 'stroke', + title: 'Control the stroke', + paragraphs: [ + 'Radius sets the brush size in millimeters. Strength controls the effect of each dab. Raise Detail for finer triangles under the brush. Turn on Local X symmetry to brush both sides at once. The mirror plane is at X = 0 in the part’s own coordinates.', + 'Open Advanced brush settings to change how the stroke feels. Falloff controls the transition at the brush edge. Reduce Dab spacing for closer dabs or increase Stroke stabilization to steady the pointer path. Minimum edge size limits how small new edges can be.', + 'With a pressure-sensitive pen, enable pressure for strength, radius, or both and adjust Pressure curve. For Draw, choose an Elliptical footprint to set roundness and rotation. A pen that reports tilt or twist can orient the ellipse as you draw. Use the pen eraser to carve with Draw or erase protection with Mask.', + ], + }, + { + id: 'draw', + title: 'Draw', + paragraphs: [ + 'Drag across a flat face to raise a ridge. Hold Alt during the stroke to carve a channel.', + ], + image: { + src: './images/sculpt/draw.webp', + width: 1186, + height: 466, + alt: 'Flat tile before Draw and the same tile with a raised diagonal ridge afterward.', + caption: 'One Draw stroke raises a narrow ridge along the pointer path.', + }, + }, + { + id: 'grab', + title: 'Grab', + paragraphs: [ + 'Start just inside an edge and drag outward. Increase Radius to carry a wider patch with the pointer.', + ], + image: { + src: './images/sculpt/grab.webp', + width: 1186, + height: 466, + alt: 'A straight top edge before Grab and a raised peak near its right end afterward.', + caption: 'Dragging the upper edge changes the outline of the tile.', + }, + }, + { + id: 'smooth', + title: 'Smooth', + paragraphs: [ + 'Brush across the ripples in overlapping passes. You can also hold Shift while using a shaping brush to smooth temporarily.', + ], + image: { + src: './images/sculpt/smooth.webp', + width: 1186, + height: 466, + alt: 'A patch of closely spaced ripples before Smooth and the same patch with most of the ripples softened afterward.', + caption: 'The ripples fade where the brush passes over them.', + }, + }, + { + id: 'flatten', + title: 'Flatten', + paragraphs: [ + 'Center a wide brush on the crown of a rounded bump and drag a short distance across it.', + ], + image: { + src: './images/sculpt/flatten.webp', + width: 1186, + height: 466, + alt: 'A gently rounded bump before Flatten and a broad, flatter face on the bump afterward.', + caption: 'The stroke gives the bump a flatter top and a more distinct shoulder.', + }, + }, + { + id: 'crease', + title: 'Crease', + paragraphs: [ + 'Drag where you want the groove to run. Adjust Pinch to tighten the groove, or hold Alt to form a raised ridge.', + ], + image: { + src: './images/sculpt/crease.webp', + width: 1186, + height: 466, + alt: 'Flat tile before Crease and a recessed diagonal groove afterward.', + caption: 'The surface draws inward along the stroke.', + }, + }, + { + id: 'clay', + title: 'Clay Buildup', + paragraphs: [ + 'Lay down several short strokes side by side, overlapping their edges. Hold Alt to cut material back.', + ], + image: { + src: './images/sculpt/clay.webp', + width: 1186, + height: 466, + alt: 'Flat tile before Clay Buildup and a broad raised patch made by three overlapping strokes afterward.', + caption: 'Overlapping passes build a wider pad of material.', + }, + }, + { + id: 'inflate', + title: 'Inflate/Deflate', + paragraphs: [ + 'Brush over one rounded detail to swell it. Hold Alt while brushing the other to shrink it.', + ], + image: { + src: './images/sculpt/inflate.webp', + width: 1186, + height: 466, + alt: 'Two matching bumps before brushing. Afterward the left bump protrudes farther and the right one is smaller.', + caption: 'The left bump was inflated. The right was brushed with Alt held.', + }, + }, + { + id: 'mask', + title: 'Mask', + image: { + src: './images/sculpt/mask.webp', + width: 1186, + height: 466, + alt: 'Unmarked tile before Mask and the same tile with a dark diagonal band of protection afterward.', + caption: 'The dark overlay marks the strip protected from subsequent shaping strokes.', + }, + steps: [ + 'Choose Mask and paint over the area to protect. Hold Alt to erase protection or Shift to soften the mask edge.', + 'Switch back to a shaping brush and work beside the protected area. Show mask toggles the overlay while keeping the protection active.', + 'Use Invert mask to swap the protected and exposed areas, or Clear mask to remove protection. The mask lasts for the active Sculpt session.', + ], + }, + { + id: 'undo', + title: 'Undo a stroke and save the result', + paragraphs: [ + 'Each stroke that changes the surface commits on release. Undo restores the previous shape, including any triangles the brush added. Mask edits can also be undone during the Sculpt session.', + 'History holds up to 120 changes. Large mesh edits can reach the memory limit sooner. Save a .kitbash scene to keep the sculpted surface after closing the workbench.', + ], + }, + ], + related: ['warp', 'refine', 'saving'], + }, { id: 'refine', title: 'Refine edges and surfaces on a scan', @@ -483,7 +675,7 @@ export const assemblyGuides: DocArticle[] = [ ], }, ], - related: ['contact-paint', 'parts', 'inspection', 'keyboard-shortcuts'], + related: ['sculpt', 'warp', 'contact-paint', 'parts', 'inspection', 'keyboard-shortcuts'], }, { id: 'flush-fit', diff --git a/src/docs/changelog.ts b/src/docs/changelog.ts index 1cb76a0..74e6de3 100644 --- a/src/docs/changelog.ts +++ b/src/docs/changelog.ts @@ -19,6 +19,47 @@ export interface Release { // Newest first. Each title must be unique: it names the release's link. export const releases: Release[] = [ + { + date: '2026-11-24', + title: 'Longer undo history', + commit: 'e578cea', + changes: [ + { + kind: 'improved', + text: 'Undo now keeps up to 120 changes, up from 40. Sculpt strokes share unchanged mesh data so more strokes fit in the available memory.', + guide: 'sculpt', + }, + ], + }, + { + date: '2026-11-24', + title: 'Shared scene reconnection', + commit: '367b020', + changes: [ + { + kind: 'fixed', + text: 'When a shared scene loses its connection, the editor reconnects and checks which sculpt edits reached the scene before retrying.', + guide: 'automation', + }, + ], + }, + { + date: '2026-11-23', + title: 'Sculpt directly on a part', + commit: '35dab3f', + changes: [ + { + kind: 'new', + text: 'Drag a brush to build up clay, carve a crease or pull a patch into shape. Sculpt adds triangles where the stroke needs detail. Each finished stroke is one undo step.', + guide: 'sculpt', + }, + { + kind: 'new', + text: 'Paint a mask to protect nearby details, mirror strokes with Local X symmetry, or use pen pressure to vary brush strength and radius.', + guide: 'sculpt', + }, + ], + }, { date: '2026-11-21', title: 'Refine edges and surfaces on scans', @@ -37,10 +78,12 @@ export const releases: Release[] = [ { kind: 'fixed', text: 'Long point pulls on flat surfaces have a smoother base, including at 0% falloff.', + guide: 'warp', }, { kind: 'improved', text: 'Voxel remesh now uses a default resolution of 128 and goes up to 1024. Above 256 it fits each vertex to the original surface, so dense scans keep their detail.', + guide: 'performance', }, ], }, @@ -71,6 +114,7 @@ export const releases: Release[] = [ { kind: 'new', text: 'Draw a line or paint an area on the surface and move it as one handle, without a peak at each point.', + guide: 'warp', }, { kind: 'improved', @@ -122,6 +166,7 @@ export const releases: Release[] = [ { kind: 'new', text: 'Warp deforms a painted region or a whole part with an adjustable grid of control points, then applies the result as one undo step.', + guide: 'warp', }, { kind: 'new', diff --git a/src/docs/content.ts b/src/docs/content.ts index c4b2805..5c09411 100644 --- a/src/docs/content.ts +++ b/src/docs/content.ts @@ -90,6 +90,8 @@ const order = [ 'alignment', 'alignment-tutorials', 'contact-paint', + 'warp', + 'sculpt', 'refine', 'flush-fit', 'anchors', diff --git a/src/docs/reference-images.ts b/src/docs/reference-images.ts index 55ee6d8..f0e1068 100644 --- a/src/docs/reference-images.ts +++ b/src/docs/reference-images.ts @@ -2,6 +2,21 @@ import type { DocImage } from './types'; /** Crops of the actual editor, captured by scripts/capture-docs-reference.mjs. */ export const referenceImages = { + sculpt: { + src: './images/reference/sculpt.webp', + width: 760, + height: 800, + alt: 'Sculpt inspector with Draw selected, radius, strength and detail fields, symmetry, and mask controls.', + caption: 'Choose a brush in the inspector. Its settings appear below the brush buttons.', + }, + warp: { + src: './images/reference/warp.webp', + width: 1440, + height: 1000, + alt: 'Scout torso selected with Warp control points on its surface and Point, Line and Area options in the inspector.', + caption: + 'After you lay the grid, select a point on the surface or add a handle with Point, Line or Area.', + }, fileMenu: { src: './images/reference/file-menu.webp', width: 760, diff --git a/src/docs/start-guides.ts b/src/docs/start-guides.ts index 96373e1..2ed6fb1 100644 --- a/src/docs/start-guides.ts +++ b/src/docs/start-guides.ts @@ -31,6 +31,9 @@ export const startGuides: DocArticle[] = [ ['Match a shaped interface', '3+ point fit or painted contact surfaces'], ['Make neighboring outer surfaces flush', 'Paint flush · across seams'], ['Keep a pose or mechanical relationship', 'Joints and retained plane constraints'], + ['Pull a scanned seam toward its neighbor', 'Warp → Close gap'], + ['Shape a detail by hand', 'Sculpt'], + ['Restore a rounded edge or uneven face', 'Refine'], ['Check a join before export', 'Measure, isolation, and Interference'], ], }, @@ -71,7 +74,7 @@ export const startGuides: DocArticle[] = [ title: 'Know the workbench’s scope', paragraphs: [ 'Kitbasher runs in modern WebGL browsers on Windows, macOS, and Linux, with a responsive layout for smaller screens. Available memory and graphics capacity limit the size of a scene you can comfortably edit.', - 'Import preserves geometry and vertex colors; textures, rigging, and animation are not retained. The workbench does not replace a sculpting package, a mesh-repair application, or a print slicer. In particular, a convincing visual fit does not by itself prove that a model is a closed printable solid.', + 'Import preserves geometry and vertex colors; textures, rigging, and animation are not retained. Check the exported mesh in your slicer or mesh-repair tool before printing. Parts can look flush and still have open edges.', ], }, ], diff --git a/src/docs/workspace-guides.ts b/src/docs/workspace-guides.ts index 13d8a26..c2c726a 100644 --- a/src/docs/workspace-guides.ts +++ b/src/docs/workspace-guides.ts @@ -745,6 +745,7 @@ export const workspaceGuides: DocArticle[] = [ paragraphs: [ 'Ask the agent to call open_live_view. It opens a local, tokenized browser address for that server’s scene. Your ordinary app tab is a separate scene; save its assembly and ask the agent to open the file before sharing it.', 'Each live tab has its own camera, selection, tools, picks, paint, and inspection view. Scene edits combine by part and property; later conflicting values win, then relationships are solved again. Your undo reverts your own changes, preserving values another participant changed afterward.', + 'If the connection drops after a sculpt stroke, the live view checks the shared mesh when it reconnects. If another participant changed the target before your stroke arrived, the editor restores the confirmed scene and shows a notice. Inspect the part before making the stroke again.', 'The live view has no normal local autosave. The scene lives in the agent’s server, so ask it to save or use Save scene in the tab. If the server ends, an open tab retains its own copy and can download it.', ], },