/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/scene/sprite/BatchableSprite.ts
55 строк
2 KB
Zyie
feat: update text GPU lifecycle and resolution updates (#11781)
08 дек 2025, 16:30
Не верифицирован
08 дек 2025, 16:30
3a071ad
Код
Авторство
О чём код?
import { type GPUData } from '../view/ViewContainer'; import type { Matrix } from '../../maths/matrix/Matrix'; import type { Batch, Batcher } from '../../rendering/batcher/shared/Batcher'; import type { DefaultBatchableQuadElement } from '../../rendering/batcher/shared/DefaultBatcher'; import type { Topology } from '../../rendering/renderers/shared/geometry/const'; import type { Texture } from '../../rendering/renderers/shared/texture/Texture'; import type { BoundsData } from '../container/bounds/Bounds'; import type { Container } from '../container/Container'; /** * A batchable sprite object. * @internal */ export class BatchableSprite implements DefaultBatchableQuadElement, GPUData { public batcherName = 'default'; public topology: Topology = 'triangle-list'; // batch specific.. public readonly attributeSize = 4; public readonly indexSize = 6; public readonly packAsQuad = true; public transform: Matrix; public renderable: Container; public texture: Texture; public bounds: BoundsData; public roundPixels: 0 | 1 = 0; public _indexStart: number; public _textureId: number; public _attributeStart = 0; // location in the buffer public _batcher: Batcher = null; public _batch: Batch = null; get blendMode() { return this.renderable.groupBlendMode; } get color() { return this.renderable.groupColorAlpha; } public reset() { this.renderable = null; this.texture = null; this._batcher = null; this._batch = null; this.bounds = null; } public destroy() { this.reset(); } }