Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/dev/addons/src/msdfText/textRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,16 @@ export class TextRenderer implements IDisposable {
this._baseLine -= paragraph.lineHeight * fontScale * paragraph.lines.length;
}

/**
* Clear all paragraphs from the renderer to allow adding new ones from scratch
*/
public clearParagraphs(): void {
this._charMatrices.length = 0;
this._charUvs.length = 0;
this._baseLine = 0;
this._isDirty = true;
}

/**
* Render the text using the provided view and projection matrices
* @param viewMatrix define the view matrix to use
Expand Down