mrdoob/three.js

View on GitHub

Showing 4,469 of 7,845 total issues

File lottie_canvas.module.js has 13285 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const lottie = {};

if (typeof document !== 'undefined') {

const svgNS = 'http://www.w3.org/2000/svg';
Severity: Major
Found in examples/jsm/libs/lottie_canvas.module.js - About 1 mo to fix

    File mmdparser.module.js has 10746 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @author Takahiro / https://github.com/takahirox
     *
     * Simple CharsetEncoder.
     */
    Severity: Major
    Found in examples/jsm/libs/mmdparser.module.js - About 1 mo to fix

      File opentype.module.js has 9607 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * https://opentype.js.org v1.3.4 | (c) Frederik De Bleser and other contributors | MIT License | Uses tiny-inflate by Devon Govett and string.prototype.codepointat polyfill by Mathias Bynens
       */
      
      /*! https://mths.be/codepointat v0.2.0 by @mathias */
      Severity: Major
      Found in examples/jsm/libs/opentype.module.js - About 1 mo to fix

        File codemirror.js has 7857 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // CodeMirror, copyright (c) by Marijn Haverbeke and others
        // Distributed under an MIT license: https://codemirror.net/LICENSE
        
        // This is CodeMirror (https://codemirror.net), a code editor
        // implemented in JavaScript on top of the browser's DOM.
        Severity: Major
        Found in editor/js/libs/codemirror/codemirror.js - About 3 wks to fix

          Function WebGLTextures has a Cognitive Complexity of 1059 (exceeds 5 allowed). Consider refactoring.
          Open

          function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) {
          
              const multisampledRTTExt = extensions.has( 'WEBGL_multisampled_render_to_texture' ) ? extensions.get( 'WEBGL_multisampled_render_to_texture' ) : null;
              const supportsInvalidateFramebuffer = typeof navigator === 'undefined' ? false : /OculusBrowser/g.test( navigator.userAgent );
          
          
          Severity: Minor
          Found in src/renderers/webgl/WebGLTextures.js - About 3 wks 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 1002 (exceeds 5 allowed). Consider refactoring.
          Open

              parse( text, path ) {
          
                  function getElementsByTagName( xml, name ) {
          
                      // Non recursive xml.getElementsByTagName() ...
          Severity: Minor
          Found in examples/jsm/loaders/ColladaLoader.js - About 2 wks 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 esprima.js has 6001 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function webpackUniversalModuleDefinition(root, factory) {
          /* istanbul ignore next */
              if(typeof exports === 'object' && typeof module === 'object')
                  module.exports = factory();
              else if(typeof define === 'function' && define.amd)
          Severity: Major
          Found in editor/js/libs/esprima.js - About 2 wks to fix

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

                parse( data, path ) {
            
                    const nodeMap = {};
            
                    function generateVRMLTree( data ) {
            Severity: Minor
            Found in examples/jsm/loaders/VRMLLoader.js - About 2 wks 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 threejs.js has 5030 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            (function(mod) {
              if (typeof exports == "object" && typeof module == "object") // CommonJS
                return mod(require("tern/lib/infer"), require("tern/lib/tern"));
              if (typeof define == "function" && define.amd) // AMD
                return define([ "tern/lib/infer", "tern/lib/tern" ], mod);
            Severity: Major
            Found in editor/js/libs/tern-threejs/threejs.js - About 2 wks to fix

              Function dataManager has a Cognitive Complexity of 697 (exceeds 5 allowed). Consider refactoring.
              Open

              const dataManager = (function () {
                var _counterId = 1;
                var processes = [];
                var workerFn;
                var workerInstance;
              Severity: Minor
              Found in examples/jsm/libs/lottie_canvas.module.js - About 2 wks 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 Parser has 2764 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var Parser = (function () {
                      function Parser(code, options, delegate) {
                          if (options === void 0) { options = {}; }
                          this.config = {
                              range: (typeof options.range === 'boolean') && options.range,
              Severity: Major
              Found in editor/js/libs/esprima.js - About 1 wk to fix

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

                    parse( buffer ) {
                
                        const USHORT_RANGE = ( 1 << 16 );
                        const BITMAP_SIZE = ( USHORT_RANGE >> 3 );
                
                
                Severity: Minor
                Found in examples/jsm/loaders/EXRLoader.js - About 1 wk 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 2294 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    parse( text, path ) {
                
                        function getElementsByTagName( xml, name ) {
                
                            // Non recursive xml.getElementsByTagName() ...
                Severity: Major
                Found in examples/jsm/loaders/ColladaLoader.js - About 1 wk to fix

                  Function getMeasures has a Cognitive Complexity of 551 (exceeds 5 allowed). Consider refactoring.
                  Open

                  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {
                    this.lettersChangedFlag = lettersChangedFlag;
                    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
                      return;
                    }
                  Severity: Minor
                  Found in examples/jsm/libs/lottie_canvas.module.js - About 1 wk 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 550 (exceeds 5 allowed). Consider refactoring.
                  Open

                      constructor( parameters = {} ) {
                  
                          const {
                              canvas = createCanvasElement(),
                              context = null,
                  Severity: Minor
                  Found in src/renderers/WebGLRenderer.js - About 1 wk 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 541 (exceeds 5 allowed). Consider refactoring.
                  Open

                      parse( text ) {
                  
                          const scope = this;
                  
                          function parseNode( node, style ) {
                  Severity: Minor
                  Found in examples/jsm/loaders/SVGLoader.js - About 1 wk 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 481 (exceeds 5 allowed). Consider refactoring.
                  Open

                      parse( data ) {
                  
                          function parseASCII( data ) {
                  
                              // connectivity of the triangles
                  Severity: Minor
                  Found in examples/jsm/loaders/VTKLoader.js - About 1 wk 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 ExpressionManager has a Cognitive Complexity of 443 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const ExpressionManager = (function () {
                    'use strict';
                  
                    var ob = {};
                    var Math = BMMath;
                  Severity: Minor
                  Found in examples/jsm/libs/lottie_canvas.module.js - About 1 wk 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 1779 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      parse( data, path ) {
                  
                          const nodeMap = {};
                  
                          function generateVRMLTree( data ) {
                  Severity: Major
                  Found in examples/jsm/loaders/VRMLLoader.js - About 1 wk to fix

                    File flow.module.js has 2638 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /**
                     * https://github.com/sunag/flow
                     */
                    
                    function __flow__addCSS( css ) {
                    Severity: Major
                    Found in playground/libs/flow.module.js - About 1 wk to fix
                      Severity
                      Category
                      Status
                      Source
                      Language