src/app/lore/engine/object/actor-object.class.ts
Function onPanStart
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 actor-object.class.ts
has 537 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 calculateIntersection
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
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)
- 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 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public constructor(
public actor: RxDocument<Actor>,
private storeFacade: StoreFacade,
private loreService: LoreService,
private actorService: ActorService,
Function calculateIntersection
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)
TODO found Open
Open
this.requestedDistance = this.requestedAngle * globe.radius; // TODO: Ditch
- Exclude checks
TODO found Open
Open
// Quaternion stuff TODO: Ditch
- Exclude checks
TODO found Open
Open
this.nearestQuaternion = preLookHelper.quaternion.clone(); // TODO: Ditch
- Exclude checks
TODO found Open
Open
preLookHelper.lookAt(this.nearestAllowedPosition); // TODO: Ditch
- Exclude checks
TODO found Open
Open
]; // TODO: Transition from q to vector3
- Exclude checks
TODO found Open
Open
* TODO: The first/last thing is switched, fix it in the AVL repo
- Exclude checks