---
url: https://cri-middleware.github.io/SSPlayerForWeb/api/@spritestudio/ssplayer-webgl/interfaces/MaskTreeVisitor.md
---
# Interface: MaskTreeVisitor\<T>

Defined in: ssplayer-core/dist/index.d.ts:5510

Receives the writers [MaskTreePlanner.plan](../classes/MaskTreePlanner.md#plan) finds, while the frame of
the context that owns them is still current. The renderer rasterises them
here (or copies out what it needs to later); the planner only decides which
writers there are and where each one holds.

## Type Parameters

### T

`T`

## Methods

### beginContext()

> **beginContext**(`player`, `frameData`, `matrix`): `void`

Defined in: ssplayer-core/dist/index.d.ts:5516

A context with at least one writer is about to report them. `matrix`
places it (the root's own at the root, the composed instance matrix
below), exactly as the renderer places that context when drawing it.

#### Parameters

##### player

`T`

##### frameData

[`FrameData`](../classes/FrameData.md)

##### matrix

`Float32Array`<`ArrayBufferLike`> | `null`

#### Returns

`void`

***

### writer()

> **writer**(`player`, `frameData`, `planner`, `w`, `index`): `void`

Defined in: ssplayer-core/dist/index.d.ts:5521

One writer: `planner`'s writer `w`, valid for this call only. `index` is
its tree-wide index, which is also its coverage bit.

#### Parameters

##### player

`T`

##### frameData

[`FrameData`](../classes/FrameData.md)

##### planner

[`MaskPlanner`](../classes/MaskPlanner.md)

##### w

`number`

##### index

`number`

#### Returns

`void`
