The 2D layer · function

scrollExtent

How far this node's contents extend past its own box, along each axis.

Explained in Sprites and tilemaps.

function scrollExtent(node: UiNode):
import { scrollExtent } from '@driftengine/ui2d';

Parameters

ParameterTypeDescription
nodeUiNode

In depth

Read from the span layoutUiTree measured, which is relative to the content origin and so does not change as the node scrolls. Deriving it from placed rectangles plus the live scroll value is wrong, and wrong in the one situation it is asked about: after a caller has moved the scroll, the rectangles still reflect the previous value and the two no longer agree.