t', 1, MAX_RAYS, 1 );
				rayFolder.add( params, 'firstHitOnly' );
				rayFolder.add( params, 'useBVH' ).onChange( v => {

					mesh.geometry.boundsTree = v ? bvh : null;

				} );

				const helperFolder = gui.addFolder( 'BVH Helper' );
				helperFolder.add( params, 'displayHelper' );
				helperFolder.add( params, 'helperDepth', 1, 20, 1 ).onChange( v => {

					helper.depth = v;
					helper.update();

				} );

				window.addEventListener( 'resize', onWindowResize );
				onWindowResize();

				initRays();