Skip to content
pixi-silk
GitHub repository
Interface

BlockSurfaceOptions

import type { BlockSurfaceOptions } from 'pixi-silk/ui/blocks';

Options of a BlockSurface.

Extends#

Properties#

PropertyTypeDescriptionInherited fromDefined in
breakpoints?readonly Breakpoint[]Named records tested before portrait and landscape.SmartContainerOptions.breakpointspackages/pixi-silk/src/ui/layout/smart-container.ts:95
cache?booleanCache 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?LayoutDataThe record for any other window.SmartContainerOptions.landscapeDatapackages/pixi-silk/src/ui/layout/smart-container.ts:93
layout?SmartLayoutThe container’s own flex style: direction, gap, padding and so on.SmartContainerOptions.layoutpackages/pixi-silk/src/ui/layout/flex-container.ts:66
lowEnd?booleanThe 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?numberMost 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) => voidCalled after every layout pass, on the container that ran it.SmartContainerOptions.onLayoutpackages/pixi-silk/src/ui/layout/flex-container.ts:72
painter?SilkGraphicsOptionsSettings of both layers (dither, AA width, hairlines).-packages/pixi-silk/src/ui/blocks.ts:284
portraitData?LayoutDataThe record for a window taller than wide.SmartContainerOptions.portraitDatapackages/pixi-silk/src/ui/layout/smart-container.ts:91
resolution?numberDevice 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?InsetsKeeps boxes clear of these window insets, unless a record sets ignoreSafeArea.SmartContainerOptions.safeAreapackages/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.switchTransitionpackages/pixi-silk/src/ui/layout/smart-container.ts:101
ticker?Ticker | nullticker defaults to Ticker.shared. Pass null to call FlexContainer.tick yourself.SmartContainerOptions.tickerpackages/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.transitionpackages/pixi-silk/src/ui/layout/flex-container.ts:68
viewport?ViewportSourceThe window to follow. Without one the container does not place itself. Set it later with SmartContainer.setViewport.SmartContainerOptions.viewportpackages/pixi-silk/src/ui/layout/smart-container.ts:97
visible?booleanInitial visible of the container. Default true.SmartContainerOptions.visiblepackages/pixi-silk/src/ui/layout/smart-container.ts:103
watch?booleanChecks the children’s bounds every frame and lays out again when they change. Default false.SmartContainerOptions.watchpackages/pixi-silk/src/ui/layout/flex-container.ts:70