How to use the @xeokit/xeokit-sdk/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js.XKTLoaderPlugin 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
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;
    viewer.scene.xrayMaterial.edgeColor = [0, 0, 0];
    viewer.scene.highlightMaterial.fill = false;
    viewer.scene.highlightMaterial.fillAlpha = 0.3;
    viewer.scene.highlightMaterial.edgeColor = [1, 1, 0];

    const xktLoader = new XKTLoaderPlugin(viewer);
    const model = xktLoader.load({
      id: "xeokit-model-" + ifcModelId,
      src: xktFileUrl,
      metaModelSrc: metadataFileUrl,
      edges: true
    });
    //------------------------------------------------------------------------------------------------------------------
    // Mouse over entities to highlight them
    //------------------------------------------------------------------------------------------------------------------
    var lastEntity = null;
    viewer.scene.input.on("mousemove", function (coords) {
      var hit = viewer.scene.pick({
        canvasPos: coords
      });
      if (hit) {
        if (!lastEntity || hit.entity.id !== lastEntity.id) {

@xeokit/xeokit-sdk

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

See LICENSE.txt
Latest version published 12 days ago

Package Health Score

84 / 100
Full package analysis