Skip to content
pixi-silk
GitHub repository
Entry point

pixi-silk/i18n/canvas

The canvas path for text slots of baked messages (player names): Canvas2D shaping turned into a distance-field run sprite that keeps the slot style. Loaded lazily by Silk.

import { CanvasTextProvider, createCanvasText, slotDirection } from 'pixi-silk/i18n/canvas';

Classes#

ClassDescription
CanvasTextProviderThe text slot provider createCanvasText returns.

Interfaces#

InterfaceDescription
CanvasFontA font to download for text slots, instead of the system font.
CanvasTextOptionsOptions of createCanvasText.

Variables#

VariableDescription
SYSTEM_FONTSThe fonts system stands for.

Functions#

FunctionDescription
createCanvasTextpixi-silk/i18n/canvas: draws text slots (player names, user input) of baked messages. The browser shapes the value with Canvas2D, and a distance transform turns it into a run sprite the message shader draws with the slot’s style. Loaded lazily by Silk.create({ dynamicText: { mode: 'canvas' } }).
slotDirectionpixi-silk/i18n/canvas: draws text slots (player names, user input) of baked messages. The browser shapes the value with Canvas2D, and a distance transform turns it into a run sprite the message shader draws with the slot’s style. Loaded lazily by Silk.create({ dynamicText: { mode: 'canvas' } }).