Skip to content

Commit

Permalink
fix: make trackballcontrols domelement optional
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Oct 12, 2021
1 parent 37d3212 commit 46ac4f4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/controls/TrackballControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,8 @@ class TrackballControls extends EventDispatcher {
private startEvent = { type: 'start' }
private endEvent = { type: 'end' }

constructor(object: PerspectiveCamera | OrthographicCamera, domElement: HTMLElement) {
constructor(object: PerspectiveCamera | OrthographicCamera, domElement?: HTMLElement) {
super()

if (domElement === undefined) {
console.warn('THREE.TrackballControls: The second parameter "domElement" is now mandatory.')
}

this.object = object

// for reset
Expand Down

1 comment on commit 46ac4f4

@vercel
Copy link

@vercel vercel bot commented on 46ac4f4 Oct 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.