diff --git a/editor/js/libs/app.js b/editor/js/libs/app.js index 76e20e85db146d..7f26dd0afaeeb5 100644 --- a/editor/js/libs/app.js +++ b/editor/js/libs/app.js @@ -80,7 +80,7 @@ const APP = { const scriptWrapResult = JSON.stringify( scriptWrapResultObj ).replace( /\"/g, '' ); - for ( let uuid in json.scripts ) { + for ( const uuid in json.scripts ) { const object = scene.getObjectByProperty( 'uuid', uuid, true ); @@ -99,7 +99,7 @@ const APP = { const functions = ( new Function( scriptWrapParams, script.source + '\nreturn ' + scriptWrapResult + ';' ).bind( object ) )( this, renderer, scene, camera ); - for ( let name in functions ) { + for ( const name in functions ) { if ( functions[ name ] === undefined ) continue; diff --git a/eslint.config.js b/eslint.config.js index 9c95a1173bf825..319fadbbd5db86 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -12,7 +12,14 @@ export default [ ignores: [ '**/node_modules/**', '**/build/**', - '**/libs/**', + 'examples/jsm/libs/**', + 'editor/js/libs/acorn/**', + 'editor/js/libs/codemirror/**', + 'editor/js/libs/tern-threejs/**', + 'editor/js/libs/ternjs/**', + 'editor/js/libs/esprima.js', + 'editor/js/libs/jsonlint.js', + 'editor/js/libs/signals.min.js', '**/ifc/**', '**/prettify.js', '**/prettify/**', diff --git a/src/animation/PropertyMixer.js b/src/animation/PropertyMixer.js index f5ffbd63a04639..e591f50e17e6f8 100644 --- a/src/animation/PropertyMixer.js +++ b/src/animation/PropertyMixer.js @@ -88,7 +88,7 @@ class PropertyMixer { this._addIndex = 4; /** - * TODO + * Accumulated weight of the property binding. * * @type {number} * @default 0 @@ -96,7 +96,7 @@ class PropertyMixer { this.cumulativeWeight = 0; /** - * TODO + * Accumulated additive weight of the property binding. * * @type {number} * @default 0 @@ -104,7 +104,7 @@ class PropertyMixer { this.cumulativeWeightAdditive = 0; /** - * TODO + * Number of active keyframe tracks currently using this property binding. * * @type {number} * @default 0 @@ -112,7 +112,7 @@ class PropertyMixer { this.useCount = 0; /** - * TODO + * Number of keyframe tracks referencing this property binding. * * @type {number} * @default 0 diff --git a/src/helpers/PointLightHelper.js b/src/helpers/PointLightHelper.js index fbb10435c124f9..a4fa5236d13a63 100644 --- a/src/helpers/PointLightHelper.js +++ b/src/helpers/PointLightHelper.js @@ -57,30 +57,6 @@ class PointLightHelper extends Mesh { this.update(); - - /* - // TODO: delete this comment? - const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 ); - const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } ); - - this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial ); - this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial ); - - const d = light.distance; - - if ( d === 0.0 ) { - - this.lightDistance.visible = false; - - } else { - - this.lightDistance.scale.set( d, d, d ); - - } - - this.add( this.lightDistance ); - */ - } /** diff --git a/src/lights/webgpu/IESSpotLight.js b/src/lights/webgpu/IESSpotLight.js index 06df26ae61e462..f18632b38bc907 100644 --- a/src/lights/webgpu/IESSpotLight.js +++ b/src/lights/webgpu/IESSpotLight.js @@ -22,7 +22,8 @@ class IESSpotLight extends SpotLight { super( color, intensity, distance, angle, penumbra, decay ); /** - * TODO + * The IES map. It's a lookup table that stores normalized attenuation factors + * (0.0 to 1.0) that represent the light's intensity at a specific angle. * * @type {?Texture} * @default null diff --git a/src/nodes/accessors/Texture3DNode.js b/src/nodes/accessors/Texture3DNode.js index 9fd251b36f9021..50dba65f281029 100644 --- a/src/nodes/accessors/Texture3DNode.js +++ b/src/nodes/accessors/Texture3DNode.js @@ -141,10 +141,12 @@ class Texture3DNode extends TextureNode { } /** - * TODO. + * Computes the normal for the given uv. These texture coordiantes represent a + * certain point inside the 3D texture. Unlike geometric normals, this normal + * represents a slope or gradient of scalar data inside the 3D texture. * - * @param {Node} uvNode - The uv node . - * @return {Node} TODO. + * @param {Node} uvNode - The uv node that defines a points in the 3D texture. + * @return {Node} The normal representing the slope/gradient in the data. */ normal( uvNode ) { diff --git a/src/renderers/common/TimestampQueryPool.js b/src/renderers/common/TimestampQueryPool.js index ded466d8e41668..6d287512f61efd 100644 --- a/src/renderers/common/TimestampQueryPool.js +++ b/src/renderers/common/TimestampQueryPool.js @@ -54,7 +54,7 @@ class TimestampQueryPool { this.isDisposed = false; /** - * TODO + * The total frame duration until the next update. * * @type {number} * @default 0 @@ -69,9 +69,11 @@ class TimestampQueryPool { this.frames = []; /** - * TODO + * This property is used to avoid multiple concurrent resolve operations. + * The WebGL backend uses it as a boolean flag. In context of WebGPU, it holds + * the promise of the current resolve operation. * - * @type {boolean} + * @type {boolean|Promise} * @default false */ this.pendingResolve = false; diff --git a/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js b/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js index ebcf069b803a52..538eab0b6c8296 100644 --- a/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +++ b/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js @@ -97,16 +97,6 @@ fn main_cube( Varys: VarysStruct ) -> @location( 0 ) vec4 { return textureSample( imgCube, imgSampler, faceMat[ Varys.vBaseArrayLayer ] * vec3f( fract( Varys.vTex ), 1 ) ); -} - -@group( 0 ) @binding( 1 ) -var imgCubeArray : texture_cube_array; - -@fragment -fn main_cube_array( Varys: VarysStruct ) -> @location( 0 ) vec4 { - - return textureSample( imgCubeArray, imgSampler, faceMat[ Varys.vBaseArrayLayer % 6 ] * vec3f( fract( Varys.vTex ), 1 ), Varys.vBaseArrayLayer ); - } `;