When connecting to the OrbitControl, we set touchAction to none, which prevents the user from scrolling the page and allows them to interact with the 3D scene. However, when we dispose of the OrbitControl, we don't re-enable the touchAction, which means the user is unable to scroll the page even after the OrbitControl is disabled or removed.
There are situations where we want to allow users to interact with the scene when they click a button, but in other cases, we don't want them to interact, and instead, allow them to scroll the page. However, if we set the touchAction to none and don't re-enable it after disposing of the OrbitControl, the user will be unable to scroll the page at all.
Why
When connecting to the OrbitControl, we set
touchAction
tonone
, which prevents the user from scrolling the page and allows them to interact with the 3D scene. However, when we dispose of the OrbitControl, we don't re-enable thetouchAction
, which means the user is unable to scroll the page even after the OrbitControl is disabled or removed.There are situations where we want to allow users to interact with the scene when they click a button, but in other cases, we don't want them to interact, and instead, allow them to scroll the page. However, if we set the
touchAction
tonone
and don't re-enable it after disposing of the OrbitControl, the user will be unable to scroll the page at all.What
In
this.dispose
method, I settouchAction
toauto
Checklist