diff --git a/bim.js b/bim.js index 3b97eda..7b81347 100644 --- a/bim.js +++ b/bim.js @@ -30,7 +30,6 @@ BIM.init = function (container) { } /** * @param {HTMLElement} container The scene container element - * @returns {OBC.Components} */ BIM.createScene = function (container) { this.init(container); @@ -42,6 +41,18 @@ BIM.createScene = function (container) { // (zoom_level, position) this.world.camera.controls.setLookAt(15, 15, 15, 0, 0, 0); } +/** + * @param {HTMLElement} container The scene container element + */ +BIM.activateClipper = function () { + const casters = this.components.get(OBC.Raycasters); + casters.get(this.world); + // Enable plane clipper + const clipper = this.components.get(OBC.Clipper); + clipper.enabled = true; + clipper.create(this.world); + clipper.visible = true; +} /** * @todo Serve web-ifc.wasm locally via AJAX * @param {ArrayBuffer} buffer The uploaded IFC file diff --git a/index.html b/index.html index f051a49..df2c0b7 100644 --- a/index.html +++ b/index.html @@ -35,7 +35,7 @@
-
+