JustalK/PORTFOLIO

View on GitHub

Showing 25 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

          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

            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

                  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

                      Function createPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function createPanel(sx,sy,sz,x,y,z) {
                      Severity: Minor
                      Found in src/animation/animations3D.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                        if(zoomIn==false || (zoomOn!=null && zoomOn.children!=childrens)) {
                        for(var i=childrens.length;i--;) {
                        if(childrens[i]["panel"]) {
                        childrens[i].material[4].opacity = 0;
                        }
                        Severity: Major
                        Found in src/animation/animations3D.js - About 45 mins to fix

                          Function createSideBoard has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          function createSideBoard(x,y,z,rx,ry,rz) {
                          Severity: Minor
                          Found in src/animation/animations3D.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                            if(childrens[i]["wireframe"]) {
                            childrens[i].material.color = new THREE.Color(WIREFRAME_COLOR_HOVER);
                            }
                            Severity: Major
                            Found in src/animation/animations3D.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                              for(var i=childrens.length;i--;) {
                              if(childrens[i]["wireframe"]) {
                              childrens[i].material.color = new THREE.Color(WIREFRAME_COLOR);
                              }
                              }
                              Severity: Major
                              Found in src/animation/animations3D.js - About 45 mins to fix

                                Function createCenterWireframe has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                function createCenterWireframe(x,y,z,rx,ry,rz) {
                                Severity: Minor
                                Found in src/animation/animations3D.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                  if(childrens[i]["panel"]) {
                                  childrens[i].material[4].opacity = 1;
                                  }
                                  Severity: Major
                                  Found in src/animation/animations3D.js - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language