Showing 40 of 72 total issues
Function OrbitControls
has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring. Open
THREE.OrbitControls = function ( object, domElement ) {
this.object = object;
this.domElement = ( domElement !== undefined ) ? domElement : document;
- 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 OrbitControls
has 315 lines of code (exceeds 25 allowed). Consider refactoring. Open
THREE.OrbitControls = function ( object, domElement ) {
this.object = object;
this.domElement = ( domElement !== undefined ) ? domElement : document;
Function Movement
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
window.Movement = (function () {
"use strict";
function Movement(sceneObjects, player) {
this.sceneObjects = sceneObjects;
this.player = player;
- 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 BoundaryCollisionDetector
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
window.BoundaryCollisionDetector = (function () {
"use strict";
function BoundaryCollisionDetector(sceneObjects, scene, player) {
this.FLOOR_DIMENSIONS = 3000;
this.RAY_OFFSET = -200;
- 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 BoundaryCollisionDetector
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.BoundaryCollisionDetector = (function () {
"use strict";
function BoundaryCollisionDetector(sceneObjects, scene, player) {
this.FLOOR_DIMENSIONS = 3000;
this.RAY_OFFSET = -200;
Function IslandInitializer
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.IslandInitializer = (function() {
"use strict";
function IslandInitializer(materials) {
this.materials = materials;
}
Function Enemy
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
window.Enemy = (function() {
"use strict";
function Enemy(sceneObjects, scene, size, positionX, positionZ, updatableObjects, player, materials) {
this.FIRE_RATE = 0.05;
this.FIRE_FAILURE_RATE = 0.4;
- 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
File OrbitControls.js
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
Function Enemy
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Enemy = (function() {
"use strict";
function Enemy(sceneObjects, scene, size, positionX, positionZ, updatableObjects, player, materials) {
this.FIRE_RATE = 0.05;
this.FIRE_FAILURE_RATE = 0.4;
Function BulletCollisionDetector
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
window.BulletCollisionDetector = (function () {
"use strict";
function BulletCollisionDetector(sceneObjects, scene, story, player, playerWidth, enemyWidth) {
this.sceneObjects = sceneObjects;
this.scene = scene;
- 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 SceneObjects
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.SceneObjects = (function() {
"use strict";
function SceneObjects(scene, camera, materials) {
this.FLOOR = -100;
Function Movement
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Movement = (function () {
"use strict";
function Movement(sceneObjects, player) {
this.sceneObjects = sceneObjects;
this.player = player;
Function MeshLoader
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.MeshLoader = (function() {
"use strict";
function MeshLoader(sceneObjects, player, morphs) {
this.FLOOR = 0;
Function EnemySpawner
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.EnemySpawner = (function(){
"use strict";
function EnemySpawner(sceneObjects, scene, meshLoader, updatableObjects, player, materials, enemyWidth) {
this.MAX_ENEMIES = 15;
this.SPAWN_RATE = 0.1;
Function BulletCollisionDetector
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.BulletCollisionDetector = (function () {
"use strict";
function BulletCollisionDetector(sceneObjects, scene, story, player, playerWidth, enemyWidth) {
this.sceneObjects = sceneObjects;
this.scene = scene;
Function Story
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Story = (function () {
"use strict";
function Story(scene, network, allBullets, sound) {
this.scene = scene;
this.network = network;
Function touchmove
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function touchmove( event ) {
if ( scope.enabled === false ) return;
event.preventDefault();
Function Sound
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Sound = (function () {
"use strict";
function Sound() {
this.initializeDynamicSource();
this.initializeThemeSource();
Function Bullet
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Bullet = (function () {
"use strict";
function Bullet(scene, enemyToFire, player, allBullets) {
this.BULLET_SIZE = 50;
this.SPEED = 20;
Function MovementCollisionDetector
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.MovementCollisionDetector = (function () {
"use strict";
function MovementCollisionDetector(sceneObjects, player) {
this.sceneObjects = sceneObjects;
this.player = player;