BIM.works SDKs - v3.0.0-b.115
    Preparing search index...

    One row of a layer as the model-level annotation its viewers draw; its options are the layer's

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    data: Record<string, unknown>
    key: string
    layer: AnnotationLayer<unknown>
    qid?: string | Qid

    The object the annotation is linked to: hovering either highlights the other

    Accessors

    • get align(): AnnotationAlign | null

      Returns AnnotationAlign | null

    • set align(align: AnnotationAlign | null): void

      Which side of its anchor the annotation is drawn on, on screen; null (the default) draws text and icons centred on it and an image of no size with its corner there

      Parameters

      Returns void

    • get anchor(): AnnotationAnchor

      Returns AnnotationAnchor

    • set anchor(anchor: string | null): void

      Where on its object (qid) the 3D viewer puts an annotation without a position: a point of the object's box in its model's own axes, "center" (the default) or up to three words as AnnotationAnchor lists them. Setting takes the words separated by spaces too; reading gives the "-" form. Read when the viewer adds the annotation

      Parameters

      • anchor: string | null

      Returns void

    • get click(): Function

      Returns Function

      The currently set click listener

    • set click(fn: Function): void

      Attach a click listener, only one click listener can be attached, previous one will be overwritten

      Parameters

      • fn: Function

        The method to call whenever this annotation is clicked

      Returns void

    • get group(): string

      Returns string

    • set group(group: string): void

      The group the annotation belongs to; groups can be shown, hidden and limited together

      Parameters

      • group: string

      Returns void

    • get groupLimit(): number | null

      Returns number | null

      The limit on the annotations shown of this annotation's group, null for none

    • set groupLimit(groupLimit: number | null): void

      At most how many annotations of this annotation's group the 3D viewer shows, those nearest to the camera: a positive whole number, or null (the default) for no limit. Annotations hidden behind other geometry take no place, and hovering an annotation's object still shows it.

      Parameters

      • groupLimit: number | null

      Returns void

    • get maxDistanceMm(): number

      Returns number

      The currently set max distance in mm

    • set maxDistanceMm(distance: number): void

      Set the maximum distance from the annotation to the camera at which it will still be displayed. The default value of this is 0, which means that at any distance the annotation will be displayed

      Parameters

      • distance: number

        The max distance in mm

      Returns void

    • get occlusion(): "none" | "hide" | "dim"

      Returns "none" | "hide" | "dim"

    • set occlusion(occlusion: "none" | "hide" | "dim"): void

      What the 3D viewer does while the annotation's point or object is hidden behind other geometry: "hide" (the default), "dim" or "none"

      Parameters

      • occlusion: "none" | "hide" | "dim"

      Returns void

    • get position(): vec3

      Returns vec3

    • set position(position: vec3): void

      Where the annotation points, in viewer coordinates (the frame of @bimworks/viewer3d!Viewer3d.pick)

      Parameters

      Returns void

    • get scaleByDistance(): boolean | null

      Returns boolean | null

      true or false when set on this annotation, null when it follows the viewer's setting

    • set scaleByDistance(scaleByDistance: boolean | null): void

      Whether the 3D viewer draws the annotation smaller the further it is from the camera: its normal size up to 10 m, shrinking beyond that to no less than 40 %, and its normal size again while it or its object is hovered. null (the default) follows the viewer's annotationScaleByDistance setting.

      Parameters

      • scaleByDistance: boolean | null

      Returns void