TechnicalDrawingHelper
Visualises a TechnicalDrawing's projection volume in the 3D scene and exposes three gizmo anchors for interactive control.
Extends
Group
Constructors
new TechnicalDrawingHelper()
new TechnicalDrawingHelper(
drawing):TechnicalDrawingHelper
Works exactly like the built-in Three.js helpers (e.g. THREE.CameraHelper):
add it as a child of drawing.three so it inherits the drawing's world
transform automatically.
It renders on layer 0 — visible to the perspective camera, invisible to the drawing's orthographic cameras (which only render layer 1).
The helper draws three things:
- A rectangular frame on the drawing plane (Y = 0 in drawing local space).
- Four pillar lines dropping from each corner along the projection direction (local −Y) to the far boundary.
- A matching rectangle at the far boundary.
Interactive control via gizmos
Three THREE.Object3D anchors are exposed for TransformControls:
| Anchor | Controls | Constrained axis |
|---|---|---|
| farHandle | drawing.far | local Y |
| widthHandle | width (symmetric) | local X |
| heightHandle | height (symmetric) | local Z |
Use the corresponding attach*Gizmo methods instead of configuring the
gizmos manually — they enforce the correct axis constraints, local space,
and change listeners automatically:
const helper = new TechnicalDrawingHelper(drawing);
helper.width = 20;
helper.height = 15;
drawing.three.add(helper);
// Main gizmo — full translate + rotate on drawing.three
const mainGizmo = new TransformControls(camera, domElement);
mainGizmo.attach(drawing.three);
scene.add(mainGizmo);
// Depth gizmo — controls drawing.far
const farGizmo = new TransformControls(camera, domElement);
scene.add(farGizmo);
helper.attachFarGizmo(farGizmo);
// Width gizmo
const widthGizmo = new TransformControls(camera, domElement);
scene.add(widthGizmo);
helper.attachWidthGizmo(widthGizmo);
// Height gizmo
const heightGizmo = new TransformControls(camera, domElement);
scene.add(heightGizmo);
helper.attachHeightGizmo(heightGizmo);
Call update after changing width, height, or
drawing.far programmatically to rebuild the geometry.
Parameters
| Parameter | Type |
|---|---|
drawing | DrawingProjectionSource |
Returns
Overrides
THREE.Group.constructor