Skip to content

Commit

Permalink
Refactor control classes to use readonly for target property
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosuke-KIDO-datalabs committed May 25, 2024
1 parent 430ffd7 commit bddc6f2
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 bddc6f2

Please sign in to comment.