JustalK/PORTFOLIO

View on GitHub

Showing 42 of 42 total issues

Function searchingMatchMouseAndMesh has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
Open

function searchingMatchMouseAndMesh() {
raycaster.setFromCamera( mouse, camera );
intersects = raycaster.intersectObjects( objectInteraction, true );
triangleIntersects = raycaster.intersectObjects( triangleHover, true );
Severity: Minor
Found in src/animation/animations3D.js - About 1 day to fix

File animations3D.js has 490 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
*============================================================================================>
* Util function
*============================================================================================>
**/
Severity: Minor
Found in src/animation/animations3D.js - About 7 hrs to fix

    Function searchingMatchMouseAndMesh has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function searchingMatchMouseAndMesh() {
    raycaster.setFromCamera( mouse, camera );
    intersects = raycaster.intersectObjects( objectInteraction, true );
    triangleIntersects = raycaster.intersectObjects( triangleHover, true );
    Severity: Major
    Found in src/animation/animations3D.js - About 2 hrs to fix

      Function fragmentShader has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      fragmentShader: () => {
      return `
      uniform sampler2D uTexture;
      uniform sampler2D uTexture2;
      uniform vec2 uResolution;
      Severity: Major
      Found in src/materials/image.js - About 2 hrs to fix

        Function fragmentShader has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        fragmentShader: () => {
        return `
        uniform float uTime;
        uniform float uOpacity;
        uniform vec2 uResolution;
        Severity: Major
        Found in src/materials/fog.js - About 2 hrs to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          const schema = new mongoose.Schema(
          {
          name: {
          type: String,
          trim: true,
          Severity: Major
          Found in server/models/tags.js and 1 other location - About 1 hr to fix
          server/models/jobs.js on lines 7..21

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          const schema = new mongoose.Schema(
          {
          title: {
          type: String,
          trim: true,
          Severity: Major
          Found in server/models/jobs.js and 1 other location - About 1 hr to fix
          server/models/tags.js on lines 7..21

          Function createBoard has 13 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function createBoard(url,x,y,z,rx,ry,rz,translationX,translationY,translationZ,rotationX,rotationY,rotationZ) {
          Severity: Major
          Found in src/animation/animations3D.js - About 1 hr to fix

            Function animate has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

            function animate() {
            // If I scroll down, I lock the animation for using less memory
            if(!lockAnimation) {
            runAnimation = true;
            // Setting the number of refresh - Frame rate
            Severity: Minor
            Found in src/animation/animations3D.js - About 1 hr to fix

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

            routes.route('/').get(async (request, response) => {
            response.status(constants.SUCCESS_CODE).json(await services.get_all());
            });
            Severity: Major
            Found in server/routes/tags.js and 2 other locations - About 1 hr to fix
            server/routes/contacts.js on lines 12..14
            server/routes/resume.js on lines 12..14

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

            routes.route('/').get(async (request, response) => {
            response.status(constants.SUCCESS_CODE).json(await services.get_resume());
            });
            Severity: Major
            Found in server/routes/resume.js and 2 other locations - About 1 hr to fix
            server/routes/contacts.js on lines 12..14
            server/routes/tags.js on lines 12..14

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

            routes.route('/my-identity').get(async (request, response) => {
            response.status(constants.SUCCESS_CODE).json(await services.get_my_identity());
            });
            Severity: Major
            Found in server/routes/contacts.js and 2 other locations - About 1 hr to fix
            server/routes/resume.js on lines 12..14
            server/routes/tags.js on lines 12..14

            Function addObject3 has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function addObject3(x1,y1,z1,x2,y2,z2,x3,y3,z3) {
            Severity: Major
            Found in src/animation/animations3D.js - About 1 hr to fix

              Function createBoard has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function createBoard(url,x,y,z,rx,ry,rz,translationX,translationY,translationZ,rotationX,rotationY,rotationZ) {
              // The mesh of thge board, it has been done with the different mesh that I'm gonna create there
              boardTmp = new THREE.Group();
               
              // Construct the mesh piece by piece
              Severity: Minor
              Found in src/animation/animations3D.js - About 1 hr to fix

                Function onDocumentMouseDown has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function onDocumentMouseDown( event ) {
                raycaster.setFromCamera( mouse, camera );
                intersects = raycaster.intersectObjects( objectInteraction, true );
                if(!movementCamera && intersects.length>0) {
                Severity: Minor
                Found in src/animation/animations3D.js - About 1 hr to fix

                  Function onDocumentMouseDown has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function onDocumentMouseDown( event ) {
                  raycaster.setFromCamera( mouse, camera );
                  intersects = raycaster.intersectObjects( objectInteraction, true );
                  if(!movementCamera && intersects.length>0) {
                  Severity: Minor
                  Found in src/animation/animations3D.js - About 1 hr to fix

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                  if (this.y !== this.base_y) {
                  const dy_move = this.y -this.base_y;
                  this.y -= dy_move / 10;
                  }
                  Severity: Minor
                  Found in src/helper/particle.js and 1 other location - About 55 mins to fix
                  src/helper/particle.js on lines 32..35

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                  if (this.x !== this.base_x) {
                  const dx_move = this.x -this.base_x;
                  this.x -= dx_move / 10;
                  }
                  Severity: Minor
                  Found in src/helper/particle.js and 1 other location - About 55 mins to fix
                  src/helper/particle.js on lines 36..39

                  Function createPanelWithTexture has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function createPanelWithTexture(texture,sx,sy,sz,x,y,z) {
                  Severity: Major
                  Found in src/animation/animations3D.js - About 50 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                    if(i==1 || i==0) childrens[i].material[4].color = new THREE.Color("#FFFFFF");
                    Severity: Major
                    Found in src/animation/animations3D.js - About 45 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language