Skip to content
pixi-silk
GitHub repository
Function

gridLevels

import { gridLevels } from 'pixi-silk/ui/grid';
function gridLevels(zoom: number, options?: GridLevelOptions): GridLevel[];

The grid levels to draw at zoom, finest first. Each level is ratio times the one below. A level fades in as its spacing grows from fade[0] to fade[1] pixels. Levels nest, so a line of a coarse level is also drawn by the finer ones: each level’s alpha is what it adds on top. Levels that would add almost nothing are left out. Returns an empty array for a zoom or unit of 0 or less.

Parameters#

ParameterType
zoomnumber
optionsGridLevelOptions

Returns#

GridLevel[]