Skip to content

Commit

Permalink
Fix according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
nilscognite committed Oct 2, 2024
1 parent 510046b commit 5e57c2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export abstract class BaseFilterItemCommand extends RenderTargetCommand {
// ==================================================

public override invokeCore(): boolean {
// Toggle the checked state, you do npt need to override this method
// Toggle the checked state, you do not need to override this method
// as long as setCheckedCore and isChecked are overridden
return this.setCheckedCore(!this.isChecked);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import {
DirectionalLight,
type PerspectiveCamera,
type Box3,
type Plane,
type Matrix4
type Plane
} from 'three';
import { CommandsController } from './CommandsController';
import { RootDomainObject } from '../domainObjects/RootDomainObject';
Expand All @@ -37,7 +36,6 @@ import { type CogniteClient } from '@cognite/sdk/dist/src';
import { type BaseTool } from '../commands/BaseTool';

const DIRECTIONAL_LIGHT_NAME = 'DirectionalLight';
const VIEWER_TO_CDF_TRANSFORMATION = CDF_TO_VIEWER_TRANSFORMATION.clone().invert();

export class RevealRenderTarget {
// ==================================================
Expand All @@ -54,6 +52,9 @@ export class RevealRenderTarget {
private _axisGizmoTool: AxisGizmoTool | undefined;
private _config: BaseRevealConfig | undefined = undefined;

public readonly toViewerMatrix = CDF_TO_VIEWER_TRANSFORMATION.clone();
public readonly fromViewerMatrix = CDF_TO_VIEWER_TRANSFORMATION.clone().invert();

// ==================================================
// CONSTRUCTOR
// ==================================================
Expand Down Expand Up @@ -99,14 +100,6 @@ export class RevealRenderTarget {
return this._viewer.domElement;
}

public get toViewerMatrix(): Matrix4 {
return CDF_TO_VIEWER_TRANSFORMATION;
}

public get fromViewerMatrix(): Matrix4 {
return VIEWER_TO_CDF_TRANSFORMATION;
}

public get commandsController(): CommandsController {
return this._commandsController;
}
Expand Down

0 comments on commit 5e57c2b

Please sign in to comment.