How to use the @xeokit/xeokit-sdk/src/viewer/Viewer.js.Viewer function in @xeokit/xeokit-sdk

To help you get started, we’ve selected a few @xeokit/xeokit-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opf / openproject / frontend / src / app / modules / ifc_models / xeokit-viewer.js View on Github external
constructor(ifcModelId, xktFileUrl, metadataFileUrl) {
    const viewer = new Viewer({
      canvasId: 'xeokit-model-canvas-' + ifcModelId,
      transparent: true
    });
    const cameraControl = viewer.cameraControl;
    const scene = viewer.scene;
    const cameraFlight = viewer.cameraFlight;
    cameraControl.panToPointer = true;
    cameraControl.doublePickFlyTo = true;
    cameraFlight.duration = 1.0;
    cameraFlight.fitFOV = 25;
    viewer.camera.eye = [-2.56, 8.38, 8.27];
    viewer.camera.look = [13.44, 3.31, -14.83];
    viewer.camera.up = [0.10, 0.98, -0.14];
    viewer.scene.xrayMaterial.fillAlpha = 0.1;
    viewer.scene.xrayMaterial.fillColor = [0, 0, 0];
    viewer.scene.xrayMaterial.edgeAlpha = 0.4;

@xeokit/xeokit-sdk

Web Programming Toolkit for 3D/2D BIM and AEC Graphics

See LICENSE.txt
Latest version published 15 days ago

Package Health Score

84 / 100
Full package analysis