Viewer3dSettings: {
    cacheGeometry?: boolean;
    disableDefaultKeyBindings?: boolean;
    fatWireframes?: {
        cache?: boolean;
        enabled?: boolean;
        pregenerate?: 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;
    rendering?: {
        antialias?: boolean;
    };
    showLoader?: boolean;
    tileSets?: {
        [id: string]: {
            [key: string]: unknown;
        } | "separator";
    };
    webWorkerRendering?: boolean;
}

The settings available for the 3D Viewer

Type declaration

  • OptionalcacheGeometry?: boolean

    Whether to cache geometry data in the browser if possible

  • OptionaldisableDefaultKeyBindings?: boolean

    Whether to disable all the default key bindings

  • OptionalfatWireframes?: {
        cache?: boolean;
        enabled?: boolean;
        pregenerate?: boolean;
    }

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

    • 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

  • OptionalkeyBindings?: {
        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

    • 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)

        • (event, qid): void
        • Parameters

          • event: unknown
          • qid: Qid

          Returns void

    • Optionalsection?: KeyBinding[]
  • Optionaloct?: boolean

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

  • Optionalrendering?: {
        antialias?: boolean;
    }

    Rendering settings

    • Optionalantialias?: boolean

      Whether to apply anti aliasing

  • OptionalshowLoader?: boolean

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

  • OptionaltileSets?: {
        [id: string]: {
            [key: string]: unknown;
        } | "separator";
    }

    TileSets

    • [id: string]: {
          [key: string]: unknown;
      } | "separator"
  • OptionalwebWorkerRendering?: 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