@twinfinity/experimental
    Preparing search index...

    Class DrawingApi<Change>

    Use this API to load and visualize drawings.

    Type Parameters

    Index

    Constructors

    • Constructor

      Type Parameters

      Parameters

      • _api: BimCoreApi

        Api

      • _textureSize: number = 1024

        Defines size of texture used to render drawings. Recommended value is power of two. Higher resolution gives better visuals but costs more memory (a pixel takes 4 bytes).

      • _grayscaleDefault: boolean = false

        Decides if the DWG drawings are grayscale by default. Onnly applies to dwg drawings.

      • _invertedBackgroundDefault: boolean = false

        Decides if the DWG drawings are created with inverted background as default. Only applies to dwg drawings.

      Returns DrawingApi<Change>

    Properties

    defaultPosition: DeepImmutableObject<Vector3> = Vector3.ZeroReadOnly
    defaultScale: DeepImmutable<Vector3> = ...
    pdfDefaultBackgroundColor: Color3 = ...

    Accessors

    • get boundingInfo(): BoundingInfo

      Bounding information for the currently loaded DWG's

      Returns BoundingInfo

    • get drawingParentNode(): TransformNode

      Returns TransformNode

    • get grayscaleDefault(): boolean

      Returns boolean

    • set grayscaleDefault(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get invertedBackgroundDefault(): boolean

      Returns boolean

    • set invertedBackgroundDefault(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    Methods

    • Remove all loaded drawings

      Returns void

    • Parameters

      • camera: ViewerCamera

      Returns Promise<void>

    • Load one or more drawings. Only PDF and 2D DWG files are supported. Note that 3D DWG's are not supported.

      Parameters

      Returns Promise<void>

      Promise