/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
tests/visual/scenes/text-bitmap/bitmap-text-basic.scene.ts
36 строк
1 KB
Zyie
feat: Improves text rendering and layout handling (#11947)
09 мар 2026, 17:47
Не верифицирован
09 мар 2026, 17:47
c450e9a
Код
Авторство
О чём код?
import { BitmapText } from '~/scene'; import type { TestScene } from '../../types'; import type { Container } from '~/scene'; export const scene: TestScene = { it: 'should render text correctly if style changes', excludeRenderers: ['canvas'], create: async (scene: Container) => { const text = new BitmapText({ text: 'I should be red & white and wrapping with shadow 🔥', style: { fontSize: 18, fill: 'white', stroke: { color: 'white', width: 2 }, lineHeight: 15, letterSpacing: 6, align: 'center', dropShadow: { alpha: 1, angle: Math.PI / 6, blur: 5, color: 'blue', distance: 5, }, }, }); scene.addChild(text); text.style.wordWrap = true; text.style.fill = 'red'; text.style.wordWrapWidth = 120; }, };