mrdoob/three.js

View on GitHub

Showing 4,469 of 7,845 total issues

Function intersectsObject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    intersectsObject( object ) {

        if ( object.boundingSphere !== undefined ) {

            if ( object.boundingSphere === null ) object.computeBoundingSphere();
Severity: Minor
Found in src/math/Frustum.js - About 25 mins 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 uncacheRoot has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    uncacheRoot( root ) {

        const rootUuid = root.uuid,
            actionsByClip = this._actionsByClip;

Severity: Minor
Found in src/animation/AnimationMixer.js - About 25 mins 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 load has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    load( url, onLoad, onProgress, onError ) {

        if ( url === undefined ) url = '';

        if ( this.path !== undefined ) url = this.path + url;
Severity: Minor
Found in src/loaders/ImageBitmapLoader.js - About 25 mins 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 intervalChanged_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    intervalChanged_( i1, t0, t1 ) {

        const pp = this.parameterPositions;
        let iPrev = i1 - 2,
            iNext = i1 + 1,
Severity: Minor
Found in src/math/interpolants/CubicInterpolant.js - About 25 mins 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 applyMatrix3 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    applyMatrix3( m ) {

        if ( this.itemSize === 2 ) {

            for ( let i = 0, l = this.count; i < l; i ++ ) {
Severity: Minor
Found in src/core/BufferAttribute.js - About 25 mins 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    parse( json, lib = {} ) {

        json = this._parseObjects( json, lib );

        const parseType = this.parseType;
Severity: Minor
Found in playground/libs/flow.module.js - About 25 mins 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 lookAt has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    lookAt( x, y, z ) {

        // This method does not support objects having non-uniformly-scaled parent(s)

        if ( x.isVector3 ) {
Severity: Minor
Found in src/core/Object3D.js - About 25 mins 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 setTarget has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    setTarget( target = null ) {

        if ( target !== null ) {

            const onContextMenu = ( e ) => {
Severity: Minor
Found in playground/libs/flow.module.js - About 25 mins 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 constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    constructor( settings ) {

        const shaderNode = Nodes[ settings.shaderNode ];

        let node = null;
Severity: Minor
Found in playground/editors/CustomNodeEditor.js - About 25 mins 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

Severity
Category
Status
Source
Language