Showing 665 of 665 total issues

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

    set targetMesh(targetMesh) {
      this._targetMesh = targetMesh;
      this._handle.targetMesh = targetMesh;
      this._moveHandle.targetMesh = targetMesh;
      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 268..273

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

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

      if (
        this._handles[1].tracking &&
        this._handles[0].screenPosition.distanceTo(this._handles[1].screenPosition) < 10
      ) {
        return;
Severity: Major
Found in src/widgets/widgets.biruler.js and 1 other location - About 1 hr to fix
src/widgets/widgets.crossRuler.js on lines 166..171

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

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

      if (
        this._handles[1].tracking &&
        this._handles[0].screenPosition.distanceTo(this._handles[1].screenPosition) < 10
      ) {
        return;
Severity: Major
Found in src/widgets/widgets.crossRuler.js and 1 other location - About 1 hr to fix
src/widgets/widgets.biruler.js on lines 101..106

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

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 targetMesh(targetMesh) {
      this._targetMesh = targetMesh;
      this._handle.targetMesh = targetMesh;
      this._moveHandle.targetMesh = targetMesh;
      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 249..254

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

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._dom.style.transform = `translate3D(
      ${this._screenPosition.x}px,
      ${this._screenPosition.y - this._container.offsetHeight}px, 0)`;
Severity: Major
Found in src/widgets/widgets.handle.js and 1 other location - About 1 hr to fix
src/widgets/widgets.handle.js on lines 261..262

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

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

        hot_and_cold: [
          [0, 0, 0, 1],
          [0.15, 0, 1, 1],
          [0.3, 0, 1, 0],
          [0.45, 0, 0, 0],
Severity: Major
Found in src/helpers/helpers.lut.js and 1 other location - About 1 hr to fix
src/helpers/helpers.lut.js on lines 231..241

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

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

        gold: [
          [0, 0, 0, 0],
          [0.13, 0.19, 0.03, 0],
          [0.25, 0.39, 0.12, 0],
          [0.38, 0.59, 0.26, 0],
Severity: Major
Found in src/helpers/helpers.lut.js and 1 other location - About 1 hr to fix
src/helpers/helpers.lut.js on lines 220..230

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

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._dom.style.transform = `translate3D(${this._screenPosition.x}px,
        ${this._screenPosition.y - this._container.offsetHeight}px, 0)`;
Severity: Major
Found in src/widgets/widgets.handle.js and 1 other location - About 1 hr to fix
src/widgets/widgets.handle.js on lines 222..224

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

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

    hideDOM() {
      this._line.style.display = 'none';
      this._label.style.display = 'none';
      this._handle.hideDOM();
    }
Severity: Major
Found in src/widgets/widgets.peakVelocity.js and 1 other location - About 1 hr to fix
src/widgets/widgets.peakVelocity.js on lines 235..239

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

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

    showDOM() {
      this._line.style.display = '';
      this._label.style.display = '';
      this._handle.showDOM();
    }
Severity: Major
Found in src/widgets/widgets.peakVelocity.js and 1 other location - About 1 hr to fix
src/widgets/widgets.peakVelocity.js on lines 229..233

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

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

    free() {
      this.removeEventListeners();

      this._handles.forEach(h => {
        this.remove(h);
Severity: Minor
Found in src/widgets/widgets.annotation.js - About 1 hr to fix

    Function updateDOM has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        updateDOM() {
          this.updateDOMColor();
    
          // update line
          const lineData = this.getLineData(
    Severity: Minor
    Found in src/widgets/widgets.pressureHalfTime.js - About 1 hr to fix

      Function onEnd has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          onEnd() {
            let numHandles = this._handles.length;
            let active = false;
      
            if (
      Severity: Minor
      Found in src/widgets/widgets.polygon.js - About 1 hr to fix

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

            constructor(targetMesh, controls, params = {}) {
              super(targetMesh, controls, params);
        
              this._widgetType = 'Polygon';
        
        
        Severity: Minor
        Found in src/widgets/widgets.polygon.js - About 1 hr to fix

          Function _vector2Label has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _vector2Label(direction) {
                const index = this._getMaxIndex(direction);
                // set vector max value to 1
                const scaledDirection = direction
                  .clone()
          Severity: Minor
          Found in src/cameras/cameras.orthographic.js - About 1 hr to fix

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

                constructor(left, right, top, bottom, near, far) {
                  super(left, right, top, bottom, near, far);
            
                  this._front = null;
                  this._back = null;
            Severity: Minor
            Found in src/cameras/cameras.orthographic.js - About 1 hr to fix

              Function orderFrames has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                orderFrames() {
                  // order the frames based on theirs dimension indices
                  // first index is the most important.
                  // 1,1,1,1 will be first
                  // 1,1,2,1 will be next
              Severity: Minor
              Found in src/models/models.stack.js - About 1 hr to fix

                Function initCoordinates has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    initCoordinates(first, second, third, fourth) {
                      const intersectR = new three.Vector3();
                      const intersectS = new three.Vector3();
                      const ray = new three.Ray(first);
                
                
                Severity: Minor
                Found in src/widgets/widgets.crossRuler.js - About 1 hr to fix

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

                      for (let r = 0; r < 3; r++) {
                        header.VOXEL_SIZE.push(reader.getFloat32(offset, littleEndian));
                        offset += 4;
                      }
                  Severity: Major
                  Found in src/loaders/loaders.trk.js and 7 other locations - About 1 hr to fix
                  src/loaders/loaders.trk.js on lines 112..115
                  src/loaders/loaders.trk.js on lines 131..134
                  src/loaders/loaders.trk.js on lines 141..144
                  src/loaders/loaders.trk.js on lines 164..167
                  src/loaders/loaders.trk.js on lines 226..229
                  src/loaders/loaders.trk.js on lines 281..284
                  src/loaders/loaders.trk.js on lines 291..294

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

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

                      for (let ij = 0; ij < 1; ij++) {
                        header.SWAP_XY.push(String.fromCharCode(reader.getUint8(offset)));
                        offset++;
                      }
                  Severity: Major
                  Found in src/loaders/loaders.trk.js and 4 other locations - About 1 hr to fix
                  src/loaders/loaders.trk.js on lines 246..249
                  src/loaders/loaders.trk.js on lines 251..254
                  src/loaders/loaders.trk.js on lines 256..259
                  src/loaders/loaders.trk.js on lines 266..269

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

                  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