/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
tests/visual/scenes/text/text-basic.scene.ts
35 строк
995 B
Zyie
feat: improve stability of SplitText (#11858)
03 фев 2026, 16:21
Не верифицирован
03 фев 2026, 16:21
28fcac2
Код
Авторство
О чём код?
import { Text } from '~/scene'; import type { TestScene } from '../../types'; import type { Container } from '~/scene'; export const scene: TestScene = { it: 'should render text correctly if style changes', create: async (scene: Container) => { const text = new Text({ 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; }, };