Showing 711 of 1,553 total issues
Function buildTiledTexture
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildTiledTexture() {
let tilesX = Math.ceil(Math.sqrt((this._dimZ * this._dimY) / this._dimX))
let width = tilesX * (this._dimX + 2) - 1
width = pow2ceil(width)
Function RepresentationMap
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
var RepresentationMap = function () {
function RepresentationMap() {
_classCallCheck(this, RepresentationMap);
this.representationMap = {};
this.representationID = {};
Function RepresentationMap
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
var RepresentationMap = function () {
function RepresentationMap() {
_classCallCheck(this, RepresentationMap);
this.representationMap = {};
this.representationID = {};
Function _build
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_build() {
const bondsIdc = this._selection.chunks
const { bonds, parent } = this._selection
const mode = this._mode
const colorer = this._colorer
Function o
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function o() {
var o,
s,
f = r[a]
if (0 === (128 & f)) return a++, f
Function _tryBond
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_tryBond(prevBond, currRight, currDir) {
const bondsOrder = []
const bondsData = this._bondsData
const currLeft = _anotherAtom(prevBond, currRight)
const currVec = currRight.position.clone().sub(currLeft.position)
Function _buildSelectorFromSortedLists
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildSelectorFromSortedLists(atoms, residues, chains) {
const complex = this._complex
function optimizeList(list) {
const result = []
Function _parseATOM
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseATOM(stream) {
if (this._modelId !== 1) {
return
}
Function SphereCollisionGeo
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const SphereCollisionGeo = (base) =>
class extends base {
constructor(count, ...args) {
super(...args)
this._objects = new Array(count)
- 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 a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
constructor(
radiusTop,
radiusBottom,
height,
radialSegments,
- 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 _forEachSubChain
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
_forEachSubChain(mask, process) {
const residues = this._complex._residues
const subs = this._subDivs
for (let i = 0, n = subs.length; i < n; ++i) {
for (let idx = subs[i].start, last = subs[i].end; idx <= last; ++idx) {
- 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 _build
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
_build() {
const self = this
for (let i = 0; i < this._complex._residues.length - 1; ++i) {
const ri = this._complex._residues[i]
- 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 getState
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getState(opts) {
const state = {}
opts = defaults(opts, {
compact: true,
- 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 updateToFrame
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateToFrame(frameData) {
const bondsIdc = this._selection.chunks
const { bonds } = this._selection
const mode = this._mode
const colorer = this._colorer
Function _findPairs
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
_findPairs() {
const vw = this._complex.getVoxelWorld()
if (vw === null) {
return
}
Function toURL
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function toURL(opts) {
const stringList = []
let idx = 0
function checkAndAdd(prefix, value) {
Function rep
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
rep(index, rep) {
// if index is missing then it is the current
if (!rep && (index === undefined || index instanceof Object)) {
rep = index
index = this.repCurrent()
Function _build
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
_build() {
const bondsIdc = this._selection.chunks
const { bonds, parent } = this._selection
const mode = this._mode
const colorer = this._colorer
Function constructor
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
const geo = new BufferGeometry()
super(geo)
this.clipPlane = new Plane()
const size = new Vector3(0.5, 0.5, 0.5)
Function calculateGridCorners
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculateGridCorners(corners, side, vBoxMin, vBoxMax, atoms, probeRad) {
const side2 = side * side
const side3 = side2 * side
const vCorner = new Vector3()
const vDif = new Vector3()