docs / Annotate & present

Annotate & present

Present a model and declare drawing intent without changing its geometry: text, color, lighting, camera, motion, drawing GD&T, and review requirements.

finish('copper') gives the bracket copper's colour and surface in one call. Change it to finish('abs') and the same bracket looks like black plastic. Glass and clearcoat still go through material({...}).

const bracket = box(60, 40, 12)
  .fillet(2)
  .hole('top', { u: 0, v: 0, diameter: 12, depth: 'through' });

return bracket.finish('copper');
JavaScript is off — the listing above is the whole example.

referenceImage and custom TTF fonts via fontPath need a filesystem and are CLI-only. Colour, material, camera and lighting all run here.

Calls

CallWhat it does
sketch : { text(content: string, opts: { size: Editable<number>; align?: "left" | "center" | "right"; position?: [Editable<number>, Editable<number>]; rotation?: Editable<number>; font?: string }): Sketch }Sketch primitives namespace.
fontPath(p: string) => FontPathBrand a string as a font filesystem path (TTF).
Shape.embossText(opts: { textContent: string; fontFamily?: string; size: Editable<number>; depth: Editable<number>; align?: 'left' | 'center' | 'right'; anchorU?: Editable<number>; anchorV?: Editable<number>; rotation?: Editable<number>; scaleMode?: 'original' | 'native' | 'bounds'; face: FaceSelector | string }) => ShapeRaise or recess text on a target face.
Shape.color(name: ColorToken | `#${string}` | ColorParamRef) => ShapeSet HUE ONLY: a role color (servo/gear/beam/shaft/plate/pin/frame/tool) or a literal #rrggbb hex, or a colour param() ref.
Shape.finish(name: FinishToken | MaterialGrade, opts?: { color?: string; face?: string }) => ShapePREFERRED way to make a part look like a real material.
Shape.material(opts: PBRMaterial & { face?: string }) => ShapeADVANCED / renderer-level escape hatch exposing raw PBR floats for glass, clearcoat, anisotropy, and image textures when no .finish() token fits.
Shape.wrapTexture(imageRef: TextureRef, projection: { type: 'flat'; onto?: 'xy' | 'xz' | 'yz' } | { type: 'cylinder'; axis: [number, number, number] } | { type: 'sphere' } | { type: 'box' }) => ShapeProject a bitmap (label, decal, logo) onto this shape without hand-authoring UVs.
referenceImage(path: string, opts: { plane, anchor?, scale?, opacity?, flipU?, flipV? }) => ReferenceImageHandleOverlay a reference image on a plane for tracing or design review.
setRenderEnvironment(spec: { preset?: 'studio' | 'softbox' | 'neutral' | 'outdoor' | 'warehouse'; url?: string; intensity?: number; rotation?: number }) => RenderEnvironmentHandleSet the HDRI / image-based-lighting environment for the rendered scene.
setCameraTarget(x: number, y: number, z: number) => CameraTargetHandleOverride the camera look-at target for setRenderPose and headless engineering renders.
setCameraDistance(distance: number) => CameraTargetHandleOverride the camera framing distance (mm from target).
animationView(spec: { param: string; from: number; to: number; durationMs: number; fps?: number } | { name?: string; tracks: Array<{ param: string; keys: Array<{ atMs: number; value: number; ease?: "linear" | "step" | "easeIn" | "easeOut" | "easeInOut" }> }>; fps?: number }) => AnimationViewHandleDeclare an animation timeline for offline kinematic-motion MP4 capture.
Shape.datum(label: string, face: FaceQuery) => ShapeDeclare datum label (one or two capitals, not I/O/Q) on the face face resolves to, for svg-drawing sheets.
Shape.tolerance(spec: { type: 'position' | 'flatness' | 'perpendicularity' | 'parallelism' | 'concentricity' | 'cylindricity'; value: number; face?: FaceQuery; edge?: EdgeQuery; datums?: string[]; modifier?: '⌀' | 'M' | 'S' }) => ShapeDeclare a geometric tolerance (feature control frame) on exactly one of face / edge, for svg-drawing sheets.
Shape.dimension(spec: { id?: string } & ({ kind: 'linear'; from: Vec3 | { edge: EdgeQuery } | { face: FaceQuery }; to: Vec3 | { edge: EdgeQuery } | { face: FaceQuery }; label?: string } | { kind: 'diameter' | 'radius'; edge: EdgeQuery; label?: string } | { kind: 'angular'; from: EdgeQuery; to: EdgeQuery; label?: string })) => ShapeDeclare a dimension to show on the 3D viewer model and on drawings.
Shape.drawingReview(plan: DrawingReviewPlan) => ShapeDeclare required geometric callouts and engineering decisions for this shape and downstream exports.