Skip to content
GitHub repository
Interface

SilkAppOptions

Options of createSilkApp: Pixi application options plus the element to fill, DPR limits and touch behaviour.

Extends#

  • Partial<ApplicationOptions>

Properties#

PropertyTypeDescriptionDefined in
fixedResolution?numberForce a resolution instead of following devicePixelRatio.app.ts:10
inheritFilterResolution?booleanPixi filters render at resolution 1 by default, which blurs everything behind a filter on retina screens. When true (default) new filters inherit the renderer resolution.app.ts:17
maxResolution?numberUpper bound for the resolution (DPR). Default 3.app.ts:8
onResize?(width: number, height: number, resolution: number) => voidCalled after every size / resolution change with the size in CSS pixels.app.ts:12
parentHTMLElementElement the canvas fills (it must have a size).app.ts:6
touchAction?stringCSS touch-action for the canvas. Pixi sets none, which blocks page scrolling on touch screens. The default pan-y pinch-zoom lets pages scroll while taps and hovers still reach Pixi. Use none for canvases that handle drags themselves.app.ts:23