Skip to content

@blooper.gg/toodle


@blooper.gg/toodle / text/TextShader / TextShader

Class: TextShader

Defined in: text/TextShader.ts:18

Implements

Constructors

Constructor

new TextShader(device, pipeline, font, colorFormat, instanceCount): TextShader

Defined in: text/TextShader.ts:32

Parameters

device

GPUDevice

pipeline

FontPipeline

font

MsdfFont

colorFormat

GPUTextureFormat

instanceCount

number

Returns

TextShader

Accessors

font

Get Signature

get font(): MsdfFont

Defined in: text/TextShader.ts:216

Returns

MsdfFont


maxCharCount

Get Signature

get maxCharCount(): number

Defined in: text/TextShader.ts:220

Returns

number

Methods

endFrame()

endFrame(): void

Defined in: text/TextShader.ts:212

Returns

void

Implementation of

IShader.endFrame


processBatch()

processBatch(renderPass, nodes): number

Defined in: text/TextShader.ts:115

Process a batch of nodes.

Parameters

renderPass

GPURenderPassEncoder

The render pass to use.

nodes

SceneNode[]

The nodes to process.

Returns

number

The number of draw calls made.

Implementation of

IShader.processBatch


startFrame()

startFrame(device, uniform): void

Defined in: text/TextShader.ts:105

Parameters

device

GPUDevice

uniform

EngineUniform

Returns

void

Implementation of

IShader.startFrame