diff --git a/examples/jsm/loaders/FBXLoader.js b/examples/jsm/loaders/FBXLoader.js index 20c025dca54e0c..8369f234a7cb12 100644 --- a/examples/jsm/loaders/FBXLoader.js +++ b/examples/jsm/loaders/FBXLoader.js @@ -1270,7 +1270,7 @@ class FBXTreeParser { } else { - material = new MeshPhongMaterial( { + material = new MeshPhongMaterial( { name: Loader.DEFAULT_MATERIAL_NAME, color: 0xcccccc } ); diff --git a/examples/jsm/loaders/KTX2Loader.js b/examples/jsm/loaders/KTX2Loader.js index 78e1b2a3961a39..3732b8f3e5e31e 100644 --- a/examples/jsm/loaders/KTX2Loader.js +++ b/examples/jsm/loaders/KTX2Loader.js @@ -315,12 +315,14 @@ class KTX2Loader extends Loader { const texture = mipmaps[ 0 ]; texture.mipmaps = mipmaps.map( dt => { + return { data: dt.source.data, width: dt.source.data.width, height: dt.source.data.height, depth: dt.source.data.depth }; + } ); return texture; diff --git a/examples/jsm/loaders/LDrawLoader.js b/examples/jsm/loaders/LDrawLoader.js index 23e2b7b14a9c23..0aa121c3fffc42 100644 --- a/examples/jsm/loaders/LDrawLoader.js +++ b/examples/jsm/loaders/LDrawLoader.js @@ -767,7 +767,7 @@ class LDrawParsedCache { const text = await fileLoader.loadAsync( subobjectURL ); return text; - } catch { + } catch ( _ ) { continue; diff --git a/examples/jsm/loaders/NRRDLoader.js b/examples/jsm/loaders/NRRDLoader.js index 0bbd43b0c96492..41bc8ebc154994 100644 --- a/examples/jsm/loaders/NRRDLoader.js +++ b/examples/jsm/loaders/NRRDLoader.js @@ -473,10 +473,10 @@ class NRRDLoader extends Loader { volume.inverseMatrix = new Matrix4(); volume.inverseMatrix.copy( volume.matrix ).invert(); - + volume.RASDimensions = [ - Math.floor( volume.xLength * spacingX ), - Math.floor( volume.yLength * spacingY ), + Math.floor( volume.xLength * spacingX ), + Math.floor( volume.yLength * spacingY ), Math.floor( volume.zLength * spacingZ ) ]; diff --git a/examples/jsm/loaders/PLYLoader.js b/examples/jsm/loaders/PLYLoader.js index 13894155a005aa..3834bfbfd36984 100644 --- a/examples/jsm/loaders/PLYLoader.js +++ b/examples/jsm/loaders/PLYLoader.js @@ -706,7 +706,7 @@ class PLYLoader extends Loader { // ascii section using \r\n as line endings if ( hasCRNL === true ) i ++; - return { headerText: lines.join( '\r' ) + '\r', headerLength: i }; + return { headerText: lines.join( '\r' ) + '\r', headerLength: i }; } diff --git a/examples/jsm/loaders/VRMLLoader.js b/examples/jsm/loaders/VRMLLoader.js index 5178ea87a4993f..e9df4fa36fad4b 100644 --- a/examples/jsm/loaders/VRMLLoader.js +++ b/examples/jsm/loaders/VRMLLoader.js @@ -960,7 +960,7 @@ class VRMLLoader extends Loader { // if the appearance field is NULL or unspecified, lighting is off and the unlit object color is (0, 0, 0) - let material = new MeshBasicMaterial( { + let material = new MeshBasicMaterial( { name: Loader.DEFAULT_MATERIAL_NAME, color: 0x000000 } ); diff --git a/examples/jsm/misc/Volume.js b/examples/jsm/misc/Volume.js index 3a2fd992968782..949823c6ef37da 100644 --- a/examples/jsm/misc/Volume.js +++ b/examples/jsm/misc/Volume.js @@ -340,20 +340,18 @@ class Volume { } - - let iLength, jLength; - - if( ! this.segmentation ) { + if ( ! this.segmentation ) { firstDirection.applyMatrix4( volume.inverseMatrix ).normalize(); secondDirection.applyMatrix4( volume.inverseMatrix ).normalize(); axisInIJK.applyMatrix4( volume.inverseMatrix ).normalize(); } + firstDirection.arglet = 'i'; secondDirection.arglet = 'j'; - iLength = Math.floor( Math.abs( firstDirection.dot( dimensions ) ) ); - jLength = Math.floor( Math.abs( secondDirection.dot( dimensions ) ) ); + const iLength = Math.floor( Math.abs( firstDirection.dot( dimensions ) ) ); + const jLength = Math.floor( Math.abs( secondDirection.dot( dimensions ) ) ); const planeWidth = Math.abs( iLength * firstSpacing ); const planeHeight = Math.abs( jLength * secondSpacing ); diff --git a/examples/jsm/nodes/geometry/RangeNode.js b/examples/jsm/nodes/geometry/RangeNode.js index a7de4fd2e0863a..196f5a137706a2 100644 --- a/examples/jsm/nodes/geometry/RangeNode.js +++ b/examples/jsm/nodes/geometry/RangeNode.js @@ -44,8 +44,8 @@ class RangeNode extends Node { if ( object.isInstancedMesh === true ) { - let minValue = this.minNode.value; - let maxValue = this.maxNode.value; + const minValue = this.minNode.value; + const maxValue = this.maxNode.value; const minLength = builder.getTypeLength( getValueType( minValue ) ); const maxLength = builder.getTypeLength( getValueType( maxValue ) ); diff --git a/examples/jsm/nodes/shadernode/ShaderNode.js b/examples/jsm/nodes/shadernode/ShaderNode.js index 85748db8a4bf1e..f6a6b70be8652e 100644 --- a/examples/jsm/nodes/shadernode/ShaderNode.js +++ b/examples/jsm/nodes/shadernode/ShaderNode.js @@ -261,7 +261,7 @@ const safeGetNodeType = ( node ) => { return node.getNodeType(); - } catch { + } catch ( _ ) { return undefined; diff --git a/examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js b/examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js index 7ce9052d0f7141..95ee70db367e27 100644 --- a/examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js +++ b/examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js @@ -57,6 +57,7 @@ class WebGPUAttributeUtils { buffer.unmap(); bufferData.buffer = buffer; + } }