Class: PageViewSystem
Drives PageViewComponent. PreRender, before ScrollViewSystem: it writes the ScrollView's offsets and ScrollView applies them to the content the same frame.
Pages = the ScrollView content's children with a UITransform, in order. A page's resting offset centres it in the view (clamped to the scroll range). On release it picks the page (flick speed, then drag distance against scrollThreshold), kills the fling and eases there over turnDuration; writing currentPage (code or Inspector — edit mode too) eases there the same way. A wheel scroll snaps to the nearest page once the wheel goes quiet. PageChanged fires (game running) when it settles on a page other than the last reported.
Extends
BoundComponentSystem<PageViewComponent,BoundPageView>
Constructors
Constructor
ts
new PageViewSystem(): PageViewSystem;Returns
PageViewSystem
Inherited from
ts
BoundComponentSystem<PageViewComponent, BoundPageView>.constructorProperties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
enabled | public | boolean | true | BoundComponentSystem.enabled |
parallel | public | boolean | false | BoundComponentSystem.parallel |
Methods
GetName()
ts
GetName(): string;Returns
string
Overrides
ts
BoundComponentSystem.GetNameGetOrder()
ts
GetOrder(): SystemOrder;Ordered: it writes the offsets ScrollView applies this frame.
Returns
SystemOrder
GetPhase()
ts
GetPhase(): SystemPhase;Returns
Overrides
ts
BoundComponentSystem.GetPhaseOnClose()
ts
OnClose(): void;Returns
void
Inherited from
ts
BoundComponentSystem.OnCloseOnInit()
ts
OnInit(engine): void;Parameters
| Parameter | Type |
|---|---|
engine | IEngine |
Returns
void
Inherited from
ts
BoundComponentSystem.OnInitOnRender()
ts
OnRender(scene, _renderer): void;Parameters
| Parameter | Type |
|---|---|
scene | Scene |
_renderer | IRenderer |
Returns
void
Overrides
ts
BoundComponentSystem.OnRenderOnRendererChanged()
ts
OnRendererChanged(_renderer): void;Parameters
| Parameter | Type |
|---|---|
_renderer | IRenderer |
Returns
void
Inherited from
ts
BoundComponentSystem.OnRendererChangedOnStart()
ts
OnStart(scene, _renderer): void;Parameters
| Parameter | Type |
|---|---|
scene | Scene |
_renderer | IRenderer |
Returns
void
Inherited from
ts
BoundComponentSystem.OnStartOnStop()
ts
OnStop(_scene): void;Parameters
| Parameter | Type |
|---|---|
_scene | Scene |
Returns
void
Inherited from
ts
BoundComponentSystem.OnStopOnUpdate()
ts
OnUpdate(_scene, _dt): void | Promise<void>;Parameters
| Parameter | Type |
|---|---|
_scene | Scene |
_dt | number |
Returns
void | Promise<void>
Inherited from
ts
BoundComponentSystem.OnUpdate