diff --git a/examples/jsm/objects/GaussianSplat.js b/examples/jsm/objects/GaussianSplat.js index 5820a3da7ffe0c..06d37fe6af583c 100644 --- a/examples/jsm/objects/GaussianSplat.js +++ b/examples/jsm/objects/GaussianSplat.js @@ -2,9 +2,11 @@ import { Box3, BufferAttribute, InstancedBufferGeometry, + Matrix3, Matrix4, Mesh, NodeMaterial, + Ray, Sphere, StorageBufferAttribute, Vector2, @@ -52,6 +54,8 @@ const WORKGROUP_SIZE = 256; const SORT_DIRECTION_THRESHOLD = 0.9995; const KERNEL_2D_SIZE = 0.3; const SPLAT_KERNEL_CUTOFF = 2; +const COVARIANCE_FLATNESS = 1e-4; +const MIN_RAYCAST_OPACITY = 0.2; const MAX_SCREEN_SPACE_SPLAT_SIZE = 1024; const CLIP_XY = 1.4; @@ -62,6 +66,13 @@ const _sortDirection = /*@__PURE__*/ new Vector3(); const _sortDepthRange = /*@__PURE__*/ new Vector2(); const _worldMatrixInverse = /*@__PURE__*/ new Matrix4(); const _modelViewMatrix = /*@__PURE__*/ new Matrix4(); +const _inverseMatrix = /*@__PURE__*/ new Matrix4(); +const _ray = /*@__PURE__*/ new Ray(); +const _sphere = /*@__PURE__*/ new Sphere(); +const _covarianceMatrix = /*@__PURE__*/ new Matrix3(); +const _originOffset = /*@__PURE__*/ new Vector3(); +const _mDirection = /*@__PURE__*/ new Vector3(); +const _mOriginOffset = /*@__PURE__*/ new Vector3(); const _vector = /*@__PURE__*/ new Vector3(); /** @@ -335,6 +346,51 @@ class GaussianSplat extends Mesh { } + /** + * Computes intersection points between a casted ray and the splats. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast( raycaster, intersects ) { + + const matrixWorld = this.matrixWorld; + + // Checking boundingSphere distance to ray + + if ( this.boundingSphere === null ) this.computeBoundingSphere(); + + _sphere.copy( this.boundingSphere ); + _sphere.applyMatrix4( matrixWorld ); + + if ( raycaster.ray.intersectsSphere( _sphere ) === false ) return; + + // + + _inverseMatrix.copy( matrixWorld ).invert(); + _ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix ); + + // test with bounding box in local space + + if ( this.boundingBox !== null ) { + + if ( _ray.intersectsBox( this.boundingBox ) === false ) return; + + } + + const positionAttribute = this.splatGeometry.getAttribute( 'position' ); + const covarianceAttribute = this.splatGeometry.getAttribute( 'covariance' ); + const colorAttribute = this.splatGeometry.getAttribute( 'color' ); + const count = positionAttribute.count; + + for ( let i = 0; i < count; i ++ ) { + + computeRayIntersection( positionAttribute, covarianceAttribute, colorAttribute, i, matrixWorld, raycaster, intersects, this ); + + } + + } + /** * Updates the draw order if the camera or mesh orientation has changed enough * to need a new sort. @@ -430,6 +486,130 @@ class GaussianSplat extends Mesh { } +// Intersects the ray with the ellipsoid the splat's covariance describes, which reduces to a +// quadratic in t whose smaller root is the near surface. +function computeRayIntersection( positionAttribute, covarianceAttribute, colorAttribute, index, matrixWorld, raycaster, intersects, object ) { + + // skip faint splats - cheapest possible rejection, a single attribute read + if ( colorAttribute.getW( index ) < MIN_RAYCAST_OPACITY ) { + + return; + + } + + // the diagonal of the covariance bounds the splat's drawn extent (same radius used by + // computeBoundingBox/computeBoundingSphere); reject rays that don't pass near the splat + // at all before doing any of the more expensive matrix work below + const c00 = covarianceAttribute.getComponent( index, 0 ); + const c11 = covarianceAttribute.getComponent( index, 3 ); + const c22 = covarianceAttribute.getComponent( index, 5 ); + const maxVariance = Math.max( c00, c11, c22 ); + + if ( maxVariance <= 0 ) { + + return; + + } + + const center = _vector.fromBufferAttribute( positionAttribute, index ); + const boundingRadius = SPLAT_KERNEL_CUTOFF * Math.sqrt( maxVariance ); + + if ( _ray.distanceSqToPoint( center ) > boundingRadius * boundingRadius ) { + + return; + + } + + // the attribute holds the upper triangle of the symmetric covariance + const c01 = covarianceAttribute.getComponent( index, 1 ); + const c02 = covarianceAttribute.getComponent( index, 2 ); + const c12 = covarianceAttribute.getComponent( index, 4 ); + + // splats are often flat enough to make the covariance singular, so the thinnest axis is floored + // relative to the widest to keep the quadratic solvable + const minVariance = maxVariance * COVARIANCE_FLATNESS; + + _covarianceMatrix.set( + c00 + minVariance, c01, c02, + c01, c11 + minVariance, c12, + c02, c12, c22 + minVariance + ); + + const determinant = _covarianceMatrix.determinant(); + + if ( determinant <= 0 ) { + + return; + + } + + // inverse( covariance ), applied below to the ray direction and to the origin offset + _covarianceMatrix.invert(); + + _mDirection.copy( _ray.direction ).applyMatrix3( _covarianceMatrix ); + + // squared length of the ray direction in the ellipsoid's metric; must be positive for a valid covariance + const a = _ray.direction.dot( _mDirection ); + + if ( a <= 0 ) { + + return; + + } + + _originOffset.copy( _ray.origin ).sub( center ); + _mOriginOffset.copy( _originOffset ).applyMatrix3( _covarianceMatrix ); + + const b = 2 * _originOffset.dot( _mDirection ); + const c = _originOffset.dot( _mOriginOffset ) - SPLAT_KERNEL_CUTOFF * SPLAT_KERNEL_CUTOFF; + const discriminant = b * b - 4 * a * c; + + if ( discriminant < 0 ) { + + return; + + } + + const sqrtDiscriminant = Math.sqrt( discriminant ); + let t = ( - b - sqrtDiscriminant ) / ( 2 * a ); + + // the near surface is behind the origin when the ray starts inside the splat + if ( t < 0 ) { + + t = ( - b + sqrtDiscriminant ) / ( 2 * a ); + + } + + if ( t < 0 ) { + + return; + + } + + const intersectPoint = new Vector3(); + _ray.at( t, intersectPoint ).applyMatrix4( matrixWorld ); + + const distance = raycaster.ray.origin.distanceTo( intersectPoint ); + if ( distance < raycaster.near || distance > raycaster.far ) { + + return; + + } + + intersects.push( { + + distance: distance, + point: intersectPoint, + index: index, + face: null, + faceIndex: null, + barycoord: null, + object: object + + } ); + +} + function createGeometry( count ) { const geometry = new InstancedBufferGeometry(); diff --git a/examples/tags.json b/examples/tags.json index 5a859d1051c3f4..b1492d2b694063 100644 --- a/examples/tags.json +++ b/examples/tags.json @@ -49,6 +49,9 @@ "webgl_interactive_raycasting_points": [ "raycast" ], "webgl_interactive_voxelpainter": [ "raycast" ], "webgl_layers": [ "groups" ], + "webgl_lightprobes": [ "global illumination", "indirect diffuse" ], + "webgl_lightprobes_complex": [ "global illumination", "indirect diffuse" ], + "webgl_lightprobes_sponza": [ "global illumination", "indirect diffuse" ], "webgl_lights_hemisphere": [ "directional" ], "webgl_lights_pointlights": [ "multiple" ], "webgl_lines_fat": [ "gpu", "stats", "panel" ], @@ -144,6 +147,9 @@ "webgpu_compute_texture_pingpong": [ "gpgpu" ], "webgpu_compute_water": [ "gpgpu", "struct" ], "webgpu_depth_texture": [ "renderTarget" ], + "webgpu_lightprobes": [ "global illumination", "indirect diffuse" ], + "webgpu_lightprobes_complex": [ "global illumination", "indirect diffuse" ], + "webgpu_lightprobes_sponza": [ "global illumination", "indirect diffuse" ], "webgpu_loader_gltf_dispersion": [ "transmission" ], "webgpu_materials_lightmap": [ "shadow" ], "webgpu_materials_sss": [ "subsurface scattering", "derivatives", "translucency" ], diff --git a/examples/webgpu_gaussian_splat.html b/examples/webgpu_gaussian_splat.html index 0d664656dd43fe..9f57870aaa29c8 100644 --- a/examples/webgpu_gaussian_splat.html +++ b/examples/webgpu_gaussian_splat.html @@ -49,10 +49,18 @@ import { GaussianSplat } from 'three/addons/objects/GaussianSplat.js'; import { Inspector } from 'three/addons/inspector/Inspector.js'; - let camera, scene, renderer, controls, splats, splatRoot; + let camera, scene, renderer, controls, splats, splatRoot, hitMarker; THREE.ColorManagement.workingColorSpace = THREE.SRGBColorSpace; const zeroVector = new THREE.Vector3(); + const raycaster = new THREE.Raycaster(); + const pointer = new THREE.Vector2(); + + // for raycast testing + const CLICK_DRAG_THRESHOLD = 4; + const HIT_MARKER_SIZE_RATIO = 1 / 50; + let pointerDownX = 0; + let pointerDownY = 0; const sources = { millipede: { @@ -135,9 +143,55 @@ } ); + hitMarker = new THREE.Mesh( + new THREE.SphereGeometry( 1, 16, 12 ), + new THREE.MeshBasicMaterial( { color: 0xff0000, depthTest: false } ) + ); + hitMarker.visible = false; + scene.add( hitMarker ); + await loadSplatSource( getSourceKeyByName( params.source ) ); window.addEventListener( 'resize', onWindowResize ); + renderer.domElement.addEventListener( 'pointerdown', onPointerDown ); + renderer.domElement.addEventListener( 'click', onClick ); + + } + + function onPointerDown( event ) { + + pointerDownX = event.clientX; + pointerDownY = event.clientY; + + } + + function onClick( event ) { + + // check drag distance + const dx = event.clientX - pointerDownX; + const dy = event.clientY - pointerDownY; + if ( Math.sqrt( dx * dx + dy * dy ) > CLICK_DRAG_THRESHOLD ) { + + return; + + } + + pointer.x = ( event.clientX / window.innerWidth ) * 2 - 1; + pointer.y = - ( event.clientY / window.innerHeight ) * 2 + 1; + + raycaster.setFromCamera( pointer, camera ); + + const hit = raycaster.intersectObject( splatRoot, true )[ 0 ]; + if ( hit ) { + + hitMarker.position.copy( hit.point ); + hitMarker.visible = true; + + } else { + + hitMarker.visible = false; + + } } @@ -156,11 +210,27 @@ scene.add( splatRoot ); fitCameraToSplats( splats, source ); + updateHitMarkerSize( splats ); updateLicenseInfo( source ); } + function getWorldBoundingSphere( mesh ) { + + mesh.updateWorldMatrix( true, false ); + + return mesh.splatGeometry.boundingSphere.clone().applyMatrix4( mesh.matrixWorld ); + + } + + function updateHitMarkerSize( mesh ) { + + const sphere = getWorldBoundingSphere( mesh ); + hitMarker.scale.setScalar( Math.max( sphere.radius * HIT_MARKER_SIZE_RATIO, 0.0001 ) ); + + } + function updateLicenseInfo( source ) { const license = document.getElementById( 'license' ); @@ -199,9 +269,7 @@ function fitCameraToSplats( mesh, source ) { - mesh.updateWorldMatrix( true, false ); - - const sphere = mesh.splatGeometry.boundingSphere.clone().applyMatrix4( mesh.matrixWorld ); + const sphere = getWorldBoundingSphere( mesh ); const radius = Math.max( sphere.radius, 0.01 ); const distance = radius / Math.sin( THREE.MathUtils.degToRad( camera.fov ) * 0.5 ); diff --git a/test/unit/src/animation/AnimationUtils.tests.js b/test/unit/src/animation/AnimationUtils.tests.js deleted file mode 100644 index 462802263c1f9a..00000000000000 --- a/test/unit/src/animation/AnimationUtils.tests.js +++ /dev/null @@ -1,9 +0,0 @@ -// import * as AnimationUtils from '../../../../src/animation/AnimationUtils.js'; - -export default QUnit.module( 'Animation', () => { - - QUnit.module( 'AnimationUtils', () => { - - } ); - -} ); diff --git a/test/unit/src/animation/PropertyMixer.tests.js b/test/unit/src/animation/PropertyMixer.tests.js deleted file mode 100644 index e8fe6b3b5a3112..00000000000000 --- a/test/unit/src/animation/PropertyMixer.tests.js +++ /dev/null @@ -1,9 +0,0 @@ -// import { PropertyMixer } from '../../../../src/animation/PropertyMixer.js'; - -export default QUnit.module( 'Animation', () => { - - QUnit.module( 'PropertyMixer', () => { - - } ); - -} ); diff --git a/test/unit/src/audio/AudioAnalyser.tests.js b/test/unit/src/audio/AudioAnalyser.tests.js deleted file mode 100644 index 1c0110d5d202ab..00000000000000 --- a/test/unit/src/audio/AudioAnalyser.tests.js +++ /dev/null @@ -1,9 +0,0 @@ -// import { AudioAnalyser } from '../../../../src/audio/AudioAnalyser.js'; - -export default QUnit.module( 'Audios', () => { - - QUnit.module( 'AudioAnalyser', () => { - - } ); - -} ); diff --git a/test/unit/src/extras/Earcut.tests.js b/test/unit/src/extras/Earcut.tests.js deleted file mode 100644 index ea1e0829a3358c..00000000000000 --- a/test/unit/src/extras/Earcut.tests.js +++ /dev/null @@ -1,11 +0,0 @@ -// import { Earcut } from '../../../../src/extras/Earcut.js'; - -export default QUnit.module( 'Extras', () => { - - QUnit.module( 'Earcut', () => { - - // Public - - } ); - -} ); diff --git a/test/unit/src/extras/ImageUtils.tests.js b/test/unit/src/extras/ImageUtils.tests.js deleted file mode 100644 index 0f592e736d5edf..00000000000000 --- a/test/unit/src/extras/ImageUtils.tests.js +++ /dev/null @@ -1,9 +0,0 @@ -// import { ImageUtils } from '../../../../src/extras/ImageUtils.js'; - -export default QUnit.module( 'Extras', () => { - - QUnit.module( 'ImageUtils', () => { - - } ); - -} ); diff --git a/test/unit/src/extras/PMREMGenerator.tests.js b/test/unit/src/extras/PMREMGenerator.tests.js deleted file mode 100644 index 21dda22a521c9c..00000000000000 --- a/test/unit/src/extras/PMREMGenerator.tests.js +++ /dev/null @@ -1,9 +0,0 @@ -// import { PMREMGenerator } from '../../../../src/extras/PMREMGenerator.js'; - -export default QUnit.module( 'Extras', () => { - - QUnit.module( 'PMREMGenerator', () => { - - } ); - -} ); diff --git a/test/unit/src/extras/ShapeUtils.tests.js b/test/unit/src/extras/ShapeUtils.tests.js deleted file mode 100644 index a3dd53f52d06bb..00000000000000 --- a/test/unit/src/extras/ShapeUtils.tests.js +++ /dev/null @@ -1,9 +0,0 @@ -// import { ShapeUtils } from '../../../../src/extras/ShapeUtils.js'; - -export default QUnit.module( 'Extras', () => { - - QUnit.module( 'ShapeUtils', () => { - - } ); - -} ); diff --git a/test/unit/src/extras/core/Interpolations.tests.js b/test/unit/src/extras/core/Interpolations.tests.js deleted file mode 100644 index 1c6a09c2df85d9..00000000000000 --- a/test/unit/src/extras/core/Interpolations.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { CatmullRom, QuadraticBezier, CubicBezier } from '../../../../../src/extras/core/Interpolations.js'; - -export default QUnit.module( 'Extras', () => { - - QUnit.module( 'Core', () => { - - QUnit.module( 'Interpolations', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/WebGLRenderer.tests.js b/test/unit/src/renderers/WebGLRenderer.tests.js deleted file mode 100644 index 66c02a4391eabf..00000000000000 --- a/test/unit/src/renderers/WebGLRenderer.tests.js +++ /dev/null @@ -1,7 +0,0 @@ -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGLRenderer', () => { - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLAttributes.tests.js b/test/unit/src/renderers/webgl/WebGLAttributes.tests.js deleted file mode 100644 index acb47b393dc20a..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLAttributes.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLAttributes } from '../../../../../src/renderers/webgl/WebGLAttributes.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLAttributes', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLBackground.tests.js b/test/unit/src/renderers/webgl/WebGLBackground.tests.js deleted file mode 100644 index bded1d63a965e9..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLBackground.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLBackground } from '../../../../../src/renderers/webgl/WebGLBackground.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLBackground', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLBufferRenderer.tests.js b/test/unit/src/renderers/webgl/WebGLBufferRenderer.tests.js deleted file mode 100644 index 18444cb10e0c9a..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLBufferRenderer.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLBufferRenderer } from '../../../../../src/renderers/webgl/WebGLBufferRenderer.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLBufferRenderer', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLCapabilities.tests.js b/test/unit/src/renderers/webgl/WebGLCapabilities.tests.js deleted file mode 100644 index 4f4175fbff27ca..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLCapabilities.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLCapabilities } from '../../../../../src/renderers/webgl/WebGLCapabilities.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLCapabilities', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLClipping.tests.js b/test/unit/src/renderers/webgl/WebGLClipping.tests.js deleted file mode 100644 index c8bab9eb83fc44..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLClipping.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLClipping } from '../../../../../src/renderers/webgl/WebGLClipping.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLClipping', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLGeometries.tests.js b/test/unit/src/renderers/webgl/WebGLGeometries.tests.js deleted file mode 100644 index f7b8eb95dae0f9..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLGeometries.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLGeometries } from '../../../../../src/renderers/webgl/WebGLGeometries.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLGeometries', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLIndexedBufferRenderer.tests.js b/test/unit/src/renderers/webgl/WebGLIndexedBufferRenderer.tests.js deleted file mode 100644 index 1d97a7e904355b..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLIndexedBufferRenderer.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLIndexedBufferRenderer } from '../../../../../src/renderers/webgl/WebGLIndexedBufferRenderer.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLIndexedBufferRenderer', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLLights.tests.js b/test/unit/src/renderers/webgl/WebGLLights.tests.js deleted file mode 100644 index adbdc75a5924f2..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLLights.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLLights } from '../../../../../src/renderers/webgl/WebGLLights.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLLights', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLMorphtargets.tests.js b/test/unit/src/renderers/webgl/WebGLMorphtargets.tests.js deleted file mode 100644 index fa7e0e2d1d5fbc..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLMorphtargets.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLMorphtargets } from '../../../../../src/renderers/webgl/WebGLMorphtargets.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLMorphtargets', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLObjects.tests.js b/test/unit/src/renderers/webgl/WebGLObjects.tests.js deleted file mode 100644 index 64db6991d2daeb..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLObjects.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLObjects } from '../../../../../src/renderers/webgl/WebGLObjects.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLObjects', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLProgram.tests.js b/test/unit/src/renderers/webgl/WebGLProgram.tests.js deleted file mode 100644 index 33a8670983f915..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLProgram.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLProgram } from '../../../../../src/renderers/webgl/WebGLProgram.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLProgram', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLPrograms.tests.js b/test/unit/src/renderers/webgl/WebGLPrograms.tests.js deleted file mode 100644 index 03b9f7cafcb56b..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLPrograms.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLPrograms } from '../../../../../src/renderers/webgl/WebGLPrograms.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLPrograms', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLProperties.tests.js b/test/unit/src/renderers/webgl/WebGLProperties.tests.js deleted file mode 100644 index d77aa90ece8f93..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLProperties.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLProperties } from '../../../../../src/renderers/webgl/WebGLProperties.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLProperties', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLShader.tests.js b/test/unit/src/renderers/webgl/WebGLShader.tests.js deleted file mode 100644 index 3ca85245ca19df..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLShader.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLShader } from '../../../../../src/renderers/webgl/WebGLShader.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLShader', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLShadowMap.tests.js b/test/unit/src/renderers/webgl/WebGLShadowMap.tests.js deleted file mode 100644 index 4d2846c25ac91f..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLShadowMap.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLShadowMap } from '../../../../../src/renderers/webgl/WebGLShadowMap.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLShadowMap', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLState.tests.js b/test/unit/src/renderers/webgl/WebGLState.tests.js deleted file mode 100644 index 23b1bfab1c8326..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLState.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLState } from '../../../../../src/renderers/webgl/WebGLState.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLState', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLTextures.tests.js b/test/unit/src/renderers/webgl/WebGLTextures.tests.js deleted file mode 100644 index 7241c29cfa6bf3..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLTextures.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLTextures } from '../../../../../src/renderers/webgl/WebGLTextures.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLTextures', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLUniforms.tests.js b/test/unit/src/renderers/webgl/WebGLUniforms.tests.js deleted file mode 100644 index 191c43cb15e88b..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLUniforms.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLUniforms } from '../../../../../src/renderers/webgl/WebGLUniforms.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLUniforms', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/src/renderers/webgl/WebGLUtils.tests.js b/test/unit/src/renderers/webgl/WebGLUtils.tests.js deleted file mode 100644 index ffe30e2989b0f3..00000000000000 --- a/test/unit/src/renderers/webgl/WebGLUtils.tests.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { WebGLUtils } from '../../../../../src/renderers/webgl/WebGLUtils.js'; - -export default QUnit.module( 'Renderers', () => { - - QUnit.module( 'WebGL', () => { - - QUnit.module( 'WebGLUtils', () => { - - } ); - - } ); - -} ); diff --git a/test/unit/three.source.unit.js b/test/unit/three.source.unit.js index d545b5d81c438c..e60c5f9cbb1a63 100644 --- a/test/unit/three.source.unit.js +++ b/test/unit/three.source.unit.js @@ -11,10 +11,8 @@ import './src/animation/AnimationAction.tests.js'; import './src/animation/AnimationClip.tests.js'; import './src/animation/AnimationMixer.tests.js'; import './src/animation/AnimationObjectGroup.tests.js'; -import './src/animation/AnimationUtils.tests.js'; import './src/animation/KeyframeTrack.tests.js'; import './src/animation/PropertyBinding.tests.js'; -import './src/animation/PropertyMixer.tests.js'; //src/animation/tracks import './src/animation/tracks/BooleanKeyframeTrack.tests.js'; @@ -27,7 +25,6 @@ import './src/animation/tracks/VectorKeyframeTrack.tests.js'; //src/audio import './src/audio/Audio.tests.js'; -import './src/audio/AudioAnalyser.tests.js'; import './src/audio/AudioContext.tests.js'; import './src/audio/AudioListener.tests.js'; import './src/audio/PositionalAudio.tests.js'; @@ -62,15 +59,10 @@ import './src/core/UniformsGroup.tests.js'; //src/extras import './src/extras/DataUtils.tests.js'; -import './src/extras/Earcut.tests.js'; -import './src/extras/ImageUtils.tests.js'; -import './src/extras/PMREMGenerator.tests.js'; -import './src/extras/ShapeUtils.tests.js'; //src/extras/core import './src/extras/core/Curve.tests.js'; import './src/extras/core/CurvePath.tests.js'; -import './src/extras/core/Interpolations.tests.js'; import './src/extras/core/Path.tests.js'; import './src/extras/core/Shape.tests.js'; import './src/extras/core/ShapePath.tests.js'; @@ -234,7 +226,6 @@ import './src/objects/Sprite.tests.js'; import './src/renderers/WebGL3DRenderTarget.tests.js'; import './src/renderers/WebGLArrayRenderTarget.tests.js'; import './src/renderers/WebGLCubeRenderTarget.tests.js'; -import './src/renderers/WebGLRenderer.tests.js'; import './src/renderers/WebGLRenderTarget.tests.js'; //src/renderers/shaders @@ -244,27 +235,8 @@ import './src/renderers/shaders/UniformsLib.tests.js'; import './src/renderers/shaders/UniformsUtils.tests.js'; //src/renderers/webgl -import './src/renderers/webgl/WebGLAttributes.tests.js'; -import './src/renderers/webgl/WebGLBackground.tests.js'; -import './src/renderers/webgl/WebGLBufferRenderer.tests.js'; -import './src/renderers/webgl/WebGLCapabilities.tests.js'; -import './src/renderers/webgl/WebGLClipping.tests.js'; import './src/renderers/webgl/WebGLExtensions.tests.js'; -import './src/renderers/webgl/WebGLGeometries.tests.js'; -import './src/renderers/webgl/WebGLIndexedBufferRenderer.tests.js'; -import './src/renderers/webgl/WebGLLights.tests.js'; -import './src/renderers/webgl/WebGLMorphtargets.tests.js'; -import './src/renderers/webgl/WebGLObjects.tests.js'; -import './src/renderers/webgl/WebGLProgram.tests.js'; -import './src/renderers/webgl/WebGLPrograms.tests.js'; -import './src/renderers/webgl/WebGLProperties.tests.js'; import './src/renderers/webgl/WebGLRenderLists.tests.js'; -import './src/renderers/webgl/WebGLShader.tests.js'; -import './src/renderers/webgl/WebGLShadowMap.tests.js'; -import './src/renderers/webgl/WebGLState.tests.js'; -import './src/renderers/webgl/WebGLTextures.tests.js'; -import './src/renderers/webgl/WebGLUniforms.tests.js'; -import './src/renderers/webgl/WebGLUtils.tests.js'; //src/scenes