Layers, patterns and views
Entries of the layers, patterns and views lanes.
4 methods: addLayer, addPattern, view, lineFamily.
addLayer - Layer
A key a row carries, so a view can hide everything carrying it.
role step, type layer, valid on layers, returns layer, default key layer.
addPattern - Pattern
Hatch pattern record, identified by its node key; its line families are lineFamily steps.
role step, type pattern, valid on patterns, returns pattern, default key pattern.
view - View
A camera pose with a projection switch — perspective reads fov, orthographic reads height.
role step, type view, valid on views, returns view, default key view.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
position | point | [1000, 1000, 1000] | Eye position. | |||
target | point | [0, 0, 0] | Look-at point; must differ from position. | |||
up | vector | [0, 0, 1] | Up direction; must not be parallel to (target - position). | |||
projection | string | 'perspective' | ['perspective', 'orthographic'] | Which lens is read — 'perspective' (fov) or 'orthographic' (height). | ||
fov | number | 45 | 1 | 179 | Vertical field of view, degrees — read only when projection is 'perspective'. | |
height | length | 2000 | 0 | World height seen by the frame, mm, not an elevation — read only when projection is 'orthographic'. |
lineFamily - Line Family
One infinite parallel-line family drawn over a hatch region.
role step, type pattern, valid on patterns, returns pattern, default key lineFamily.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
angle | angle | 0 | Direction of the family, degrees counter-clockwise from hatch-space +X. | |||
origin | point | [0, 0] | A point the first line passes through, in hatch space [x, y]. Not rewritten on a unit change. | |||
shift | length | 0 | Slide along the line direction between one line and the next; visible once dashes breaks the line up. | |||
spacing | length | Distance across, between one line and the next; a negative value flips which side the family repeats toward. Must not be 0. | ||||
dashes | length[] | Repeating pen cycle (SVG stroke-dasharray spelling); absent = a solid line. | ||||
lineWidth | length | Stroke width. Absent = the renderer's hairline. | ||||
color | color | #rrggbb. Absent = inherit from the placement's material. | ||||
dotSize | length | Diameter painted for a zero-length dash. Absent = lineWidth. |