Showing 711 of 1,553 total issues
Function i
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function i(r) {
var t = typeof r
if ('string' === t) {
var e = n(r)
if (32 > e) return 1 + e
Function _collectCylindersInfo
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_collectCylindersInfo(mesh) {
const {
geometry: {
attributes: { position, color, color2 },
index
Function begin
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
begin() {
const visual = this._complexVisual
const selection = this._complexVisual.getSelectionGeo()
const atoms = this._getSelectionBorderAtoms()
Function view
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
view(expression) {
const VIEW_VERSION = '1'
const self = this
const { pivot } = this._gfx
let transform = []
Function getSubset
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
getSubset(chunkIndices) {
const info = _prepareCylinderInfo(chunkIndices)
const cylinderIndices = info.indices
const instanceCount = cylinderIndices.length
const geom = new InstancedBufferGeometry()
Function _forEachVoxelWithinRadiusSimple
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
_forEachVoxelWithinRadiusSimple(center, radius, process) {
const xRange = VoxelWorld._xRange
const yRange = VoxelWorld._yRange
const zRange = VoxelWorld._zRange
const vCenter = VoxelWorld._vCenter
Function _renderVolume
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderVolume(volumeVisual, camera, dstBuf, tmpBuf1, tmpBuf2, tmpBuf3) {
const volumeBFMat = new VolumeMaterial.BackFacePosMaterial()
const volumeFFMat = new VolumeMaterial.FrontFacePosMaterial()
const cubeOffsetMat = new Matrix4().makeTranslation(0.5, 0.5, 0.5)
const world2colorMat = new Matrix4()
Function _updateSecStructure
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
_updateSecStructure(complex, residue, groupData) {
const helixClasses = [3, -1, 1, -1, 5]
if (!isUndefined(groupData) && groupData.secStruct === this._ssType) {
residue._secondary = this._ssStruct
Function getAltObj
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
getAltObj() {
const res = {
objects: [],
pivot: new Vector3(0, 0, 0)
}
Function next
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
next: function next() {
if (this.done) {
return this.EOF;
}
if (!this._input) {
Function next
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
next: function next() {
if (this.done) {
return this.EOF;
}
if (!this._input) {
Function _btnToolbarClick
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _btnToolbarClick() {
if (this.classList.contains('disabled')) {
return
}
Function _calcPoints
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _calcPoints(residues, firstIdx, lastIdx, boundaries) {
const left = boundaries.start
const right = boundaries.end
function _prevIdx(idx) {
return idx > left && residues[idx - 1]._isValid ? idx - 1 : idx
Function _extractSheets
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractSheets(complex, sheetData) {
const { asymDict } = this
if (
!sheetData.sheet_id ||
!sheetData.id ||
Function resolveSourceShortcut
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolveSourceShortcut(source, opts) {
if (!isString(source)) {
return source
}
Function wrapNativeSuper
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
var wrapNativeSuper = createCommonjsModule(function (module) {
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !isNativeFunction(Class)) return Class;
- 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 wrapNativeSuper
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
var wrapNativeSuper = createCommonjsModule(function (module) {
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !isNativeFunction(Class)) return Class;
- 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 _updateReprList
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._updateReprList = function () {
const self = this
function _createOptionsFromMVData(index, property, element, itemId) {
const curRep = self._viewer.repGet(index)
- 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 _countMeshTriangles
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function _countMeshTriangles(mesh) {
const geom = mesh.geometry
if (geom instanceof InstancedBufferGeometry) {
const attribs = geom.attributes
for (const property in attribs) {
- 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 getBoundingBox
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
getBoundingBox(atoms, vBoxMin, vBoxMax) {
const bigNum = 10000000.0
vBoxMin.x = vBoxMin.y = vBoxMin.z = bigNum
vBoxMax.x = vBoxMax.y = vBoxMax.z = 0 - bigNum
- 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"