Points to a location within a list of MeshBatches.

Starling uses these tokens in its render cache. Each call to `painter.pushState()` or `painter.popState()` provides a token referencing the current location within the cache. In the next frame, if the relevant part of the display tree has not changed, these tokens can be used to render directly from the cache instead of constructing new MeshBatches.

@see Painter

### Hierarchy

- BatchToken

## Index

### Constructors

- constructor

### Properties

- batchID
- indexID
- vertexID

### Methods

- copyFrom
- equals
- reset
- setTo
- toString

## Constructors

### constructor

- new BatchToken(batchID?: number, vertexID?: number, indexID?: number): BatchToken

- - Defined in lib/starling/rendering/BatchToken.d.ts:24

  Creates a new BatchToken.

  #### Parameters

  - ##### Optional batchID: number

  - ##### Optional vertexID: number

  - ##### Optional indexID: number

  #### Returns BatchToken

## Properties

### batchID

batchID: number

- Defined in lib/starling/rendering/BatchToken.d.ts:18

The ID of the current MeshBatch.

### indexID

indexID: number

- Defined in lib/starling/rendering/BatchToken.d.ts:24

The ID of the next index within the current MeshBatch.

### vertexID

vertexID: number

- Defined in lib/starling/rendering/BatchToken.d.ts:21

The ID of the next vertex within the current MeshBatch.

## Methods

### copyFrom

- copyFrom(token: BatchToken): void

- - Defined in lib/starling/rendering/BatchToken.d.ts:30

  Copies the properties from the given token to this instance.

  #### Parameters

  - ##### token: BatchToken

  #### Returns void

### equals

- equals(other: BatchToken): boolean

- - Defined in lib/starling/rendering/BatchToken.d.ts:39

  Indicates if this token contains the same values as the given one.

  #### Parameters

  - ##### other: BatchToken

  #### Returns boolean

### reset

- reset(): void

- - Defined in lib/starling/rendering/BatchToken.d.ts:36

  Resets all properties to zero.

  #### Returns void

### setTo

- setTo(batchID?: number, vertexID?: number, indexID?: number): void

- - Defined in lib/starling/rendering/BatchToken.d.ts:33

  Changes all properties at once.

  #### Parameters

  - ##### Optional batchID: number

  - ##### Optional vertexID: number

  - ##### Optional indexID: number

  #### Returns void

### toString

- toString(): string

- - Defined in lib/starling/rendering/BatchToken.d.ts:42

  Creates a String representation of this instance.

  #### Returns string

Generated using TypeDoc