Skip to content

Commit 4870f07

Browse files
s-rigaudSamuel Rigaud
andauthored
fix typos (#31447)
Co-authored-by: Samuel Rigaud <[email protected]>
1 parent 849b524 commit 4870f07

12 files changed

+54
-54
lines changed

examples/jsm/transpiler/GLSLDecoder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ class GLSLDecoder {
861861

862862
const switchDeterminantTokens = this.readTokensUntil( ')' );
863863

864-
// Parse expresison between parentheses. Index 1: char after '('. Index -1: char before ')'
864+
// Parse expression between parentheses. Index 1: char after '('. Index -1: char before ')'
865865
const discriminant = this.parseExpressionFromTokens( switchDeterminantTokens.slice( 1, - 1 ) );
866866

867867
// Validate curly braces

examples/webgl_loader_obj.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
materials.preload();
5757

5858
const objLoader = new OBJLoader().setPath( 'models/obj/male02/' );
59-
objLoader.setMaterials( materials ); // optional since OBJ asstes can be loaded without an accompanying MTL file
59+
objLoader.setMaterials( materials ); // optional since OBJ assets can be loaded without an accompanying MTL file
6060

6161
const object = await objLoader.loadAsync( 'male02.obj' );
6262

examples/webgl_tonemapping.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
scene = new THREE.Scene();
9595
scene.backgroundBlurriness = params.blurriness;
9696

97-
const light = new THREE.DirectionalLight( 0xfff3ee, 3 ); // simualte sun
97+
const light = new THREE.DirectionalLight( 0xfff3ee, 3 ); // simulate sun
9898
light.position.set( 1, 0.05, 0.7 );
9999
scene.add( light );
100100

examples/webgpu_centroid_sampling.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
align-items: center;
2626
}
2727

28-
#antialising-disabled {
28+
#antialiasing-disabled {
2929
border-right: 1px solid black;
3030
}
3131

@@ -36,11 +36,11 @@
3636
</style>
3737
<body>
3838
<div id="demo">
39-
<div id="antialising-disabled" class="renderer-wrapper">
40-
<div>antialising disabled</div>
39+
<div id="antialiasing-disabled" class="renderer-wrapper">
40+
<div>antialiasing disabled</div>
4141
</div>
42-
<div id="antialising-enabled" class="renderer-wrapper">
43-
<div>antialising enabled</div>
42+
<div id="antialiasing-enabled" class="renderer-wrapper">
43+
<div>antialiasing enabled</div>
4444
</div>
4545
</div>
4646

@@ -140,7 +140,7 @@
140140
);
141141

142142
return geometry;
143-
143+
144144
};
145145

146146
const material = new THREE.MeshBasicNodeMaterial();
@@ -197,9 +197,9 @@
197197
mesh.position.set( x * 2, y * 2, 0 );
198198
faceMeshes.push( mesh );
199199
scene.add( mesh );
200-
200+
201201
}
202-
202+
203203
}
204204

205205
// Create Standard Renderer
@@ -218,13 +218,13 @@
218218
forceWebGL: forceWebGL
219219
} );
220220

221-
document.body.querySelector( '#antialising-enabled' ).appendChild( rendererAntialiasingEnabled.domElement );
221+
document.body.querySelector( '#antialiasing-enabled' ).appendChild( rendererAntialiasingEnabled.domElement );
222222
rendererAntialiasingEnabled.setPixelRatio( window.devicePixelRatio );
223223
rendererAntialiasingEnabled.setSize( window.innerWidth / 2, window.innerHeight );
224224
rendererAntialiasingEnabled.setAnimationLoop( animateAliased );
225-
226-
document.body.querySelector( '#antialising-disabled' ).appendChild( rendererAntialiasingDisabled.domElement );
227-
document.body.querySelector( '#antialising-disabled' ).appendChild( rendererAntialiasingDisabled.domElement );
225+
226+
document.body.querySelector( '#antialiasing-disabled' ).appendChild( rendererAntialiasingDisabled.domElement );
227+
document.body.querySelector( '#antialiasing-disabled' ).appendChild( rendererAntialiasingDisabled.domElement );
228228

229229
onWindowResize();
230230

@@ -256,7 +256,7 @@
256256

257257
}
258258

259-
259+
260260
} );
261261

262262
}
@@ -267,7 +267,7 @@
267267
rendererAntialiasingDisabled.setSize( halfWidth, window.innerHeight );
268268
rendererAntialiasingEnabled.setSize( halfWidth, window.innerHeight );
269269
const aspect = ( halfWidth ) / window.innerHeight;
270-
270+
271271
camera.aspect = aspect;
272272
camera.updateProjectionMatrix();
273273

@@ -276,13 +276,13 @@
276276
function animateStandard() {
277277

278278
rendererAntialiasingDisabled.render( scene, camera );
279-
279+
280280
}
281281

282282
function animateAliased() {
283283

284284
rendererAntialiasingEnabled.render( scene, camera );
285-
285+
286286
}
287287

288288
</script>

examples/webgpu_compute_water.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
// Get 2-D compute coordinate from one-dimensional instanceIndex. The calculation will
152152
// still work even if you dispatch your compute shader 2-dimensionally, since within a compute
153153
// context, instanceIndex is a 1-dimensional value derived from the workgroup dimensions.
154-
154+
155155
// Cast to int to prevent unintended index overflow upon subtraction.
156156
const x = int( index.mod( WIDTH ) );
157157
const y = int( index.div( WIDTH ) );
@@ -168,7 +168,7 @@
168168

169169
const westIndex = y.mul( width ).add( leftX );
170170
const eastIndex = y.mul( width ).add( rightX );
171-
171+
172172
const southIndex = bottomY.mul( width ).add( x );
173173
const northIndex = topY.mul( width ).add( x );
174174

@@ -283,7 +283,7 @@
283283
meshRay.matrixAutoUpdate = false;
284284
meshRay.updateMatrix();
285285
scene.add( meshRay );
286-
286+
287287
// Initialize sphere mesh instance position and velocity.
288288
// position<vec3> + velocity<vec2> + unused<vec3> = 8 floats per sphere.
289289
// for structs arrays must be enclosed in multiple of 4
@@ -339,7 +339,7 @@
339339
const targetY = waterHeight.add( yOffset );
340340

341341
const deltaY = targetY.sub( instancePosition.y );
342-
instancePosition.y.addAssign( deltaY.mul( verticalResponseFactor ) ); // Atualiza Y gradualmente
342+
instancePosition.y.addAssign( deltaY.mul( verticalResponseFactor ) ); // Gradually update position
343343

344344
// Get the normal of the water surface at the duck's position
345345
const pushX = normalX.mul( waterPushFactor );
@@ -373,7 +373,7 @@
373373
If( instancePosition.z.lessThan( - limit ), () => {
374374

375375
instancePosition.z = - limit;
376-
velocity.y.mulAssign( bounceDamping ); // Inverte e amortece vz (velocity.y)
376+
velocity.y.mulAssign( bounceDamping ); // Invert and damp vz (velocity.y)
377377

378378
} ).ElseIf( instancePosition.z.greaterThan( limit ), () => {
379379

@@ -448,18 +448,18 @@
448448
gui.add( effectController.viscosity, 'value', 0.9, 0.96, 0.001 ).name( 'viscosity' );
449449
gui.add( effectController, 'speed', 1, 6, 1 );
450450
gui.add( effectController, 'ducksEnabled' ).onChange( () => {
451-
451+
452452
duckMesh.visible = effectController.ducksEnabled;
453-
453+
454454
} );
455455
gui.add( effectController, 'wireframe' ).onChange( () => {
456-
456+
457457
waterMesh.material.wireframe = ! waterMesh.material.wireframe;
458458
poolBorder.material.wireframe = ! poolBorder.material.wireframe;
459459
duckModel.material.wireframe = ! duckModel.material.wireframe;
460460
waterMesh.material.needsUpdate = true;
461461
poolBorder.material.needsUpdate = true;
462-
462+
463463
} );
464464

465465
}
@@ -484,7 +484,7 @@
484484
mouseDown = true;
485485
firstClick = true;
486486
updateOriginMouseDown = true;
487-
487+
488488
}
489489

490490
function onPointerUp() {
@@ -529,7 +529,7 @@
529529
effectController.mousePos.value.set( point.x, point.z );
530530

531531
updateOriginMouseDown = false;
532-
532+
533533
}
534534

535535
effectController.mouseSpeed.value.set(
@@ -554,7 +554,7 @@
554554
}
555555

556556
firstClick = false;
557-
557+
558558
} else {
559559

560560
updateOriginMouseDown = true;
@@ -582,7 +582,7 @@
582582
}
583583

584584
frame = 0;
585-
585+
586586
}
587587

588588
renderer.render( scene, camera );

examples/webgpu_layers.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
camera.position.z = 10;
4747

4848
scene = new THREE.Scene();
49-
49+
5050
const horizontalEffect = screenUV.x.mix( color( 0xf996ae ), color( 0xf6f0a3 ) );
5151
const lightEffect = screenUV.distance( vec2( 0.5, 1.0 ) ).oneMinus().mul( color( 0xd9b6fd ) );
5252

@@ -137,7 +137,7 @@
137137
const v = new THREE.Vector3();
138138

139139
for ( let i = 0; i < count; i ++ ) {
140-
140+
141141
positions.push(
142142
THREE.MathUtils.randFloat( - 25, - 20 ),
143143
THREE.MathUtils.randFloat( - 10, 50 ),
@@ -179,8 +179,8 @@
179179
const localTime = instancedBufferAttribute( timeAttribute ).add( time.mul( 0.02 ) );
180180
const modTime = mod( localTime, 1.0 );
181181

182-
const rotatedPositon = rotate( positionLocal, instanceRotation.mul( modTime.mul( 20 ) ) );
183-
material.positionNode = rotatedPositon.add( instancePosition ).add( instanceDirection.mul( modTime.mul( 50 ) ) );
182+
const rotatedPosition = rotate( positionLocal, instanceRotation.mul( modTime.mul( 20 ) ) );
183+
material.positionNode = rotatedPosition.add( instancePosition ).add( instanceDirection.mul( modTime.mul( 50 ) ) );
184184

185185
return material;
186186

examples/webgpu_lights_pointlights.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import { abs, attribute, distance, float, max, modelWorldMatrixInverse, positionLocal, sin, time, uniform } from 'three/tsl';
3636

3737
let camera, scene, timer, renderer, controls;
38-
38+
3939
let light1, light2;
4040

4141
init();
@@ -78,7 +78,7 @@
7878
scene.add( light2 );
7979

8080
scene.add( new THREE.AmbientLight( 0xaaaaaa, 0.1 ) );
81-
81+
8282
// renderer
8383

8484
renderer = new THREE.WebGPURenderer( { antialias: true } );
@@ -128,7 +128,7 @@
128128
function createMaterial() {
129129

130130
const material = new THREE.MeshPhongNodeMaterial();
131-
131+
132132
const seedAttribute = attribute( 'seed' );
133133
const displaceNormalAttribute = attribute( 'displaceNormal' );
134134

@@ -152,7 +152,7 @@
152152
}
153153

154154
function createGeometry( geometry ) {
155-
155+
156156
const positionAttribute = geometry.getAttribute( 'position' );
157157

158158
const v0 = new THREE.Vector3();
@@ -179,7 +179,7 @@
179179
v3.copy( v0 ).add( v1 ).add( v2 ).divideScalar( 3 ); // compute center
180180
v3.add( n.copy( plane.normal ).multiplyScalar( - 1 ) ); // displace center inwards
181181

182-
// generate tetraeder for each triangle
182+
// generate tetrahedron for each triangle
183183

184184
vertices.push( v0.x, v0.y, v0.z, v1.x, v1.y, v1.z, v2.x, v2.y, v2.z );
185185
vertices.push( v3.x, v3.y, v3.z, v1.x, v1.y, v1.z, v0.x, v0.y, v0.z );

examples/webgpu_reflection.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<script type="module">
2929

3030
import * as THREE from 'three';
31-
31+
3232
import { abs, color, div, float, Fn, instancedBufferAttribute, materialColor, min, normalWorldGeometry, pass, positionGeometry, positionLocal, reflector, screenUV, sin, sub, texture, time, uniform, uv, varyingProperty } from 'three/tsl';
3333
import { gaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js';
3434

@@ -174,7 +174,7 @@
174174
}
175175

176176
function startTweens() {
177-
177+
178178
const lifeTween = new TWEEN.Tween( uniformLife )
179179
.to( { value: 1 }, 5000 )
180180
.easing( TWEEN.Easing.Bounce.Out );
@@ -187,7 +187,7 @@
187187
.onComplete( function () {
188188

189189
secondaryTweens();
190-
190+
191191
} );
192192
effectTween.start();
193193

@@ -321,13 +321,13 @@
321321

322322
// TSL
323323

324-
const vVisbility = varyingProperty( 'float' );
324+
const vVisibility = varyingProperty( 'float' );
325325

326326
const instancePosition = instancedBufferAttribute( attributePosition );
327327
const instanceNormal = instancedBufferAttribute( attributeNormal );
328328
const instanceColor = instancedBufferAttribute( attributeColor );
329329
const instanceData = instancedBufferAttribute( attributeData );
330-
330+
331331
material.positionNode = Fn( () => {
332332

333333
const instanceSize = instanceData.x;
@@ -345,7 +345,7 @@
345345
// life (controls the visibility and initial scale of the cubes)
346346

347347
const scale = uniformLife.greaterThan( instanceTime ).select( min( 1, div( uniformLife.sub( instanceTime ), 0 ) ) ).oneMinus();
348-
vVisbility.assign( uniformLife.greaterThan( instanceTime ).select( 1, 0 ) );
348+
vVisibility.assign( uniformLife.greaterThan( instanceTime ).select( 1, 0 ) );
349349

350350
// accumulate different vertex animations
351351

@@ -363,7 +363,7 @@
363363

364364
material.colorNode = Fn( () => {
365365

366-
vVisbility.equal( 0 ).discard();
366+
vVisibility.equal( 0 ).discard();
367367

368368
return materialColor.mul( instanceColor );
369369

examples/webgpu_reflection_blurred.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@
149149
// reflection composite
150150

151151
const reflectionMask = reflectionBlurred.a.mul( reflectionDepth ).remapClamp( 0, roughnessRange );
152-
const reflectionItensity = .1;
152+
const reflectionIntensity = .1;
153153
const reflectionMixFactor = reflectionMask.mul( roughness.mul( 2 ).min( 1 ) );
154-
const reflectionFinal = mix( reflection.rgb, reflectionBlurred.rgb, reflectionMixFactor ).mul( reflectionItensity );
154+
const reflectionFinal = mix( reflection.rgb, reflectionBlurred.rgb, reflectionMixFactor ).mul( reflectionIntensity );
155155

156156
// mix reflection with animated circle
157157

examples/webgpu_tonemapping.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
scene = new THREE.Scene();
7777
scene.backgroundBlurriness = params.blurriness;
7878

79-
const light = new THREE.DirectionalLight( 0xfff3ee, 3 ); // simualte sun
79+
const light = new THREE.DirectionalLight( 0xfff3ee, 3 ); // simulate sun
8080
light.position.set( 1, 0.05, 0.7 );
8181
scene.add( light );
8282

0 commit comments

Comments
 (0)