PageView
Optional feature
PageView is part of UI Controls. A build includes it only when a scene, prefab or script uses it — see Feature cropping.
From a script
ts
import { PageViewComponent } from "mmpx";
const pageView = this.entity.TryGetComponent(PageViewComponent);Full API: PageViewComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Current PagecurrentPage | number (0 … ∞) | 0 | |
Scroll ThresholdscrollThreshold | number (0.05 … 1) | 0.3 | How far (of a page) a drag goes before it turns the page |
Flick SpeedflickSpeed | number (0 … ∞) (px/s) | 600 | A faster flick turns the page however short it was |
Turn DurationturnDuration | number (0.05 … ∞) (s) | 0.3 | |
Indicatorindicator | Entity | — | An entity whose children are the page dots |
Indicator
| Field | Type | Default | Description |
|---|---|---|---|
Dotcolor | colour | #5A5F6E | |
Current DotactiveColor | colour | #FFFFFF |