Showing 146 of 146 total issues
Function onPanStart
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
public onPanStart(e: any): void {
this.positionAtStart = this.parent.quaternion.clone();
this.parent.userData.override = true; // Switched off in the LoreService
combineLatest([
this.storeFacade.isDebugMode$,
File orbit-control.class.ts
has 576 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { EventDispatcher, OrthographicCamera, PerspectiveCamera, Quaternion, Spherical, Vector2, Vector3 } from 'three';
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
// This set of controls performs orbiting, dollying (zooming), and panning.
File engine.service.ts
has 537 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Injectable } from '@angular/core';
import { denormalize } from '@app/function';
import { Actor, Lore, Planet, Vector3Serializable } from '@app/model/data';
import { tweenMap } from '@app/operator/tween-map.operator';
File actor-object.class.ts
has 537 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Enclosing, Node } from '@alexaegis/avl';
import { arcIntersection } from '@app/function/arc-intersect.function';
import { intersection } from '@app/function/intersection.function';
import { Actor, ActorDelta, UnixWrapper } from '@app/model/data';
import { Accumulator, ActorService, LoreService } from '@app/service';
Function constructor
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
private engineService: EngineService,
private databaseService: DatabaseService,
private storeFacade: StoreFacade,
private actorService: ActorService
File block.component.ts
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Enclosing, Node } from '@alexaegis/avl';
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
OrbitControls
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
export class OrbitControls extends EventDispatcher {
static STATE = { NONE: -1, ROTATE: 0, DOLLY: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_DOLLY_PAN: 4 };
constructor(public object: PerspectiveCamera | OrthographicCamera, private domElement: HTMLCanvasElement) {
super();
StoreFacade
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
@Injectable()
export class StoreFacade {
// Project
public lores$ = this.store$.pipe(select(loreQuery.getLores));
public selectedLore$ = this.store$.pipe(
Function panNode
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public panNode($event: any, node: Node<UnixWrapper, ActorDelta>): void {
$event.stopPropagation();
if ($event.type === 'panstart') {
this.isPanning = true;
this._originalUnixesForPan.set(node, node.key.unix);
Function panNode
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public panNode($event: any, node: Node<UnixWrapper, ActorDelta>): void {
$event.stopPropagation();
if ($event.type === 'panstart') {
this.isPanning = true;
this._originalUnixesForPan.set(node, node.key.unix);
- 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 actor.service.ts
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Node } from '@alexaegis/avl';
import { Injectable } from '@angular/core';
import { refreshBlockOfActor } from '@app/function';
import { enclosingProgress } from '@app/function/enclosing-progress.function';
import { EngineService } from '@app/lore/engine/engine.service';
EngineService
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
@Injectable()
export class EngineService {
/**
* These subscriptions are for ensuring the side effects are happening always, even when there are no other subscirbers end the listeners
* (Since they are shared, side effects will only happen once)
Function onMouseDown
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
static onMouseDown(scope: OrbitControls) {
return function _onMouseDown(event) {
if (scope.enabled === false) {
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 sceneReducer
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function sceneReducer(state: SceneState = initialSceneState, action: SceneActions): SceneState {
switch (action.type) {
case setPlaySpeed.type: {
return {
...state,
Function pan
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public pan(coord: Vector2, velocity: Vector2, button: number, start: boolean, end: boolean) {
// this.control.enabled = this.interactionMode === 'move';
this.raycaster.setFromCamera(coord, this.stage.camera);
const intersections = this.raycaster.intersectObject(this.globe, true);
const intersectionsFiltered = intersections.filter(i => i.object.type === 'Globe' || i.object.type === 'Point'); // Ignoring arcs
- 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
BlockComponent
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'app-block',
templateUrl: './block.component.html',
styleUrls: ['./block.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
File scene.reducer.ts
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { toUnit } from '@app/function';
import { DeltaProperty, OverridableProperty } from '@app/model';
import {
bakeCursorOverride,
bakeFrame,
Function frameReducer
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function frameReducer(frame: FrameState, action: SceneActions): FrameState {
switch (action.type) {
case setFrameTo.type: {
const start = action.payload.start || frame.start.base;
const end = action.payload.end || frame.end.base;
File lore.service.ts
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Enclosing, Node } from '@alexaegis/avl';
import { Offset } from '@angular-skyhook/core';
import { Injectable } from '@angular/core';
import { BaseDirective } from '@app/component/base-component.class';
import { normalizeFromWindow } from '@app/function';
Function initializePostprocessing
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
private initializePostprocessing(): void {
// PostProcessing
this.composer = new EffectComposer(this.renderer, {
stencilBuffer: true