enableLowEnd
import { enableLowEnd } from 'pixi-silk';
function enableLowEnd(target: SilkApp | Application<Renderer>, options?: LowEndOptions): LowEnd;
One switch for weak devices, turned on by hand: it does not guess the device. Call it when
your game decides it runs on a weak device, from a setting or a list of devices you trust. It
caps the renderer resolution and renders only frames that change. Pass the SilkApp when you made the application with createSilkApp, so the
cap holds when the window resizes. With a plain Application the cap holds until something else
sets the resolution. Blocks made after it, in pixi-silk/ui/blocks, use their cheap look: flat buttons
(one shape and no blur), panels without corner smoothing, and repaints at 30 frames per second.
Call it once, after the application starts and before you build the UI.
Parameters#
| Parameter | Type |
|---|---|
target | SilkApp | Application<Renderer> |
options | LowEndOptions |
Returns#
Example#
import { enableLowEnd } from 'pixi-silk';
// from a quality setting the player or your device list chose
const lowEnd = enableLowEnd(app);