Showing 271 of 665 total issues
Function widgetsPeakVelocity
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
const widgetsPeakVelocity = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return 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 updateDOM
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateDOM() {
this.updateDOMColor();
// update first line
const lineData = this.getLineData(
Function helpersStack
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const helpersStack = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return 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 helpersBorder
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
const helpersBorder = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return null;
}
Function helpersBoundingBox
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
const helpersBoundingBox = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return null;
}
Function fetch
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
fetch(url, requests) {
return new Promise((resolve, reject) => {
const request = new XMLHttpRequest();
request.open('GET', url);
request.crossOrigin = true;
Function aabbPlane
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
static aabbPlane(aabb, plane) {
//
// obb = { halfDimensions, orientation, center, toAABB }
// plane = { position, direction }
//
Function _decodeOpenJPEG
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
_decodeOpenJPEG(frameIndex = 0) {
const encodedPixelData = this.getEncapsulatedImageFrame(frameIndex);
const bytesPerPixel = this.bitsAllocated(frameIndex) <= 8 ? 1 : 2;
const signed = this.pixelRepresentation(frameIndex) === 1;
const dataPtr = openJPEG._malloc(encodedPixelData.length);
Function _convertColorSpace
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
_convertColorSpace(uncompressedData) {
let rgbData = null;
let photometricInterpretation = this.photometricInterpretation();
let planarConfiguration = this.planarConfiguration();
if (planarConfiguration === 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 decode16
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function decode16(imageFrame, pixelData) {
const frameData = pixelData;
const frameSize = imageFrame.rows * imageFrame.columns;
const outFrame = new ArrayBuffer(frameSize * imageFrame.samplesPerPixel * 2);
- 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 widgetsVoxelprobe
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const widgetsVoxelprobe = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return 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 _decodeUncompressed
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
_decodeUncompressed(frameIndex = 0) {
let pixelRepresentation = this.pixelRepresentation(frameIndex);
let bitsAllocated = this.bitsAllocated(frameIndex);
let pixelDataElement = this._dataSet.elements.x7fe00010;
let pixelDataOffset = pixelDataElement.dataOffset;
File core.utils.js
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Validators from './core.validators';
import { Box3 } from 'three/src/math/Box3';
import { Raycaster } from 'three/src/core/Raycaster';
import { Triangle } from 'three/src/math/Triangle';
Function initEventListenner
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
initEventListenner() {
const self = this;
this._emitter.on('load-start', function(event) {
const totalFiles = event.files.length;
Function _decodeOpenJPEG
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
_decodeOpenJPEG(frameIndex = 0) {
const encodedPixelData = this.getEncapsulatedImageFrame(frameIndex);
const bytesPerPixel = this.bitsAllocated(frameIndex) <= 8 ? 1 : 2;
const signed = this.pixelRepresentation(frameIndex) === 1;
const dataPtr = openJPEG._malloc(encodedPixelData.length);
- 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 prepareSegmentation
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
prepareSegmentation() {
// store frame and do special pre-processing
this._frameSegment = this._frame;
let mergedFrames = [];
- 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 updateDOM
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateDOM() {
if (!this._geometry) {
return;
}
File widgets.ruler.js
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { widgetsBase } from './widgets.base';
import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
/**
* @module widgets/ruler
Function decode8
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function decode8(imageFrame, pixelData) {
const frameData = pixelData;
const frameSize = imageFrame.rows * imageFrame.columns;
const outFrame = new ArrayBuffer(frameSize * imageFrame.samplesPerPixel);
const header = new DataView(frameData.buffer, frameData.byteOffset);
- 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 _decodeUncompressed
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
_decodeUncompressed(frameIndex = 0) {
let pixelRepresentation = this.pixelRepresentation(frameIndex);
let bitsAllocated = this.bitsAllocated(frameIndex);
let pixelDataElement = this._dataSet.elements.x7fe00010;
let pixelDataOffset = pixelDataElement.dataOffset;
- 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"