NLeSC/ahn-pointcloud-viewer

View on GitHub

Showing 65 of 154 total issues

Function PointcloudService has 618 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function PointcloudService(THREE, Potree, $window, $rootScope, $location,
    DrivemapService,
    CameraService, SceneService,
    PathControls, MeasuringService, EarthcontrolsService,
    RailService, ExtractionDrawingService, PointcloudExtractionSelectionService,
Severity: Major
Found in app/scripts/pointcloud/pointcloud.service.js - About 3 days to fix

    Function GradientsService has 516 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function GradientsService() {
        Potree.Gradients.VIRIDIS = [
          [0, new THREE.Color(0.267, 0.0049, 0.3294)],
          [0.0039, new THREE.Color(0.2685, 0.0096, 0.3354)],
          [0.0078, new THREE.Color(0.2699, 0.0146, 0.3414)],
    Severity: Major
    Found in app/scripts/pointcloud/gradients.service.js - About 2 days to fix

      Function MeasuringTool has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring.
      Open

      Potree.MeasuringTool = function(scene, camera, renderer){
      
          var scope = this;
          this.enabled = false;
      
      
      Severity: Minor
      Found in app/scripts/utils/MeasuringTool.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 exports has 423 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(grunt) {
      
        // Load grunt tasks automatically
        require('load-grunt-tasks')(grunt);
      
      
      Severity: Major
      Found in Gruntfile.js - About 2 days to fix

        Function MeasuringTool has 313 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Potree.MeasuringTool = function(scene, camera, renderer){
        
            var scope = this;
            this.enabled = false;
        
        
        Severity: Major
        Found in app/scripts/utils/MeasuringTool.js - About 1 day to fix

          File pointcloud.service.js has 630 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* global requestAnimationFrame:false  */
          
          (function() {
            'use strict';
          
          
          Severity: Major
          Found in app/scripts/pointcloud/pointcloud.service.js - About 1 day to fix

            File MeasuringTool.js has 558 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            
            'use strict';
            /* global THREE:false, Potree:false  */
            
            Potree.Measure = function(){
            Severity: Major
            Found in app/scripts/utils/MeasuringTool.js - About 1 day to fix

              File gradients.service.js has 522 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              (function () {
                'use strict';
                /* global THREE:false, Potree:false  */
              
                function GradientsService() {
              Severity: Major
              Found in app/scripts/pointcloud/gradients.service.js - About 1 day to fix

                Function Measure has 211 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Potree.Measure = function(){
                    var scope = this;
                
                    THREE.Object3D.call( this );
                
                
                Severity: Major
                Found in app/scripts/utils/MeasuringTool.js - About 1 day to fix

                  File Gruntfile.js has 426 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // Generated on 2015-01-07 using generator-angular 0.10.0
                  'use strict';
                  
                  // # Globbing
                  // for performance reasons we're only matching one level down:
                  Severity: Minor
                  Found in Gruntfile.js - About 6 hrs to fix

                    Function MeasuringService has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function MeasuringService($rootScope, Potree, THREE, $window) {
                        this.tools = {
                          measuring: null,
                          volume: null,
                          heightprofile: null,
                    Severity: Major
                    Found in app/scripts/measuring/measuring.service.js - About 5 hrs to fix

                      Function RailService has 145 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function RailService(CameraService, SceneService, THREE, toastr, $window) {
                          /**
                           * A waypoint is a user picked camera location and look at location.
                           * Format of one waypoint is [camX,camY,camZ,lookatX,lookatY, lookatZ]
                           * Positions are in geospatial coordinate system.
                      Severity: Major
                      Found in app/scripts/pointcloud/rail.service.js - About 5 hrs to fix

                        Function HighQualityRenderer has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var HighQualityRenderer = function() {
                        
                              var depthMaterial = null;
                              var attributeMaterial = null;
                              var normalizationMaterial = null;
                        Severity: Major
                        Found in app/scripts/pointcloud/pointcloud.service.js - About 5 hrs to fix

                          Function MinimapExtractionSelectionService has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function MinimapExtractionSelectionService(ExtractionSelectionService, ol, Messagebus) {
                              this.source = new ol.source.Vector({
                                wrapX: false
                              });
                          
                          
                          Severity: Major
                          Found in app/scripts/extract/minimap.extraction.selection.service.js - About 5 hrs to fix

                            Function MinimapController has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function MinimapController(ol, proj4, CamFrustumService, Messagebus, MinimapExtractionSelectionService) {
                                proj4.defs('EPSG:28992','+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs');
                            
                                var projection = ol.proj.get('EPSG:28992');
                                var projectionExtent = [-285401.92,22598.08,595401.9199999999,903401.9199999999];
                            Severity: Major
                            Found in app/scripts/minimap/minimap.controller.js - About 4 hrs to fix

                              Function CameraService has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function CameraService($rootScope, $window, $log, $location, THREE, Messagebus, SceneService) {
                                  var me = this;
                                  var fov = 75;
                                  var width = $window.innerWidth;
                                  var height = $window.innerHeight;
                              Severity: Major
                              Found in app/scripts/pointcloud/camera.service.js - About 4 hrs to fix

                                Function MeasuringController has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function MeasuringController(MeasuringService, Messagebus) {
                                    this.showToolboxTray = false;
                                    this.showTransformationToolboxTray = false;
                                
                                    this.distanceActive = false;
                                Severity: Major
                                Found in app/scripts/measuring/measuring.controller.js - About 4 hrs to fix

                                  Function Measure has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  Potree.Measure = function(){
                                      var scope = this;
                                  
                                      THREE.Object3D.call( this );
                                  
                                  
                                  Severity: Minor
                                  Found in app/scripts/utils/MeasuringTool.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

                                  File path.controls.js has 341 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /*
                                   *  PathControls
                                   *  by Ben van Werkhoven (Netherlands eScience Center)
                                   *
                                   *  free look around with mouse drag
                                  Severity: Minor
                                  Found in app/scripts/pointcloud/path.controls.js - About 4 hrs to fix

                                    Function EDLRenderer has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        var EDLRenderer = function() {
                                    
                                          var edlMaterial = null;
                                          var attributeMaterial = null;
                                    
                                    
                                    Severity: Major
                                    Found in app/scripts/pointcloud/pointcloud.service.js - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language