You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I utilized ESLint on this project to see if I can determine any potential bugs by focusing on the js-funcs directory and the js-libs directory. I decided to exclude the three.js and three.min.js files as these are external libraries.
These are the 4 bugs that I have found in the project:
Bug 1:
Location: bird-geometry.js at 39:11
Type: error 'v' is already defined no-redeclare
Solution: To simply remove redeclaration of variable v inside the for loop
Bug 2:
Location: FirstPersonControls.js at 274:3
Type: Unnecessary semicolon no-extra-semi
Solution: Simply remove the extra semi-colon found in that line of code to ensure javascript syntax
Bug 3:
Location: KeyboardState.js at 114:3
Type: Unnecessary semicolon no-extra-semi
Solution: Simply remove the extra semi-colon found in that line of code to ensure javascript syntax
Bug 4:
Location: OrbitControls.js at 333:2
Type: Mixed spaces and tabs no-mixed-spaces-and-tabs
Solution: Simply go in and fix the error manually be making sure line breaks are proper, or you can just right click and format document for automatic fix
Also for testing purposes, I found it difficult to execute ESLint on the buffer and shader directories. The reason was because while these are .js files, they contain GLSL code inside them and make the file not legible for testing with ESLint. A suggestion is to simply extract the GLSL code inside these javascript files and place them in a .glsl file, while placing a link to these files in the original .js file.
For example for vertexshader-birds.js:
Create a new file called vertexshader-birds.glsl
Copy all the code inside vertexshader-birds.js and place it inside vertexshader-birds.glsl
Place the following code inside vertexshaer-birds.js (it has to be the only code in that file)
This seemed to solve the issue for me for testing purposes and made it much more efficient to use with ESLint. Please let me know if I can help out with any other issues. Also, I really appreciate the effort that went into this project!
The text was updated successfully, but these errors were encountered:
Good afternoon!
I utilized ESLint on this project to see if I can determine any potential bugs by focusing on the js-funcs directory and the js-libs directory. I decided to exclude the three.js and three.min.js files as these are external libraries.
These are the 4 bugs that I have found in the project:
Bug 1:
Location: bird-geometry.js at 39:11
Type: error 'v' is already defined no-redeclare
Solution: To simply remove redeclaration of variable v inside the for loop
Bug 2:
Location: FirstPersonControls.js at 274:3
Type: Unnecessary semicolon no-extra-semi
Solution: Simply remove the extra semi-colon found in that line of code to ensure javascript syntax
Bug 3:
Location: KeyboardState.js at 114:3
Type: Unnecessary semicolon no-extra-semi
Solution: Simply remove the extra semi-colon found in that line of code to ensure javascript syntax
Bug 4:
Location: OrbitControls.js at 333:2
Type: Mixed spaces and tabs no-mixed-spaces-and-tabs
Solution: Simply go in and fix the error manually be making sure line breaks are proper, or you can just right click and format document for automatic fix
Also for testing purposes, I found it difficult to execute ESLint on the buffer and shader directories. The reason was because while these are .js files, they contain GLSL code inside them and make the file not legible for testing with ESLint. A suggestion is to simply extract the GLSL code inside these javascript files and place them in a .glsl file, while placing a link to these files in the original .js file.
For example for vertexshader-birds.js:
const fs = require('fs');
const pathway = require('path');
const shaderPath = pathway.join(__dirname, 'vertexshader-birds.glsl');
const shaderSource = fs.readFileSync(shaderPath, 'utf8');
This seemed to solve the issue for me for testing purposes and made it much more efficient to use with ESLint. Please let me know if I can help out with any other issues. Also, I really appreciate the effort that went into this project!
The text was updated successfully, but these errors were encountered: