Skip to content

Commit

Permalink
Eliminate some occurrences of var (#6737)
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Jun 20, 2024
1 parent a5fb5e3 commit cd4f697
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/extras/render-passes/render-pass-depth-aware-blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class RenderPassDepthAwareBlur extends RenderPassShaderQuad {
`
);

var scope = this.device.scope;
const scope = this.device.scope;
this.sourceTextureId = scope.resolve('sourceTexture');
this.sourceInvResolutionId = scope.resolve('sourceInvResolution');
this.sourceInvResolutionValue = new Float32Array(2);
Expand Down
2 changes: 1 addition & 1 deletion src/framework/components/collision/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class CollisionMeshSystemImpl extends CollisionSystemImpl {
return idx;
};

for (var i = 0; i < numTriangles; i++) {
for (let i = 0; i < numTriangles; i++) {
i1 = addVertex(indices[base + i * 3]);
i2 = addVertex(indices[base + i * 3 + 1]);
i3 = addVertex(indices[base + i * 3 + 2]);
Expand Down
4 changes: 2 additions & 2 deletions src/framework/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class Entity extends GraphNode {
* has one. Returns undefined otherwise.
* @example
* // Get the first found "playerController" instance in the hierarchy tree that starts with this entity
* var controller = entity.findScript("playerController");
* const controller = entity.findScript("playerController");
*/
findScript(nameOrType) {
const entity = this.findOne(node => node.c?.script?.has(nameOrType));
Expand All @@ -459,7 +459,7 @@ class Entity extends GraphNode {
* descendants. Returns empty array if none found.
* @example
* // Get all "playerController" instances in the hierarchy tree that starts with this entity
* var controllers = entity.findScripts("playerController");
* const controllers = entity.findScripts("playerController");
*/
findScripts(nameOrType) {
const entities = this.find(node => node.c?.script?.has(nameOrType));
Expand Down

0 comments on commit cd4f697

Please sign in to comment.