SimonHFrost/Rainbow_Slice

View on GitHub

Showing 40 of 72 total issues

Function OrbitControls has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring.
Open

THREE.OrbitControls = function ( object, domElement ) {

    this.object = object;
    this.domElement = ( domElement !== undefined ) ? domElement : document;

Severity: Minor
Found in public/resources/lib/OrbitControls.js - About 2 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function OrbitControls has 315 lines of code (exceeds 25 allowed). Consider refactoring.
Open

THREE.OrbitControls = function ( object, domElement ) {

    this.object = object;
    this.domElement = ( domElement !== undefined ) ? domElement : document;

Severity: Major
Found in public/resources/lib/OrbitControls.js - About 1 day to fix

    Function Movement has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

    window.Movement = (function () {
      "use strict";
      function Movement(sceneObjects, player) {
        this.sceneObjects = sceneObjects;
        this.player = player;
    Severity: Minor
    Found in public/dynamic/movement.js - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function BoundaryCollisionDetector has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    window.BoundaryCollisionDetector = (function () {
      "use strict";
      function BoundaryCollisionDetector(sceneObjects, scene, player) {
        this.FLOOR_DIMENSIONS = 3000;
        this.RAY_OFFSET = -200;
    Severity: Minor
    Found in public/collisionDetectors/boundaryCollisionDetector.js - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function BoundaryCollisionDetector has 100 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    window.BoundaryCollisionDetector = (function () {
      "use strict";
      function BoundaryCollisionDetector(sceneObjects, scene, player) {
        this.FLOOR_DIMENSIONS = 3000;
        this.RAY_OFFSET = -200;
    Severity: Major
    Found in public/collisionDetectors/boundaryCollisionDetector.js - About 4 hrs to fix

      Function IslandInitializer has 100 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      window.IslandInitializer = (function() {
        "use strict";
        function IslandInitializer(materials) {
          this.materials = materials;
        }
      Severity: Major
      Found in public/setup/islandInitializer.js - About 4 hrs to fix

        Function Enemy has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
        Open

        window.Enemy = (function() {
          "use strict";
          function Enemy(sceneObjects, scene, size, positionX, positionZ, updatableObjects, player, materials) {
            this.FIRE_RATE = 0.05;
            this.FIRE_FAILURE_RATE = 0.4;
        Severity: Minor
        Found in public/sceneObjects/enemy.js - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        File OrbitControls.js has 318 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * @author qiao / https://github.com/qiao
         * @author mrdoob / http://mrdoob.com
         * @author alteredq / http://alteredqualia.com/
         * @author WestLangley / http://github.com/WestLangley
        Severity: Minor
        Found in public/resources/lib/OrbitControls.js - About 3 hrs to fix

          Function Enemy has 90 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          window.Enemy = (function() {
            "use strict";
            function Enemy(sceneObjects, scene, size, positionX, positionZ, updatableObjects, player, materials) {
              this.FIRE_RATE = 0.05;
              this.FIRE_FAILURE_RATE = 0.4;
          Severity: Major
          Found in public/sceneObjects/enemy.js - About 3 hrs to fix

            Function BulletCollisionDetector has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
            Open

            window.BulletCollisionDetector = (function () {
              "use strict";
              function BulletCollisionDetector(sceneObjects, scene, story, player, playerWidth, enemyWidth) {
                this.sceneObjects = sceneObjects;
                this.scene = scene;
            Severity: Minor
            Found in public/collisionDetectors/bulletCollisionDetector.js - About 3 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function SceneObjects has 75 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            window.SceneObjects = (function() {
              "use strict";
            
              function SceneObjects(scene, camera, materials) {
                this.FLOOR = -100;
            Severity: Major
            Found in public/sceneObjects/sceneObjects.js - About 3 hrs to fix

              Function Movement has 73 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              window.Movement = (function () {
                "use strict";
                function Movement(sceneObjects, player) {
                  this.sceneObjects = sceneObjects;
                  this.player = player;
              Severity: Major
              Found in public/dynamic/movement.js - About 2 hrs to fix

                Function MeshLoader has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                window.MeshLoader = (function() {
                  "use strict";
                
                  function MeshLoader(sceneObjects, player, morphs) {
                    this.FLOOR = 0;
                Severity: Major
                Found in public/setup/meshLoader.js - About 2 hrs to fix

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

                  window.EnemySpawner = (function(){
                    "use strict";
                    function EnemySpawner(sceneObjects, scene, meshLoader, updatableObjects, player, materials, enemyWidth) {
                      this.MAX_ENEMIES = 15;
                      this.SPAWN_RATE = 0.1;
                  Severity: Major
                  Found in public/setup/enemySpawner.js - About 2 hrs to fix

                    Function BulletCollisionDetector has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    window.BulletCollisionDetector = (function () {
                      "use strict";
                      function BulletCollisionDetector(sceneObjects, scene, story, player, playerWidth, enemyWidth) {
                        this.sceneObjects = sceneObjects;
                        this.scene = scene;
                    Severity: Minor
                    Found in public/collisionDetectors/bulletCollisionDetector.js - About 1 hr to fix

                      Function Story has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      window.Story = (function () {
                        "use strict";
                        function Story(scene, network, allBullets, sound) {
                          this.scene = scene;
                          this.network = network;
                      Severity: Minor
                      Found in public/dynamic/story.js - About 1 hr to fix

                        Function touchmove has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function touchmove( event ) {
                        
                                if ( scope.enabled === false ) return;
                        
                                event.preventDefault();
                        Severity: Minor
                        Found in public/resources/lib/OrbitControls.js - About 1 hr to fix

                          Function Sound has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          window.Sound = (function () {
                            "use strict";
                            function Sound() {
                              this.initializeDynamicSource();
                              this.initializeThemeSource();
                          Severity: Minor
                          Found in public/dynamic/sound.js - About 1 hr to fix

                            Function Bullet has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            window.Bullet = (function () {
                              "use strict";
                              function Bullet(scene, enemyToFire, player, allBullets) {
                                this.BULLET_SIZE = 50;
                                this.SPEED = 20;
                            Severity: Minor
                            Found in public/sceneObjects/bullet.js - About 1 hr to fix

                              Function MovementCollisionDetector has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              window.MovementCollisionDetector = (function () {
                                "use strict";
                                function MovementCollisionDetector(sceneObjects, player) {
                                  this.sceneObjects = sceneObjects;
                                  this.player = player;
                              Severity: Minor
                              Found in public/collisionDetectors/movementCollisionDetector.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language