Showing 665 of 665 total issues

Function onMove has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    onMove(evt) {
      if (this.active) {
        const prevPosition = this._moveHandle.worldPosition.clone();

        this._moveHandle.onMove(evt, true);
Severity: Minor
Found in src/widgets/widgets.velocityTimeIntegral.js - About 1 hr to fix

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

        set targetMesh(targetMesh) {
          this._targetMesh = targetMesh;
          this._handles.forEach(elem => (elem.targetMesh = targetMesh));
          this._moveHandle.targetMesh = targetMesh;
          this.update();
    Severity: Major
    Found in src/widgets/widgets.polygon.js and 2 other locations - About 1 hr to fix
    src/widgets/widgets.freehand.js on lines 575..580
    src/widgets/widgets.velocityTimeIntegral.js on lines 617..622

    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 72.

    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

        set worldPosition(worldPosition) {
          this._handle.worldPosition.copy(worldPosition);
          this._moveHandle.worldPosition.copy(worldPosition);
          this._worldPosition.copy(worldPosition);
          this.update();
    Severity: Major
    Found in src/widgets/widgets.voxelProbe.js and 1 other location - About 1 hr to fix
    src/widgets/widgets.peakVelocity.js on lines 279..284

    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 72.

    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

        set targetMesh(targetMesh) {
          this._targetMesh = targetMesh;
          this._handles.forEach(elem => (elem.targetMesh = targetMesh));
          this._moveHandle.targetMesh = targetMesh;
          this.update();
    Severity: Major
    Found in src/widgets/widgets.freehand.js and 2 other locations - About 1 hr to fix
    src/widgets/widgets.polygon.js on lines 576..581
    src/widgets/widgets.velocityTimeIntegral.js on lines 617..622

    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 72.

    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

        hideDOM() {
          this._line.style.display = 'none';
          this._label.style.display = 'none';
          this._handles.forEach(elem => elem.hideDOM());
        }
    Severity: Major
    Found in src/widgets/widgets.ruler.js and 1 other location - About 1 hr to fix
    src/widgets/widgets.pressureHalfTime.js on lines 264..268

    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 72.

    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

        hideDOM() {
          this._line.style.display = 'none';
          this._label.style.display = 'none';
          this._handles.forEach(elem => elem.hideDOM());
        }
    Severity: Major
    Found in src/widgets/widgets.pressureHalfTime.js and 1 other location - About 1 hr to fix
    src/widgets/widgets.ruler.js on lines 204..208

    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 72.

    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

        set targetMesh(targetMesh) {
          this._targetMesh = targetMesh;
          this._handles.forEach(elem => (elem.targetMesh = targetMesh));
          this._moveHandle.targetMesh = targetMesh;
          this.update();
    Severity: Major
    Found in src/widgets/widgets.velocityTimeIntegral.js and 2 other locations - About 1 hr to fix
    src/widgets/widgets.freehand.js on lines 575..580
    src/widgets/widgets.polygon.js on lines 576..581

    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 72.

    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

        set worldPosition(worldPosition) {
          this._handle.worldPosition.copy(worldPosition);
          this._moveHandle.worldPosition.copy(worldPosition);
          this._worldPosition.copy(worldPosition);
          this.update();
    Severity: Major
    Found in src/widgets/widgets.peakVelocity.js and 1 other location - About 1 hr to fix
    src/widgets/widgets.voxelProbe.js on lines 260..265

    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 72.

    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 prepareSegmentation has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      prepareSegmentation() {
        // store frame and do special pre-processing
        this._frameSegment = this._frame;
        let mergedFrames = [];
    
    
    Severity: Minor
    Found in src/models/models.stack.js - About 1 hr to fix

      Function helpersMaterialMixin has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const helpersMaterialMixin = (three = window.THREE) => {
        if (three === undefined || three.Object3D === undefined) {
          return null;
        }
      
      
      Severity: Minor
      Found in src/helpers/helpers.material.mixin.js - About 1 hr to fix

        Function constructor has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          constructor() {
            super();
        
            this._uid = null;
            this._stackID = -1;
        Severity: Minor
        Found in src/models/models.stack.js - About 1 hr to fix

          Function updateMesh has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              updateMesh() {
                if (this._mesh) {
                  this.remove(this._mesh);
                }
          
          
          Severity: Minor
          Found in src/widgets/widgets.freehand.js - About 1 hr to fix

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

                  this._active =
                    this._handles[0].active ||
                    this._handles[1].active ||
                    this._handles[2].active ||
                    this._handles[3].active;
            Severity: Major
            Found in src/widgets/widgets.biruler.js and 3 other locations - About 1 hr to fix
            src/widgets/widgets.biruler.js on lines 71..75
            src/widgets/widgets.biruler.js on lines 84..88
            src/widgets/widgets.crossRuler.js on lines 189..193

            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 71.

            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

                    objectToTest !== null &&
                    typeof objectToTest !== 'undefined' &&
                    objectToTest.hasOwnProperty('position') &&
                    this.vector3(objectToTest.position) &&
                    objectToTest.hasOwnProperty('direction') &&
            Severity: Major
            Found in src/core/core.validators.js and 1 other location - About 1 hr to fix
            src/core/core.validators.js on lines 77..82

            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 71.

            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 updateMesh has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                updateMesh() {
                  if (this._mesh) {
                    this.remove(this._mesh);
                  }
            
            
            Severity: Minor
            Found in src/widgets/widgets.polygon.js - About 1 hr to fix

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

                    this._active =
                      this._handles[0].active ||
                      this._handles[1].active ||
                      this._handles[2].active ||
                      this._handles[3].active;
              Severity: Major
              Found in src/widgets/widgets.crossRuler.js and 3 other locations - About 1 hr to fix
              src/widgets/widgets.biruler.js on lines 71..75
              src/widgets/widgets.biruler.js on lines 84..88
              src/widgets/widgets.biruler.js on lines 134..138

              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 71.

              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

                    if (!this._dragged && this._active && this._initialized) {
                      this._selected = !this._selected; // change state if there was no dragging
                      this._handles[0].selected = this._selected;
                      this._handles[1].selected = this._selected;
                    }
              Severity: Major
              Found in src/widgets/widgets.annotation.js and 1 other location - About 1 hr to fix
              src/widgets/widgets.biruler.js on lines 108..112

              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 71.

              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

                      objectToTest !== null &&
                      typeof objectToTest !== 'undefined' &&
                      objectToTest.hasOwnProperty('center') &&
                      this.vector3(objectToTest.center) &&
                      objectToTest.hasOwnProperty('halfDimensions') &&
              Severity: Major
              Found in src/core/core.validators.js and 1 other location - About 1 hr to fix
              src/core/core.validators.js on lines 110..115

              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 71.

              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

                    if (!this._dragged && this._active && !this._handles[3].tracking) {
                      this._selected = !this._selected; // change state if there was no dragging
                      this._handles[0].selected = this._selected;
                      this._handles[2].selected = this._selected;
                    }
              Severity: Major
              Found in src/widgets/widgets.biruler.js and 1 other location - About 1 hr to fix
              src/widgets/widgets.annotation.js on lines 163..167

              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 71.

              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 4 locations. Consider refactoring.
              Open

                      this._hovered =
                        this._handles[0].hovered ||
                        this._handles[1].hovered ||
                        this._handles[2].hovered ||
                        this._handles[3].hovered;
              Severity: Major
              Found in src/widgets/widgets.biruler.js and 3 other locations - About 1 hr to fix
              src/widgets/widgets.biruler.js on lines 71..75
              src/widgets/widgets.biruler.js on lines 134..138
              src/widgets/widgets.crossRuler.js on lines 189..193

              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 71.

              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