Parcourir la source

Box3B recompute only on precise. Add _testStarted class.

master
Palash Bansal il y a 1 an
Parent
révision
231ed8ea57
Aucun compte lié à l'adresse e-mail de l'auteur
2 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 1
    0
      src/testing/testing.ts
  2. 1
    1
      src/three/math/Box3B.ts

+ 1
- 0
src/testing/testing.ts Voir le fichier

@@ -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 Voir le fichier

@@ -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!()


Chargement…
Annuler
Enregistrer