ViewportVisuals
| Kind | class |
| Package | backend |
| Full name | backend.ViewportVisuals |
| Source | source/backend/ViewportVisuals.hx |
Layout for full-screen artwork and solid overlays (never non-uniformly stretch art).
Public methods
cover
static function cover(sprite:FlxSprite, minimumScale:Float = 1):Void
Cover the viewport with a menu image; preserve its aspect ratio.
| Parameter | Type | Default |
|---|---|---|
sprite | FlxSprite | — |
minimumScale (optional) | Float | 1 |
overscan
static function overscan(sprite:FlxSprite):Void
Cover camera zoom/rotation, even on an ultrawide viewport, with a solid stage flash.
| Parameter | Type | Default |
|---|---|---|
sprite | FlxSprite | — |
fill
static function fill(sprite:FlxSprite, height:Int = -1):Void
Expand an opaque/solid rectangle to the current viewport.
| Parameter | Type | Default |
|---|---|---|
sprite | FlxSprite | — |
height (optional) | Int | -1 |