BlockSurfaceOptions
import type { BlockSurfaceOptions } from 'pixi-silk/ui/blocks';
Options of a BlockSurface.
Extends#
Properties#
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
breakpoints? | readonly Breakpoint[] | Named records tested before portrait and landscape. | SmartContainerOptions.breakpoints | packages/pixi-silk/src/ui/layout/smart-container.ts:95 |
cache? | boolean | Cache each layer as a texture between changes, so at rest the surface draws textured quads and runs no distance field. Default true. Turn it off for a surface that moves every frame. | - | packages/pixi-silk/src/ui/blocks.ts:267 |
landscapeData? | LayoutData | The record for any other window. | SmartContainerOptions.landscapeData | packages/pixi-silk/src/ui/layout/smart-container.ts:93 |
layout? | SmartLayout | The container’s own flex style: direction, gap, padding and so on. | SmartContainerOptions.layout | packages/pixi-silk/src/ui/layout/flex-container.ts:66 |
lowEnd? | boolean | The cheap look for weak devices: flat buttons, panels without corner smoothing, and repaints at most 30 times a second. Default on after enableLowEnd() from pixi-silk, else off. | - | packages/pixi-silk/src/ui/blocks.ts:272 |
maxFps? | number | Most repaints per second while something moves. 0 repaints every frame. Default 30 with lowEnd, else 0. | - | packages/pixi-silk/src/ui/blocks.ts:277 |
onLayout? | (container: FlexContainer) => void | Called after every layout pass, on the container that ran it. | SmartContainerOptions.onLayout | packages/pixi-silk/src/ui/layout/flex-container.ts:72 |
painter? | SilkGraphicsOptions | Settings of both layers (dither, AA width, hairlines). | - | packages/pixi-silk/src/ui/blocks.ts:284 |
portraitData? | LayoutData | The record for a window taller than wide. | SmartContainerOptions.portraitData | packages/pixi-silk/src/ui/layout/smart-container.ts:91 |
resolution? | number | Device pixels per CSS pixel for the cache. Default the viewport’s renderer resolution, else devicePixelRatio. The surface multiplies it by its own scale. | - | packages/pixi-silk/src/ui/blocks.ts:282 |
safeArea? | Insets | Keeps boxes clear of these window insets, unless a record sets ignoreSafeArea. | SmartContainerOptions.safeArea | packages/pixi-silk/src/ui/layout/smart-container.ts:99 |
switchTransition? | | boolean | { damping?: number; stiffness?: number; } | Glide to the new place and scale when the breakpoint changes. Pass an object to tune the spring. Default false. | SmartContainerOptions.switchTransition | packages/pixi-silk/src/ui/layout/smart-container.ts:101 |
ticker? | Ticker | null | ticker defaults to Ticker.shared. Pass null to call FlexContainer.tick yourself. | SmartContainerOptions.ticker | packages/pixi-silk/src/ui/layout/flex-container.ts:74 |
transition? | | boolean | { damping?: number; stiffness?: number; } | Glide children to new slots on a spring. true uses stiffness 170 and damping 26. Default false. | SmartContainerOptions.transition | packages/pixi-silk/src/ui/layout/flex-container.ts:68 |
viewport? | ViewportSource | The window to follow. Without one the container does not place itself. Set it later with SmartContainer.setViewport. | SmartContainerOptions.viewport | packages/pixi-silk/src/ui/layout/smart-container.ts:97 |
visible? | boolean | Initial visible of the container. Default true. | SmartContainerOptions.visible | packages/pixi-silk/src/ui/layout/smart-container.ts:103 |
watch? | boolean | Checks the children’s bounds every frame and lays out again when they change. Default false. | SmartContainerOptions.watch | packages/pixi-silk/src/ui/layout/flex-container.ts:70 |