Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Sep 28, 2024
1 parent 66af558 commit f2aa204
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/RandomRaycasts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
AVERAGE,
} from '../src/index.js';
import { random, setSeed } from './utils.js';
import { REVISION } from 'three';

Mesh.prototype.raycast = acceleratedRaycast;
BufferGeometry.prototype.computeBoundsTree = computeBoundsTree;
Expand Down Expand Up @@ -54,11 +55,17 @@ describe( 'Random Batched CENTER intersections', () => runRandomTests( { strateg
describe( 'Random Batched AVERAGE intersections', () => runRandomTests( { strategy: AVERAGE, batched: true } ) );
describe( 'Random Batched SAH intersections', () => runRandomTests( { strategy: SAH, batched: true } ) );
describe( 'Random Batched CENTER intersections only one geometry with boundTree', () => runRandomTests( { strategy: CENTER, batched: true, onlyOneGeo: true } ) );
// describe( 'Random Batched CENTER intersections replacing a geometry', () => runRandomTests( { strategy: CENTER, batched: true, replaceGeo: true } ) );
// describe( 'Random Batched CENTER intersections with three version below 166', () => runRandomTests( { strategy: CENTER, batched: true, olderVersion: true } ) );

function runRandomTests( options ) {

// TODO: remove in future release
const IS_REVISION_166 = parseInt( REVISION ) >= 166;
if ( options.batched && ! IS_REVISION_166 ) {

return;

}

const transformSeed = Math.floor( Math.random() * 1e10 );
describe( `Transform Seed : ${ transformSeed }`, () => {

Expand Down

0 comments on commit f2aa204

Please sign in to comment.