//previous
// In constructor this._indirectBuffer initialized null
// then this.resolveTriangleIndex use the latter of conditional operator
// result of this.resolveTriangleIndex(i) returns i, even indirect is true
this.resolveTriangleIndex = this._indirectBuffer ? i => this._indirectBuffer[ i ] : i => i;
//fixed
this.resolveTriangleIndex = options.indirect ? i => this._indirectBuffer[ i ] : i => i;
this bug affects three-mesh-pathtracer
[scenario] initialize pathtracer => disable pathtracer => move model => enable pathtracer
previous version
Hi I found a bug in constructor of MeshBVH.js
this bug affects three-mesh-pathtracer [scenario] initialize pathtracer => disable pathtracer => move model => enable pathtracer previous version
https://github.com/gkjohnson/three-mesh-bvh/assets/108255990/18428557-8969-4433-841b-22b737fd87e8
For your Information log
P.S : always thanks fast feedback & amazing library