Solve clipper issue
This commit is contained in:
parent
4c5af75d66
commit
4eab2bdcbc
10
bim.js
10
bim.js
@ -33,13 +33,13 @@ BIM.init = function (container) {
|
|||||||
*/
|
*/
|
||||||
BIM.createScene = function (container) {
|
BIM.createScene = function (container) {
|
||||||
this.init(container);
|
this.init(container);
|
||||||
|
|
||||||
this.world.scene.setup();
|
|
||||||
// Add a grid to the scene
|
// Add a grid to the scene
|
||||||
const grids = this.components.get(OBC.Grids);
|
const grids = this.components.get(OBC.Grids);
|
||||||
const grid = grids.create(this.world);
|
const grid = grids.create(this.world);
|
||||||
// (zoom_level, position)
|
// (zoom_level, position)
|
||||||
this.world.camera.controls.setLookAt(15, 15, 15, 0, 0, 0);
|
this.world.camera.controls.setLookAt(15, 15, 15, 0, 0, 0);
|
||||||
|
|
||||||
|
this.world.scene.setup();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param {HTMLElement} container The scene container element
|
* @param {HTMLElement} container The scene container element
|
||||||
@ -91,6 +91,10 @@ BIM.loadIfc = async function (buffer, name) {
|
|||||||
model.name = name;
|
model.name = name;
|
||||||
this.world.scene.three.add(model);
|
this.world.scene.three.add(model);
|
||||||
|
|
||||||
|
for (const fragment of model.items) {
|
||||||
|
this.world.meshes.add(fragment.mesh);
|
||||||
|
}
|
||||||
|
|
||||||
// Useful?
|
// Useful?
|
||||||
this.fragments = fragments;
|
this.fragments = fragments;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
@ -140,4 +144,4 @@ BIM.setupHighligther = async function (model) {
|
|||||||
this.highlighter = highlighter;
|
this.highlighter = highlighter;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BIM;
|
export default BIM;
|
||||||
|
Loading…
Reference in New Issue
Block a user