Hierarchy

Constructors

Properties

ctrlId: string

This is the actual name of the component

rendered: boolean
self: {
    TypeStr: string;
}

Type declaration

  • TypeStr: string
TypeStr: string

Methods

  • Returns number

  • Returns {
        height: number;
        width: number;
    }

    • height: number
    • width: number
  • Waits until the viewer was fully loaded & bootstrapped before returning the viewer instance.

    Returns

    A Viewer instance or throws if an unexpected error occurs during bootstrapping.

    Returns Promise<Viewer>

  • Parameters

    • cls: string

    Returns boolean

  • When setting the viewer controls version property to Injected, this function is used to provide the viewer which should be used by the control.

    Example usage:

    import { Viewer } from '@combeenation/3d-viewer';
    // ...
    CfgrUtils.onCfgrReady(() => {
    // ...
    CtrlUtils.getViewerCtrl('viewer3d').injectViewer(Viewer);
    // ...
    });

    See Combeenation docs for more details on how to use this.

    Parameters

    • ViewerClass: any
    • Optional eventCallbacks: {
          onAfterParametersApplied?: ((modelVisibility: ModelVisibilityEntry[], parameterValues: ParameterValues) => void);
          onAfterViewerCreated?: ((viewer: Viewer) => Promise<void>);
          onBeforeCreateViewer?: ((viewerSettings: ViewerSettings) => void);
      }

      Defintion of viewer control callbacks

      import { Viewer, ViewerSettings, ModelVisibilityEntry, ParameterValues } from '@combeenation/3d-viewer';
      // ...

      viewerCtrl.injectViewer(Viewer, {
      onBeforeCreateViewer: (viewerSettings: ViewerSettings) => {
      // overwrite settings which are used for the viewer creation
      viewerSettings.limitTextureSize = { devices: 'iPhone', size: 512 };
      },
      onAfterViewerCreated: async (viewer: Viewer) => {
      // viewer is available at this time but the initial parameters have not been applied yet
      // => good chance to add custom parameters
      setCustomParameterObservers(viewer);
      // also create some material clones that are targeted by the initial parameter update
      await createMaterialClones();
      // also setup scene (add lights, ground, etc...)
      initSetupScene(viewer);
      },
      onAfterParametersApplied: (modelVisibility: ModelVisibilityEntry[], parameterValues: ParameterValues) => {
      // e.g. center camera if model has been changed
      if (modelVisibility.length) {
      await centerCamera();
      }
      },
      });
      • Optional onAfterParametersApplied?: ((modelVisibility: ModelVisibilityEntry[], parameterValues: ParameterValues) => void)
          • (modelVisibility: ModelVisibilityEntry[], parameterValues: ParameterValues): void
          • Parameters

            • modelVisibility: ModelVisibilityEntry[]
            • parameterValues: ParameterValues

            Returns void

      • Optional onAfterViewerCreated?: ((viewer: Viewer) => Promise<void>)
          • (viewer: Viewer): Promise<void>
          • Parameters

            • viewer: Viewer

            Returns Promise<void>

      • Optional onBeforeCreateViewer?: ((viewerSettings: ViewerSettings) => void)
          • (viewerSettings: ViewerSettings): void
          • Parameters

            • viewerSettings: ViewerSettings

            Returns void

    Returns void

  • Parameters

    • value: string

      A css compliant background string

    Returns void

  • Parameters

    • value: string | number

      CSS size string with or without unit or number which will be interpreted as px

    Returns void

  • Show or hide the control

    Parameters

    • value: boolean | CtrlVisibility

      True: "Show"
      False: "PluggedOut"

    • Optional updateCtrlProperty: boolean

    Returns void

  • Parameters

    • value: string

      CSS size string with or without unit or number which will be interpreted as px

    Returns void

  • Parameters

    • value: boolean

    Returns void

  • Set the content of the tooltip

    Parameters

    • content: string

      Plain text or HTML

    Returns void

  • Parameters

    • cls: string

      One or more CSS classes which are added to the control. Previously added classes are removed.

    Returns void

  • Starts augmented reality session for the current scene content of the viewer control.

    This includes:

    • preparation and optimization of the 3d model for AR
    • redirection to AR endpoint on AR capable devices (mobiles)
    • create QR code with link to AR endpoint on non AR capable devices (desktops)
    • handle popups blocked by browsers by showing a manual link to the AR endpoint instead of performing the automatic redirect

    See Combeenation docs for more details on how to use this.

    Parameters

    Returns void

Generated using TypeDoc