Skip to content

Scroll ​

Makes a plane scrollable and clip/hide beyond the plane's dimensions.

ParamTypeDefaultDescription
planeTHREE.Object3DPlane which contains scrollable content
paramsObjectParameters such as scrolling on X or Y axis, smoothing
js
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
}