LogoPixi’VN
pixi-jsClasses

Class: DefaultBatcher

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:56

The default batcher is used to batch quads and meshes. This batcher will batch the following elements:

  • tints
  • roundPixels
  • texture
  • transform

Advanced

Extends

Constructors

Constructor

> new DefaultBatcher(options): DefaultBatcher

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:67

Parameters

options

BatcherOptions

Returns

DefaultBatcher

Overrides

Batcher.constructor

Properties

attributeBuffer

> attributeBuffer: ViewableBuffer

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:212

The buffer containing attribute data for all elements in the batch.

Inherited from

Batcher.attributeBuffer


attributeSize

> attributeSize: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:216

The current size of the attribute data in the batch.

Inherited from

Batcher.attributeSize


batches

> batches: Batch[]

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:228

An array of all batches created during the current rendering process.

Inherited from

Batcher.batches


batchIndex

> batchIndex: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:226

The current index of the batch being processed.

Inherited from

Batcher.batchIndex


dirty

> dirty: boolean

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:224

Indicates whether the batch data has been modified and needs updating.

Inherited from

Batcher.dirty


elementSize

> elementSize: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:220

The total number of elements currently in the batch.

Inherited from

Batcher.elementSize


elementStart

> elementStart: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:222

The starting index of elements in the current batch.

Inherited from

Batcher.elementStart


geometry

> geometry: BatchGeometry

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:62

The geometry used by this batcher. Must be implemented by subclasses.

Overrides

Batcher.geometry


indexBuffer

> indexBuffer: IndexBufferArray

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:214

The buffer containing index data for all elements in the batch.

Inherited from

Batcher.indexBuffer


indexSize

> indexSize: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:218

The current size of the index data in the batch.

Inherited from

Batcher.indexSize


maxTextures

> readonly maxTextures: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:233

The maximum number of textures per batch.

Inherited from

Batcher.maxTextures


name

> name: "default"

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:64

The name of the batcher. Must be implemented by subclasses.

Overrides

Batcher.name


shader

> shader: DefaultShader

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:63

The shader used by this batcher. Must be implemented by subclasses. this can be shared by multiple batchers of the same type.

Overrides

Batcher.shader


uid

> readonly uid: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:210

unique id for this batcher

Inherited from

Batcher.uid


vertexSize

> vertexSize: number

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:66

The size of one attribute. 1 = 32 bit. x, y, u, v, color, textureIdAndRound -> total = 6

Overrides

Batcher.vertexSize


defaultOptions

> static defaultOptions: Partial<BatcherOptions>

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:208

Inherited from

Batcher.defaultOptions

Methods

_updateMaxTextures()

> _updateMaxTextures(maxTextures): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:91

Internal

Updates the maximum number of textures that can be used in the shader.

Parameters

maxTextures

number

The maximum number of textures that can be used in the shader.

Returns

void


add()

> add(batchableObject): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:267

Parameters

batchableObject

BatchableElement

Returns

void

Inherited from

Batcher.add


begin()

> begin(): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:266

Returns

void

Inherited from

Batcher.begin


break()

> break(instructionSet): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:275

breaks the batcher. This happens when a batch gets too big, or we need to switch to a different type of rendering (a filter for example)

Parameters

instructionSet

InstructionSet

Returns

void

Inherited from

Batcher.break


checkAndUpdateTexture()

> checkAndUpdateTexture(batchableObject, texture): boolean

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:268

Parameters

batchableObject

BatchableElement

texture

Texture

Returns

boolean

Inherited from

Batcher.checkAndUpdateTexture


destroy()

> destroy(): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:92

Destroys the batch and its resources.

Returns

void

Overrides

Batcher.destroy


ensureAttributeBuffer()

> ensureAttributeBuffer(size): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:282

Resizes the attribute buffer to the given size (1 = 1 float32)

Parameters

size

number

the size in vertices to ensure (not bytes!)

Returns

void

Inherited from

Batcher.ensureAttributeBuffer


ensureIndexBuffer()

> ensureIndexBuffer(size): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:287

Resizes the index buffer to the given size (1 = 1 float32)

Parameters

size

number

the size in vertices to ensure (not bytes!)

Returns

void

Inherited from

Batcher.ensureIndexBuffer


finish()

> finish(instructionSet): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:277

Parameters

instructionSet

InstructionSet

Returns

void

Inherited from

Batcher.finish


packAttributes()

> packAttributes(element, float32View, uint32View, index, textureId): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:76

Packs the attributes of a DefaultBatchableMeshElement into the provided views.

Parameters

element

DefaultBatchableMeshElement

The DefaultBatchableMeshElement to pack.

float32View

Float32Array

The Float32Array view to pack into.

uint32View

Uint32Array

The Uint32Array view to pack into.

index

number

The starting index in the views.

textureId

number

The texture ID to use.

Returns

void

Overrides

Batcher.packAttributes


packIndex()

> packIndex(element, indexBuffer, index, indicesOffset): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:291

Parameters

element

BatchableMeshElement

indexBuffer

IndexBufferArray

index

number

indicesOffset

number

Returns

void

Inherited from

Batcher.packIndex


packQuadAttributes()

> packQuadAttributes(element, float32View, uint32View, index, textureId): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/DefaultBatcher.d.ts:85

Packs the attributes of a DefaultBatchableQuadElement into the provided views.

Parameters

element

DefaultBatchableQuadElement

The DefaultBatchableQuadElement to pack.

float32View

Float32Array

The Float32Array view to pack into.

uint32View

Uint32Array

The Uint32Array view to pack into.

index

number

The starting index in the views.

textureId

number

The texture ID to use.

Returns

void

Overrides

Batcher.packQuadAttributes


packQuadIndex()

> packQuadIndex(indexBuffer, index, indicesOffset): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:290

Parameters

indexBuffer

IndexBufferArray

index

number

indicesOffset

number

Returns

void

Inherited from

Batcher.packQuadIndex


updateElement()

> updateElement(batchableObject): void

Defined in: node_modules/pixi.js/lib/rendering/batcher/shared/Batcher.d.ts:269

Parameters

batchableObject

BatchableElement

Returns

void

Inherited from

Batcher.updateElement