Inputs to buildDrawingPanel.

interface BuildDrawingPanelParams {
    aabb: FloatArrayParam;
    basis: ProjectionBasis;
    layerId?: string;
    margin?: number;
    origin?: [number, number, number];
    planeDepth: number;
    spec?: PanelSpec;
    targetModel: SceneModel;
}

Properties

World-space AABB the panel must cover — [xMin, yMin, zMin, xMax, yMax, zMax]. The panel's image-plane extent comes from projecting these 8 corners onto the basis right/up axes (plus margin).

Orthonormal {right, up, forward} basis. The panel box is thin along forward and grows in right / up.

layerId?: string

Optional ViewLayer id assigned to the emitted SceneObject so the host can hide / show / style the panel collectively with the rest of the drawing's chrome.

margin?: number

World-space margin grown beyond the AABB's projected extent on every side, in the basis u and v axes. Match the drawing's frame margin so the panel covers the framed area plus its border. Default 0.

origin?: [number, number, number]

Anchor subtracted from every emitted position before createGeometry, then passed back as the mesh's position so the world placement carries the full-precision offset in the mesh's Float64 local matrix. Lets the panel sit far from the world origin without losing precision in the SceneGeometry's Float32 AABB. Default [0, 0, 0].

planeDepth: number

Basis-d coord of the projection plane the panel sits on — the same plane the rest of the drawing's geometry is projected onto. The panel box is positioned a hair on either side of this depth so the projected geometry reads crisply against it.

spec?: PanelSpec

Panel styling: colour, opacity, optional PBR painter, triplanar texture scale. See PanelSpec.

targetModel: SceneModel

SceneModel the panel geometry / material / mesh / object are created in. Must be unfinalised.