Showing 12 of 120 total issues
Function OrbitControls
has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring. Open
Open
THREE.OrbitControls = function ( object, domElement ) {
this.object = object;
this.domElement = ( domElement !== undefined ) ? domElement : document;
- Read upRead up
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 OrbitControls
has 425 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
THREE.OrbitControls = function ( object, domElement ) {
this.object = object;
this.domElement = ( domElement !== undefined ) ? domElement : document;
File orbit-controls.js
has 560 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
Function update
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update: function(oldData) {
var scene = this.el.object3D;
// Equation parser
var equation = 'f(x,y) = ' + this.data.equation;
Function update
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.update = function() {
var offset = new THREE.Vector3();
// so camera.up is the orbit axis
Function tick
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tick: (function () {
var position = new THREE.Vector3(),
meshPosition = new THREE.Vector3();
return function () {
var el = this.el,
Function update
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function update () {
var position = scope.object.position;
offset.copy( position ).sub( scope.target );
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
id, position, width, height, buttonColor, text, textColor, textWidth,
} = this.props
const { depth, opacity } = this.state
Function update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
update: function(oldData) {
var scene = this.el.object3D;
// Equation parser
var equation = 'f(x,y) = ' + this.data.equation;
- Read upRead up
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
Avoid too many return
statements within this function. Open
Open
if ( state !== STATE.TOUCH_DOLLY ) return; // is this needed?...
Avoid too many return
statements within this function. Open
Open
if ( scope.enablePan === false ) return;
Avoid too many return
statements within this function. Open
Open
if ( state !== STATE.TOUCH_PAN ) return; // is this needed?...