@@ -39,23 +39,23 @@ const NUM_OBJECT_LAYERS = 2;
3939
4040function setupCollisionFiltering ( settings ) {
4141
42- let objectFilter = new Jolt . ObjectLayerPairFilterTable ( NUM_OBJECT_LAYERS ) ;
42+ const objectFilter = new Jolt . ObjectLayerPairFilterTable ( NUM_OBJECT_LAYERS ) ;
4343 objectFilter . EnableCollision ( LAYER_NON_MOVING , LAYER_MOVING ) ;
4444 objectFilter . EnableCollision ( LAYER_MOVING , LAYER_MOVING ) ;
4545
4646 const BP_LAYER_NON_MOVING = new Jolt . BroadPhaseLayer ( 0 ) ;
4747 const BP_LAYER_MOVING = new Jolt . BroadPhaseLayer ( 1 ) ;
4848 const NUM_BROAD_PHASE_LAYERS = 2 ;
4949
50- let bpInterface = new Jolt . BroadPhaseLayerInterfaceTable ( NUM_OBJECT_LAYERS , NUM_BROAD_PHASE_LAYERS ) ;
50+ const bpInterface = new Jolt . BroadPhaseLayerInterfaceTable ( NUM_OBJECT_LAYERS , NUM_BROAD_PHASE_LAYERS ) ;
5151 bpInterface . MapObjectToBroadPhaseLayer ( LAYER_NON_MOVING , BP_LAYER_NON_MOVING ) ;
5252 bpInterface . MapObjectToBroadPhaseLayer ( LAYER_MOVING , BP_LAYER_MOVING ) ;
5353
5454 settings . mObjectLayerPairFilter = objectFilter ;
5555 settings . mBroadPhaseLayerInterface = bpInterface ;
5656 settings . mObjectVsBroadPhaseLayerFilter = new Jolt . ObjectVsBroadPhaseLayerFilterTable ( settings . mBroadPhaseLayerInterface , NUM_BROAD_PHASE_LAYERS , settings . mObjectLayerPairFilter , NUM_OBJECT_LAYERS ) ;
5757
58- } ;
58+ }
5959
6060async function JoltPhysics ( ) {
6161
@@ -111,8 +111,8 @@ async function JoltPhysics() {
111111 if ( shape === null ) return ;
112112
113113 const body = mesh . isInstancedMesh
114- ? createInstancedBody ( mesh , mass , restitution , shape )
115- : createBody ( mesh . position , mesh . quaternion , mass , restitution , shape ) ;
114+ ? createInstancedBody ( mesh , mass , restitution , shape )
115+ : createBody ( mesh . position , mesh . quaternion , mass , restitution , shape ) ;
116116
117117 if ( mass > 0 ) {
118118
@@ -175,8 +175,8 @@ async function JoltPhysics() {
175175
176176 const physics = mesh . userData . physics ;
177177
178- let shape = body . GetShape ( ) ;
179- let body2 = createBody ( position , { x : 0 , y : 0 , z : 0 , w : 1 } , physics . mass , physics . restitution , shape ) ;
178+ const shape = body . GetShape ( ) ;
179+ const body2 = createBody ( position , { x : 0 , y : 0 , z : 0 , w : 1 } , physics . mass , physics . restitution , shape ) ;
180180
181181 bodies [ index ] = body2 ;
182182
0 commit comments