Skip to content

feat: implement textQuality prop (currently declared but unused) #12

@jayf0x

Description

@jayf0x

Goal

TextSourceOpts.textQuality is declared in the interface ("Oversample factor for the text canvas before upload. Default: 2") but is never used. High-density text at small font sizes becomes blurry.

Proposed change

Use textQuality in both createTextTextures and createTextTexturesGPU:

  1. Draw text onto a width * textQuality × height * textQuality canvas.
  2. Downsample to width × height before upload.

This anti-aliases the obstacle/coverage texture.

Acceptance criteria

  • textQuality read in createTextTextures
  • textQuality read in createTextTexturesGPU
  • Oversized canvas is downsampled before texture upload
  • Default value (2) produces no regression vs. current behaviour
  • Tests updated

Files likely touched: src/core/textures.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:coreConfig, props, API surfaceeffort:2Small — a few hourstype:featureNew capability or prop

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions