/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
tests/visual/scenes/text-html/html-text-basic.scene.ts
37 строк
1 KB
Zyie
fix: stabilize HTMLText visual tests against CI flakiness (#12039)
06 май 2026, 14:50
Не верифицирован
06 май 2026, 14:50
0555280
Код
Авторство
О чём код?
import { HTMLText } from '~/scene'; import type { TestScene } from '../../types'; import type { Container } from '~/scene'; export const scene: TestScene = { it: 'should render html-text correctly if style changes', create: async (scene: Container, renderer) => { const text = new HTMLText({ 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; renderer.render(scene); }, };