Showing 49 of 114 total issues
File index.js
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
import THREE from 'three';
import Submesh from './submesh';
import M2Material from './material';
import AnimationManager from './animation-manager';
File wmo-handler.js
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
import ContentQueue from '../content-queue';
import WMOBlueprint from '../../../pipeline/wmo/blueprint';
import WMOGroupBlueprint from '../../../pipeline/wmo/group/blueprint';
import M2Blueprint from '../../../pipeline/m2/blueprint';
Function createSkeleton
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
createSkeleton(boneDefs) {
const rootBones = [];
const bones = [];
const billboards = [];
Function update
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
update() {
const unit = this.unit;
// TODO: Get rid of this delta retrieval call
const delta = this.clock.getDelta();
- 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 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(wmo, id, data, path) {
super();
this.dispose = ::this.dispose;
File index.js
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
import THREE from 'three';
import TextureLoader from '../../texture-loader';
import vertexShader from './shader.vert';
import fragmentShader from './shader.frag';
Function dataReceived
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
dataReceived(_socket) {
while (true) {
if (!this.connected) {
return;
}
- 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 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(adt, id) {
super();
this.matrixAutoUpdate = false;
Function applyBlendingMode
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
applyBlendingMode(blendingMode) {
this.uniforms.blendingMode.value = blendingMode;
if (blendingMode === 1) {
this.uniforms.alphaKey = { type: 'f', value: 1.0 };
Function feed
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
feed(s, B, I, P) {
// Generated salt (s) and server's public ephemeral value (B)
this._s = BigNum.fromArray(s);
this._B = BigNum.fromArray(B);
Function createSkeleton
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
createSkeleton(boneDefs) {
const rootBones = [];
const bones = [];
const billboards = [];
- 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
WMOHandler
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class WMOHandler {
static LOAD_GROUP_INTERVAL = 1;
static LOAD_GROUP_WORK_FACTOR = 1 / 10;
static LOAD_GROUP_WORK_MIN = 2;
Function createDef
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
createDef(data, batchData) {
const def = this.stubDef();
const { textures } = data;
const { vertexColorAnimations, transparencyAnimations, uvAnimations } = data;
Function update
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
update() {
const unit = this.unit;
// TODO: Get rid of this delta retrieval call
const delta = this.clock.getDelta();
Function constructor
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(def, textureDefs) {
super();
this.textures = [];
Function constructor
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(m2, def) {
if (def.useSkinning) {
super({ skinning: true });
} else {
super({ skinning: false });
Function mapStats
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
mapStats() {
const map = this.props.map;
return (
<div>
Function constructor
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(path, data, skinData, instance = null) {
super();
this.matrixAutoUpdate = false;
Function handleCharacterList
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleCharacterList(gp) {
const count = gp.readByte(); // number of characters
this.list.length = 0;
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<kit className="screen">
<div className="frame thin">
<h2>Thin frame</h2>