Explorar el Código

Box3B recompute only on precise. Add _testStarted class.

master
Palash Bansal hace 1 año
padre
commit
231ed8ea57
No account linked to committer's email address
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1
    0
      src/testing/testing.ts
  2. 1
    1
      src/three/math/Box3B.ts

+ 1
- 0
src/testing/testing.ts Ver fichero

@@ -6,4 +6,5 @@ export function _testFinish(): void {
// eslint-disable-next-line @typescript-eslint/naming-convention
export function _testStart(): void {
window.dispatchEvent(new Event('threepipe-test-started'))
document.body.classList.add('_testStarted')
}

+ 1
- 1
src/three/math/Box3B.ts Ver fichero

@@ -30,7 +30,7 @@ export class Box3B extends Box3 {
// InstancedMesh has boundingBox = null, so it can be computed
if ((object as IObject3D).boundingBox !== undefined) {

if (/* (object as IObject3D).boundingBox === null && */typeof (object as IObject3D).computeBoundingBox === 'function') {
if ((precise || (object as IObject3D).boundingBox === null) && typeof (object as IObject3D).computeBoundingBox === 'function') {

(object as IObject3D).computeBoundingBox!()


Cargando…
Cancelar
Guardar