Scroll
Makes a plane scrollable and clip/hide beyond the plane's dimensions.
| Param | Type | Default | Description |
|---|---|---|---|
| plane | THREE.Object3D |
Plane which contains scrollable content | |
| params | Object |
|
Parameters such as scrolling on X or Y axis, smoothing |
const params = { axis: "Y", speed: 1.0, smoothing: 1.0, clamp: true };
UI.Scroll(planeObject, params);
// you can set an onScroll on the container object which calls when scrolling
planeObject.onScroll = () => {
objectScrolled = true;
};