Showing 128 of 146 total issues
Function update
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
update() {
const position = this.object.position;
this._updateOffset.copy(position).sub(this.target);
Function onMouseMove
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
static onMouseMove(scope: OrbitControls) {
return function _onMouseMove(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 onTouchStart
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
static onTouchStart(scope: OrbitControls) {
return function _onTouchStart(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 constructor
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
constructor(
private engineService: EngineService,
private databaseService: DatabaseService,
private storeFacade: StoreFacade,
private actorService: ActorService
- 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 finiteProgress
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function finiteProgress<T>(
onStart?: (start: { total: number; observables: Array<Observable<T>> }) => void,
onProgress?: (progress: { result: T; done: number; total: number; index: number }) => void,
onFinish?: () => void
): OperatorFunction<Observable<T>, T> {
Function constructor
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public constructor(
public actor: RxDocument<Actor>,
private storeFacade: StoreFacade,
private loreService: LoreService,
private actorService: ActorService,
Function constructor
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public constructor(private templateRef: TemplateRef<any>, private viewContainer: ViewContainerRef) {
super();
this.teardown = this.audit
.pipe(
throttleTime(1000 / 60),
Function progressOperation
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function progressOperation(source: Observable<Observable<T>>): Observable<T> {
return source.pipe(
map(observable => ({ total: 0, observables: [observable] })),
reduce(
(acc, next) => {
Function ngOnInit
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public ngOnInit(): void {
this.teardown = this.frameShifter
.pipe(withLatestFrom(this.storeFacade.frame$, this.loreService.containerWidth))
.subscribe(([shift, frame, containerWidth]) => {
if (shift !== undefined) {
Function actorPositionAt
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public actorPositionAt(actor: RxDocument<Actor>, unix: number): Vector3Serializable {
let finalPosition: Vector3Serializable;
this._w.unix = unix;
const enclosing = actor._states.enclosingNodes(this._w);
if (enclosing.first === undefined || enclosing.last === undefined) {
- 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 calculateIntersection
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public calculateIntersection(globe: Globe, preLookHelper: Group, isDebugMode: boolean) {
if (this.left.valid && this.right.valid) {
this.normal
.copy(this.left.position)
.cross(this.right.position)
Function pan
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
@HostListener('panstart', ['$event'])
@HostListener('panleft', ['$event'])
@HostListener('panright', ['$event'])
@HostListener('panup', ['$event'])
@HostListener('pandown', ['$event'])
Function intersection
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function intersection(c1: Circle, c2: Circle, radius: number): Array<Vector3> {
const intersections: Array<Vector3> = [];
// project to (x,y,z) with unit radius
const x1: Vector3 = c1.center.clone().normalize();
Function infiniteProgress
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function infiniteProgress<T>(
onEnter?: (enter: { index: number; count: number; observable: Observable<T> }) => void,
onProgress?: (progress: { result: T; done: number; total: number; index: number }) => void,
onFinish?: () => void
): OperatorFunction<Observable<T>, T> {
Function click
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public click(coord: Vector2, shift: boolean) {
this.control.enabled = true;
this.raycaster.setFromCamera(coord, this.stage.camera);
const intersection = this.raycaster
.intersectObject(this.globe, true)
Function PEhandler
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
handler: function PEhandler(ev) {
const store = this.store;
let removePointer = false;
const eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');
Function actorPositionAt
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public actorPositionAt(actor: RxDocument<Actor>, unix: number): Vector3Serializable {
let finalPosition: Vector3Serializable;
this._w.unix = unix;
const enclosing = actor._states.enclosingNodes(this._w);
if (enclosing.first === undefined || enclosing.last === undefined) {
Function progressOperation
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function progressOperation(source: Observable<Observable<T>>): Observable<T> {
return source.pipe(
mergeScan((acc, next) => of((acc.index = acc.count++) !== undefined && (acc.observable = next) && acc), {
index: 0,
count: 0,
Function inArray
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function inArray(src, find, findByKey) {
if (src.indexOf && !findByKey) {
return src.indexOf(find);
} else {
let i = 0;
- 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 frameReducer
has a Cognitive Complexity of 11 (exceeds 5 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;
- 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"