@huukhanhnguyen/model / schema/views
schema/views
ArchetypeCameraOptions
ArchetypeCameraOptions = {
fovDegrees?:number;margin?:number;section?:boolean; }
fovDegrees?
optionalfovDegrees?:number
Matches a perspective camera's own fov — purely to size the fit distance the same way a perspective camera would frame the box, so a freshly-seeded camera looks reasonable at authoring time; the STORED camera is orthographic regardless (type omitted, CameraData's own default). Default 45.
margin?
optionalmargin?:number
Extra room around the bbox, as a fraction of its half-diagonal. Default 0.1 (10%).
section?
optionalsection?:boolean
Section archetype: also set near at the box center along the view direction (a section cut through the middle of the model).
DataFilterResult
DataFilterResult = {
override?:ViewFilterOverride;passes:boolean; }
override?
optionaloverride?:ViewFilterOverride
passes
passes:
boolean
Display
Display = {
faceIndices:Map<ObjectData,number[]>;meshes:Map<ObjectData,TriangleMesh>;polylines:Map<ObjectData,Point[]>; }
Everything resolveView reads off the tessellated stream, computed once per resolve (see views.ts's displayGeometryOf). Section/depth clipping replaces a mesh's entry in place.
faceIndices
faceIndices:
Map<ObjectData,number[]>
Which face each triangle of meshes came from, same fan order. Section/depth clipping DELETES the entry: a clipped triangle set has no correspondence to the document's faces, and an entry that survived the clip would read the WRONG face's material.
meshes
meshes:
Map<ObjectData,TriangleMesh>
Triangles per MESH document (n-gon faces fanned by facesToIndices).
polylines
polylines:
Map<ObjectData,Point[]>
Sampled polyline per CURVE document.
ResolveViewOptions
ResolveViewOptions =
FoldViewOptions& {includeAnnotation?: (annotation) =>boolean;resolveDetail?: (source) =>ObjectData[]; }
Everything resolveView takes: its own two hooks plus the fold options it forwards. One type, named after its subject — the ResolveViewOptionsEx that used to be this intersection was named after neither a subject nor an action, and the narrow half it "extended" was never used on its own.
RowLaneReferences
RowLaneReferences = {
layer?:string;material?:string; }
The lane references a data document resolves to, already through the entry-beats-placement order (rowLayerOf / rowMaterialOf). A filter rule keyed layer or material reads THESE, not attributes: both are declared fields on the entry, so neither is free-form data a rule could find in the claim bag. Every other key still reads attributes.
layer?
optionallayer?:string
material?
optionalmaterial?:string