Showing 271 of 665 total issues
File models.frame.js
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/** * Imports ***/
import ModelsBase from '../models/models.base';
import { Vector3 } from 'three/src/math/Vector3';
Function helpersLut
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Open
const helpersLut = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return null;
}
const Constructor = three.Object3D;
- 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 constructor
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(data, id) {
super();
/**
* @member
File widgets.base.ts
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import WidgetsCss from './widgets.css';
import {COLORS} from '../core/core.colors';
import CoreUtils from '../core/core.utils';
ParsersVolume
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export default class ParsersVolume {
constructor() {
this._rightHanded = true;
}
Function parse
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse: function(data) {
let littleEndian = this.littleEndian();
let reader = new DataView(data);
let offset = 0;
let surfDesc = undefined;
File widgets.biruler.js
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { widgetsBase } from './widgets.base';
import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
/**
* @module widgets/biruler
Function uFloat32
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
uFloat32() {
return `
void uFloat32(in float r, in float g, in float b, in float a, out float value){
// create arrays containing bits for rgba values
Function _packTo8Bits
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
Open
_packTo8Bits(channels, frame, textureSize, startVoxel, stopVoxel) {
const packed = {
textureType: null,
data: null,
};
- 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 uniforms
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static uniforms() {
return {
uTextureSize: {
type: 'i',
value: 0,
File widgets.rectangle.js
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { widgetsBase } from './widgets.base';
import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
import CoreUtils from '../core/core.utils';
/**
File widgets.pressureHalfTime.js
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { widgetsBase } from './widgets.base';
import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
import CoreUtils from '../core/core.utils';
/**
Function updateDOM
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateDOM() {
this.updateDOMColor();
// update first line
const lineData = this.getLineData(
Function _packTo8Bits
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_packTo8Bits(channels, frame, textureSize, startVoxel, stopVoxel) {
const packed = {
textureType: null,
data: null,
};
File parsers.mgh.js
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/** * Imports ***/
import ParsersVolume from './parsers.volume';
import { Vector3 } from 'three/src/math/Vector3';
Function parse
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse(response) {
// emit 'parse-start' event
this.emit('parse-start', {
file: response.url,
time: new Date(),
File widgets.annotation.js
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { widgetsBase } from './widgets.base';
import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
/**
* @module widgets/annotation
Function main
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
main() {
// need to pre-call main to fill up the functions list
this._main = `
void main(void) {
Function computeDefinition
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
computeDefinition() {
this._definition = `
void trilinearInterpolation(
in vec3 normalizedPosition,
out vec4 interpolatedValue,
File widgets.angle.js
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { widgetsBase } from './widgets.base';
import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
/**
* @module widgets/angle