Skip to content

Commit

Permalink
feat: refactor control classes to use readonly for target property (#370
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Kosuke-KIDO-datalabs authored Aug 5, 2024
1 parent d89e3c3 commit 002e780
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controls/ArcballControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class ArcballControls extends EventDispatcher {
public minZoom: number
public maxZoom: number

private target: Vector3
readonly target: Vector3
private _currentTarget: Vector3

private _tbRadius: number
Expand Down
2 changes: 1 addition & 1 deletion src/controls/FirstPersonControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class FirstPersonControls extends EventDispatcher {

private lookDirection = new Vector3()
private spherical = new Spherical()
private target = new Vector3()
readonly target = new Vector3()

constructor(object: Camera, domElement?: HTMLElement | null) {
super()
Expand Down

0 comments on commit 002e780

Please sign in to comment.