BIM.works SDKs - v1.5.0-b164
    Preparing search index...

    Type Alias Viewer3dSettings

    The settings available for the 3D Viewer

    type Viewer3dSettings = {
        cacheGeometry?: boolean;
        disableDefaultKeyBindings?: boolean;
        fatWireframes?: {
            cache?: boolean;
            enabled?: boolean;
            pregenerate?: boolean;
        };
        hideObjectOnMiddleClick?: boolean;
        keyBindings?: {
            autoRotate?: KeyBinding[];
            colorObjectOpaque?: KeyBinding[];
            colorObjectTransparent?: KeyBinding[];
            focus?: KeyBinding[];
            hideObject?: KeyBinding[];
            orbit?: KeyBinding[];
            pan?: KeyBinding[];
            rightMouseClick?: (event: unknown, qid: Qid) => void;
            section?: KeyBinding[];
        };
        oct?: boolean;
        pickability?: boolean;
        realtimeSettings?: { culling?: boolean };
        rendering?: { antialias?: boolean };
        showLoader?: boolean;
        tileSets?: { [id: string]: { [key: string]: unknown } | "separator" };
        webWorkerRendering?: boolean;
    }
    Index

    Properties

    cacheGeometry?: boolean

    Whether to cache geometry data in the browser if possible

    disableDefaultKeyBindings?: boolean

    Whether to disable all the default key bindings

    fatWireframes?: { cache?: boolean; enabled?: boolean; pregenerate?: boolean }

    Settings related to fat wireframes (currently used in selection visualization)

    Type Declaration

    • Optionalcache?: boolean

      Whether the fat wireframes should be cached, so they load faster the second time, default value is true

    • Optionalenabled?: boolean

      Whether fat wireframes are enabled at all, default value is true

    • Optionalpregenerate?: boolean

      Whether fat wireframes should be generated immediately when loading a model, this makes showing them later on faster, but takes a little more time to load the models, default value is false

    hideObjectOnMiddleClick?: boolean

    Whether objects should be made invisible when clicking with the middle mouse button

    keyBindings?: {
        autoRotate?: KeyBinding[];
        colorObjectOpaque?: KeyBinding[];
        colorObjectTransparent?: KeyBinding[];
        focus?: KeyBinding[];
        hideObject?: KeyBinding[];
        orbit?: KeyBinding[];
        pan?: KeyBinding[];
        rightMouseClick?: (event: unknown, qid: Qid) => void;
        section?: KeyBinding[];
    }

    Possible override the key bindings

    Type Declaration

    • OptionalautoRotate?: KeyBinding[]
    • OptionalcolorObjectOpaque?: KeyBinding[]
    • OptionalcolorObjectTransparent?: KeyBinding[]
    • Optionalfocus?: KeyBinding[]
    • OptionalhideObject?: KeyBinding[]
    • Optionalorbit?: KeyBinding[]
    • Optionalpan?: KeyBinding[]
    • OptionalrightMouseClick?: (event: unknown, qid: Qid) => void

      Function to call when the right-mouse is clicked (or more specifically when the 'contextmenu' event is triggered)

    • Optionalsection?: KeyBinding[]
    oct?: boolean

    Whether the octree should be enabled. This is currently used by (and required for) the rectangular selection tool

    pickability?: boolean

    Whether pickability should be enabled. Pickability is a state each object can have, it determines whether the objects is highlighted on hover and whether it can be selected by picking

    realtimeSettings?: { culling?: boolean }

    Settings that apply to realtime rendering

    Type Declaration

    • Optionalculling?: boolean

      Whether culling should be enabled. Moves some of the calculation from the GPU to the CPU

    rendering?: { antialias?: boolean }

    Rendering settings

    Type Declaration

    • Optionalantialias?: boolean

      Whether to apply anti aliasing

    showLoader?: boolean

    Whether to show the "LOADER" div whenever a model is loading, this div can be styled by using the .viewer3d.loader CSS class

    tileSets?: { [id: string]: { [key: string]: unknown } | "separator" }

    TileSets

    webWorkerRendering?: boolean

    Whether web workers should be used to aid rendering. When this is disabled (false), more work has to be done on the main thread, which could slow down realtime rendering When this is disabled, culling and rectangular selection are both not possible