Showing 271 of 665 total issues

Function widgetsRectangle has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
Open

const widgetsRectangle = (three = window.THREE) => {
  if (three === undefined || three.Object3D === undefined) {
    return null;
  }

Severity: Minor
Found in src/widgets/widgets.rectangle.js - About 1 day 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 parse has 202 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  parse: function(data) {
    let littleEndian = this.littleEndian();
    let reader = new DataView(data);

    // String.fromCharCode
Severity: Major
Found in src/loaders/loaders.trk.js - About 1 day to fix

    Function helpersVolumeRendering has 196 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const helpersVolumeRendering = (three = window.THREE) => {
      if (three === undefined || three.Object3D === undefined) {
        return null;
      }
    
    
    Severity: Major
    Found in src/helpers/helpers.volumerendering.js - About 7 hrs to fix

      Function widgetsVoxelprobe has 196 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const widgetsVoxelprobe = (three = window.THREE) => {
        if (three === undefined || three.Object3D === undefined) {
          return null;
        }
      
      
      Severity: Major
      Found in src/widgets/widgets.voxelProbe.js - About 7 hrs to fix

        File widgets.crossRuler.js has 483 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { widgetsBase } from './widgets.base';
        import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
        
        /**
         * @module widgets/crossRuler
        Severity: Minor
        Found in src/widgets/widgets.crossRuler.js - About 7 hrs to fix

          Function parse has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
          Open

            parse: function(data) {
              let littleEndian = this.littleEndian();
              let reader = new DataView(data);
          
              // String.fromCharCode
          Severity: Minor
          Found in src/loaders/loaders.trk.js - About 7 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 widgetsRuler has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
          Open

          const widgetsRuler = (three = window.THREE) => {
            if (three === undefined || three.Object3D === undefined) {
              return null;
            }
          
          
          Severity: Minor
          Found in src/widgets/widgets.ruler.js - About 7 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 helpersLocalizer has 172 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const helpersLocalizer = (three = window.THREE) => {
            if (three === undefined || three.Object3D === undefined) {
              return null;
            }
          
          
          Severity: Major
          Found in src/helpers/helpers.localizer.js - About 6 hrs to fix

            File widgets.polygon.js has 453 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import { widgetsBase } from './widgets.base';
            import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
            import CoreUtils from '../core/core.utils';
            
            /**
            Severity: Minor
            Found in src/widgets/widgets.polygon.js - About 6 hrs to fix

              File widgets.freehand.js has 452 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import { widgetsBase } from './widgets.base';
              import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
              import CoreUtils from '../core/core.utils';
              
              /**
              Severity: Minor
              Found in src/widgets/widgets.freehand.js - About 6 hrs to fix

                Function uniforms has 171 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  static uniforms() {
                    return {
                      uTextureSize: {
                        type: 'i',
                        value: 0,
                Severity: Major
                Found in src/shaders/shaders.vr.uniform.js - About 6 hrs to fix

                  Function main has 170 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    main() {
                      // need to pre-call main to fill up the functions list
                      this._main = `
                  void getIntensity(in vec3 dataCoordinates, out float intensity, out vec3 gradient){
                  
                  
                  Severity: Major
                  Found in src/shaders/shaders.vr.fragment.js - About 6 hrs to fix

                    Function widgetsAngle has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
                    Open

                    const widgetsAngle = (three = window.THREE) => {
                      if (three === undefined || three.Object3D === undefined) {
                        return null;
                      }
                    
                    
                    Severity: Minor
                    Found in src/widgets/widgets.angle.js - About 6 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 helpers.slice.js has 426 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /** * Imports ***/
                    import { geometriesSlice } from '../geometries/geometries.slice';
                    import ShadersUniform from '../shaders/shaders.data.uniform';
                    import ShadersVertex from '../shaders/shaders.data.vertex';
                    import ShadersFragment from '../shaders/shaders.data.fragment';
                    Severity: Minor
                    Found in src/helpers/helpers.slice.js - About 6 hrs to fix

                      Function widgetsAnnotation has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const widgetsAnnotation = (three = window.THREE) => {
                        if (three === undefined || three.Object3D === undefined) {
                          return null;
                        }
                      
                      
                      Severity: Minor
                      Found in src/widgets/widgets.annotation.js - About 5 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 uniforms has 141 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        static uniforms() {
                          return {
                            uTextureSize: {
                              type: 'i',
                              value: 0,
                      Severity: Major
                      Found in src/shaders/shaders.data.uniform.js - About 5 hrs to fix

                        ModelsSeries has 41 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        export default class ModelsSeries extends ModelsBase {
                          /**
                           * Models series constructor
                           */
                          constructor() {
                        Severity: Minor
                        Found in src/models/models.series.js - About 5 hrs to fix

                          Function update has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              update() {
                                // http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm
                                // do magics depending on orientation and convention
                                // also needs a default mode
                          
                          
                          Severity: Major
                          Found in src/cameras/cameras.orthographic.js - About 5 hrs to fix

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

                            const helpersContour = (three = window.THREE) => {
                              if (three === undefined || three.Object3D === undefined) {
                                return null;
                              }
                            
                            
                            Severity: Major
                            Found in src/helpers/helpers.contour.js - About 5 hrs to fix

                              File widgets.ellipse.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import { widgetsBase } from './widgets.base';
                              import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
                              import CoreUtils from '../core/core.utils';
                              
                              /**
                              Severity: Minor
                              Found in src/widgets/widgets.ellipse.js - About 5 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language