Skip to content

Non-global backBuffer #7

@benjaminleonard

Description

@benjaminleonard

I think having backBuffer defined as it is globally makes it shared between multiple programs running off the same textRenderer instance. The result being that the isSameCell check is almost always false.

const newCell = buffer[idx]
const oldCell = backBuffer[idx]
if (!isSameCell(newCell, oldCell)) {
  rowNeedsUpdate = true
  backBuffer[idx] = { ...newCell }
}

I've worked around this locally by adding a createRenderer function that contains the renderer – thereby creating a new backBuffer for each instance.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions