Showing 665 of 665 total issues

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

  main() {
    // need to pre-call main to fill up the functions list
    this._main = `
void main(void) {

Severity: Major
Found in src/shaders/shaders.data.fragment.js - About 3 hrs to fix

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

        for (let u = 0; u < 10; u++) {
          header.SCALAR_NAME.push([]);
          for (let v = 0; v < 20; v++) {
            header.SCALAR_NAME[u].push(String.fromCharCode(reader.getUint8(offset)));
            offset++;
    Severity: Major
    Found in src/loaders/loaders.trk.js and 1 other location - About 3 hrs to fix
    src/loaders/loaders.trk.js on lines 174..180

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        for (let y = 0; y < 10; y++) {
          header.PROPERTY_NAME.push([]);
          for (let z = 0; z < 20; z++) {
            header.PROPERTY_NAME[y].push(String.fromCharCode(reader.getUint8(offset)));
            offset++;
    Severity: Major
    Found in src/loaders/loaders.trk.js and 1 other location - About 3 hrs to fix
    src/loaders/loaders.trk.js on lines 151..157

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 107.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

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

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

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

          updateDOM() {
            this.updateDOMColor();
      
            // update first line
            const lineData = this.getLineData(
      Severity: Major
      Found in src/widgets/widgets.crossRuler.js - About 3 hrs to fix

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

            addEventListeners() {
              window.addEventListener('resize', this.onResize);
        
              this._label.addEventListener('mouseenter', this.onHoverlabel);
              this._label.addEventListener('mouseleave', this.notonHoverlabel);
        Severity: Major
        Found in src/widgets/widgets.annotation.js and 1 other location - About 3 hrs to fix
        src/widgets/widgets.annotation.js on lines 78..86

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 104.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            removeEventListeners() {
              window.removeEventListener('resize', this.onResize);
        
              this._label.removeEventListener('mouseenter', this.onHoverlabel);
              this._label.removeEventListener('mouseleave', this.notonHoverlabel);
        Severity: Major
        Found in src/widgets/widgets.annotation.js and 1 other location - About 3 hrs to fix
        src/widgets/widgets.annotation.js on lines 68..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 104.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            this._emitter.on('parsing', function(event) {
              const id = 'file-parse-' + event.file;
              const fileParseDom = document.getElementById(id);
              fileParseDom.style.width = (event.parsed / event.total) * 100 + '%';
              fileParseDom.style.border = '1px solid yellow';
        Severity: Major
        Found in src/helpers/helpers.progressbar.eventbased.js and 1 other location - About 3 hrs to fix
        src/helpers/helpers.progressbar.eventbased.js on lines 71..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 102.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            this._emitter.on('fetch-progress', function(event) {
              const id = 'file-fetch-' + event.file;
              const fileFetchDom = document.getElementById(id);
              fileFetchDom.style.width = (event.loaded / event.total) * 100 + '%';
              fileFetchDom.style.border = '1px solid red';
        Severity: Major
        Found in src/helpers/helpers.progressbar.eventbased.js and 1 other location - About 3 hrs to fix
        src/helpers/helpers.progressbar.eventbased.js on lines 112..117

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 102.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function helpersStack has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

        const helpersStack = (three = window.THREE) => {
          if (three === undefined || three.Object3D === undefined) {
            return null;
          }
        
        
        Severity: Minor
        Found in src/helpers/helpers.stack.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 helpersBorder has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function helpersBoundingBox has 78 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Function aabbPlane has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              static aabbPlane(aabb, plane) {
                //
                // obb = { halfDimensions, orientation, center, toAABB }
                // plane = { position, direction }
                //
            Severity: Major
            Found in src/core/core.intersections.js - About 3 hrs to fix

              Function fetch has 78 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                fetch(url, requests) {
                  return new Promise((resolve, reject) => {
                    const request = new XMLHttpRequest();
                    request.open('GET', url);
                    request.crossOrigin = true;
              Severity: Major
              Found in src/loaders/loaders.base.js - About 3 hrs to fix

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

                    let ray2 = this.posdir(
                      new Vector3(
                        aabb.center.x + aabb.halfDimensions.x,
                        aabb.center.y + aabb.halfDimensions.y,
                        aabb.center.z + aabb.halfDimensions.z
                Severity: Major
                Found in src/core/core.intersections.js and 1 other location - About 3 hrs to fix
                src/core/core.intersections.js on lines 134..141

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 97.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

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

                    let ray = this.posdir(
                      new Vector3(
                        aabb.center.x - aabb.halfDimensions.x,
                        aabb.center.y - aabb.halfDimensions.y,
                        aabb.center.z - aabb.halfDimensions.z
                Severity: Major
                Found in src/core/core.intersections.js and 1 other location - About 3 hrs to fix
                src/core/core.intersections.js on lines 161..168

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 97.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

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

                    let ray4 = this.posdir(
                      new Vector3(
                        aabb.center.x - aabb.halfDimensions.x,
                        aabb.center.y + aabb.halfDimensions.y,
                        aabb.center.z - aabb.halfDimensions.z
                Severity: Major
                Found in src/core/core.intersections.js and 2 other locations - About 3 hrs to fix
                src/core/core.intersections.js on lines 187..194
                src/core/core.intersections.js on lines 233..240

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 96.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

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

                    update() {
                      this.updateColor();
                
                      // update handles
                      this._handles.forEach(elem => elem.update());
                Severity: Major
                Found in src/widgets/widgets.freehand.js and 1 other location - About 3 hrs to fix
                src/widgets/widgets.polygon.js on lines 308..321

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 96.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

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

                    createLine() {
                      const line = document.createElement('div');
                
                      line.className = 'widgets-line';
                      line.addEventListener('mouseenter', this.onHover);
                Severity: Major
                Found in src/widgets/widgets.velocityTimeIntegral.js and 2 other locations - About 3 hrs to fix
                src/widgets/widgets.freehand.js on lines 250..258
                src/widgets/widgets.polygon.js on lines 284..292

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 96.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language