Skip to content

Commit 050aa55

Browse files
author
Samuel Rigaud
committed
Eslint: fix errors
1 parent 0fb4b68 commit 050aa55

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

editor/js/Strings.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ function Strings( config ) {
33
const language = config.getKey( 'language' );
44

55
const values = {
6-
fa: {
7-
'prompt/file/open': 'تمام داده های ذخیره نشده پاک خواهند شد آیا مطمئنید؟',
6+
fa: {
7+
'prompt/file/open': 'تمام داده های ذخیره نشده پاک خواهند شد آیا مطمئنید؟',
88
'prompt/file/failedToOpenProject': 'خطایی در باز کردن پروژه پیش آمده',
99
'prompt/file/export/noMeshSelected': 'هیچ Mesh ای انتخاب نکردید',
1010
'prompt/file/export/noObjectSelected': 'هیچ آبجکتی انتخاب نکردید!',
@@ -176,7 +176,7 @@ fa: {
176176
'sidebar/geometry/buffer_geometry/attributes': 'صفات',
177177
'sidebar/geometry/buffer_geometry/index': 'شاخص',
178178
'sidebar/geometry/buffer_geometry/morphAttributes': 'صفات شکل (مورف)',
179-
'sidebar/geometry/buffer_geometry/morphRelative': 'صفات نسبی (رلتیو)',
179+
'sidebar/geometry/buffer_geometry/morphRelative': 'صفات نسبی (رلتیو)',
180180

181181
'sidebar/geometry/capsule_geometry/radius': 'شعاع',
182182
'sidebar/geometry/capsule_geometry/length': 'طول',
@@ -239,7 +239,7 @@ fa: {
239239

240240
'sidebar/geometry/sphere_geometry/radius': 'شعاع',
241241
'sidebar/geometry/sphere_geometry/widthsegments': 'بخش عرض',
242-
'sidebar/geometry/sphere_geometry/heightsegments': 'بخش ارتفاع',
242+
'sidebar/geometry/sphere_geometry/heightsegments': 'بخش ارتفاع',
243243
'sidebar/geometry/sphere_geometry/phistart': 'شروع فی',
244244
'sidebar/geometry/sphere_geometry/philength': ' طول فی',
245245
'sidebar/geometry/sphere_geometry/thetastart': 'شروع تتا',

examples/jsm/capabilities/WebGPU.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let isAvailable = ( typeof navigator !== 'undefined' && navigator.gpu !== undefined );
1+
let isAvailable = ( typeof navigator !== 'undefined' && navigator.gpu !== undefined );
22

33
if ( typeof window !== 'undefined' && isAvailable ) {
44

examples/jsm/physics/JoltPhysics.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ const NUM_OBJECT_LAYERS = 2;
3939

4040
function setupCollisionFiltering( settings ) {
4141

42-
let objectFilter = new Jolt.ObjectLayerPairFilterTable( NUM_OBJECT_LAYERS );
42+
const objectFilter = new Jolt.ObjectLayerPairFilterTable( NUM_OBJECT_LAYERS );
4343
objectFilter.EnableCollision( LAYER_NON_MOVING, LAYER_MOVING );
4444
objectFilter.EnableCollision( LAYER_MOVING, LAYER_MOVING );
4545

4646
const BP_LAYER_NON_MOVING = new Jolt.BroadPhaseLayer( 0 );
4747
const BP_LAYER_MOVING = new Jolt.BroadPhaseLayer( 1 );
4848
const NUM_BROAD_PHASE_LAYERS = 2;
4949

50-
let bpInterface = new Jolt.BroadPhaseLayerInterfaceTable( NUM_OBJECT_LAYERS, NUM_BROAD_PHASE_LAYERS );
50+
const bpInterface = new Jolt.BroadPhaseLayerInterfaceTable( NUM_OBJECT_LAYERS, NUM_BROAD_PHASE_LAYERS );
5151
bpInterface.MapObjectToBroadPhaseLayer( LAYER_NON_MOVING, BP_LAYER_NON_MOVING );
5252
bpInterface.MapObjectToBroadPhaseLayer( LAYER_MOVING, BP_LAYER_MOVING );
5353

5454
settings.mObjectLayerPairFilter = objectFilter;
5555
settings.mBroadPhaseLayerInterface = bpInterface;
5656
settings.mObjectVsBroadPhaseLayerFilter = new Jolt.ObjectVsBroadPhaseLayerFilterTable( settings.mBroadPhaseLayerInterface, NUM_BROAD_PHASE_LAYERS, settings.mObjectLayerPairFilter, NUM_OBJECT_LAYERS );
5757

58-
};
58+
}
5959

6060
async function JoltPhysics() {
6161

@@ -111,8 +111,8 @@ async function JoltPhysics() {
111111
if ( shape === null ) return;
112112

113113
const body = mesh.isInstancedMesh
114-
? createInstancedBody( mesh, mass, restitution, shape )
115-
: createBody( mesh.position, mesh.quaternion, mass, restitution, shape );
114+
? createInstancedBody( mesh, mass, restitution, shape )
115+
: createBody( mesh.position, mesh.quaternion, mass, restitution, shape );
116116

117117
if ( mass > 0 ) {
118118

@@ -175,8 +175,8 @@ async function JoltPhysics() {
175175

176176
const physics = mesh.userData.physics;
177177

178-
let shape = body.GetShape();
179-
let body2 = createBody( position, { x: 0, y: 0, z: 0, w: 1 }, physics.mass, physics.restitution, shape );
178+
const shape = body.GetShape();
179+
const body2 = createBody( position, { x: 0, y: 0, z: 0, w: 1 }, physics.mass, physics.restitution, shape );
180180

181181
bodies[ index ] = body2;
182182

examples/jsm/physics/RapierPhysics.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function getShape( geometry ) {
4343

4444
// if the buffer is non-indexed, generate an index buffer
4545
const indices = geometry.getIndex() === null
46-
? Uint32Array.from( Array( parseInt( vertices.length / 3 ) ).keys() )
47-
: geometry.getIndex().array;
46+
? Uint32Array.from( Array( parseInt( vertices.length / 3 ) ).keys() )
47+
: geometry.getIndex().array;
4848

4949
return RAPIER.ColliderDesc.trimesh( vertices, indices );
5050

@@ -105,8 +105,8 @@ async function RapierPhysics() {
105105
shape.setRestitution( restitution );
106106

107107
const body = mesh.isInstancedMesh
108-
? createInstancedBody( mesh, mass, shape )
109-
: createBody( mesh.position, mesh.quaternion, mass, shape );
108+
? createInstancedBody( mesh, mass, shape )
109+
: createBody( mesh.position, mesh.quaternion, mass, shape );
110110

111111
if ( mass > 0 ) {
112112

examples/webgpu_animation_retargeting.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
const coloredVignette = screenUV.distance( .5 ).mix( hue( color( 0x0175ad ), time.mul( .1 ) ), hue( color( 0x02274f ), time.mul( .5 ) ) );
8787
const lightSpeedEffect = lightSpeed( normalWorld ).clamp();
88-
const lightSpeedSky = normalWorld.y.remapClamp( -.1, 1 ).mix( 0, lightSpeedEffect );
88+
const lightSpeedSky = normalWorld.y.remapClamp( - .1, 1 ).mix( 0, lightSpeedEffect );
8989
const composedBackground = blendDodge( coloredVignette, lightSpeedSky );
9090

9191
scene.backgroundNode = composedBackground;
@@ -164,7 +164,7 @@
164164

165165
function getSource( sourceModel ) {
166166

167-
const clip = sourceModel.animations[ 0 ]
167+
const clip = sourceModel.animations[ 0 ];
168168

169169
const helper = new THREE.SkeletonHelper( sourceModel.scene );
170170
helpers.add( helper );

examples/webgpu_animation_retargeting_readyplayer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137

138138
function getSource( sourceModel ) {
139139

140-
const clip = sourceModel.animations[ 0 ]
140+
const clip = sourceModel.animations[ 0 ];
141141

142142
const helper = new THREE.SkeletonHelper( sourceModel );
143143
const skeleton = new THREE.Skeleton( helper.bones );

examples/webxr_vr_layers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
// Init layers once in immersive mode and video is ready.
308308
const useLayers = session &&
309309
session.enabledFeatures !== undefined &&
310-
session.enabledFeatures.includes('layers') &&
310+
session.enabledFeatures.includes( 'layers' ) &&
311311
XRMediaBinding !== undefined;
312312

313313
if ( ! useLayers ) {

test/e2e/puppeteer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const exceptionList = [
115115
'webgpu_compute_audio',
116116
'webgpu_compute_texture',
117117
'webgpu_compute_texture_pingpong',
118-
"webgpu_compute_water",
118+
'webgpu_compute_water',
119119
'webgpu_materials',
120120
'webgpu_sandbox',
121121
'webgpu_video_panorama',

test/unit/src/core/Object3D.tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ export default QUnit.module( 'Core', () => {
13171317

13181318
QUnit.test( 'clone', ( assert ) => {
13191319

1320+
/* eslint-disable prefer-const*/
13201321
let a;
13211322
const b = new Object3D();
13221323

0 commit comments

Comments
 (0)