openbim-components
Advanced tools
Comparing version 0.0.30 to 0.0.31
@@ -44,2 +44,3 @@ import * as THREE from "three"; | ||
private readonly scaleFactor; | ||
private readonly invisibleBoxes; | ||
private colors; | ||
@@ -46,0 +47,0 @@ constructor(components: Components, updateInterval?: number, rtWidth?: number, rtHeight?: number, autoUpdate?: boolean); |
@@ -30,2 +30,3 @@ import * as THREE from "three"; | ||
this.scaleFactor = 0.00001; | ||
this.invisibleBoxes = new Set(); | ||
this.colors = { r: 0, g: 0, b: 0, i: 0 }; | ||
@@ -189,5 +190,12 @@ this.updateVisibility = (force) => { | ||
continue; | ||
const isVisible = proxy.index < proxy.mesh.count; | ||
const id = `${fragID}-${proxy.index}`; | ||
const isVisible = !this.invisibleBoxes.has(id); | ||
if (isVisible === visible) | ||
continue; | ||
if (visible) { | ||
this.invisibleBoxes.delete(id); | ||
} | ||
else { | ||
this.invisibleBoxes.add(id); | ||
} | ||
proxy.mesh.getMatrixAt(proxy.index, tempMatrix); | ||
@@ -194,0 +202,0 @@ tempMatrix.premultiply(scaleMatrix); |
{ | ||
"name": "openbim-components", | ||
"main": "dist/index.js", | ||
"version": "0.0.30", | ||
"version": "0.0.31", | ||
"packageManager": "yarn@3.2.1", | ||
@@ -6,0 +6,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
534788
8429