/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
tests/visual/scenes/text-split/text-stroke-split.scene.ts
38 строк
1 KB
Zyie
chore: reorganizes visual scene tests into logical subdirectories (#11872)
04 фев 2026, 16:38
Не верифицирован
04 фев 2026, 16:38
13d3c27
Код
Авторство
О чём код?
import { Graphics, SplitText, Text, TextStyle } from '~/scene'; import type { TestScene } from '../../types'; import type { Container } from '~/scene'; export const scene: TestScene = { it: 'should render text stroke with split text if it has a width of zero', create: async (scene: Container) => { const style = new TextStyle({ fontFamily: 'Arial', fontWeight: 'bold', fontStyle: 'normal', fontSize: 36, fill: 0xFFFFFF, stroke: { color: 0x000000, width: 0, }, align: 'center', wordWrap: true, wordWrapWidth: 200, breakWords: true, }); const text = new Text({ text: 'PixiJS is very cool indeed', style }); const splitResult = SplitText.from(text); const whiteBox = new Graphics().rect(0, 0, 128, 128).fill(0xFFFFFF); scene.addChild(whiteBox); scene.addChild(splitResult); }, };