diff --git a/react-components/src/architecture/base/commands/BaseFilterCommand.ts b/react-components/src/architecture/base/commands/BaseFilterCommand.ts index 995e2145af..46a2d76926 100644 --- a/react-components/src/architecture/base/commands/BaseFilterCommand.ts +++ b/react-components/src/architecture/base/commands/BaseFilterCommand.ts @@ -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); } diff --git a/react-components/src/architecture/base/renderTarget/RevealRenderTarget.ts b/react-components/src/architecture/base/renderTarget/RevealRenderTarget.ts index a01ecde044..2a1689c595 100644 --- a/react-components/src/architecture/base/renderTarget/RevealRenderTarget.ts +++ b/react-components/src/architecture/base/renderTarget/RevealRenderTarget.ts @@ -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'; @@ -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 { // ================================================== @@ -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 // ================================================== @@ -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; }