Skip to content

Changelog: say what scaleRounding is, in two sentences - #1753

Merged
obiot merged 1 commit into
masterfrom
docs/changelog-scale-rounding
Oct 18, 2026
Merged

obiot merged 1 commit into
masterfrom
docs/changelog-scale-rounding

Conversation

@obiot

@obiot obiot commented Oct 18, 2026

Copy link
Copy Markdown
Member

The scaleRounding entry ran to four sentences and 756 characters, twice the
length of anything near it in the 20.9 section, and still never said the thing
a reader needs first: that this is a new optional application setting
whose default changes nothing.

Before:

scaleRounding: "integer" constrains the automatic scale factor to a
whole number of device pixels per source pixel, letterboxing whatever is left
over, where the default "fractional" fills the container exactly. A 480
wide design in a 1280 wide container is scaled by 2.667, so some source
pixels cover three device pixels and some cover two, which pixel art shows as
uneven stems and shimmering edges and which browsers resolve differently, so
the same scene looks crisp in one and soft in another. The rounding is
applied in DEVICE pixels, since devicePixelRatio would otherwise put the
fraction back. It affects scaleMethod: "fit" only, because every other
method resizes the renderer to its container and so has no fixed factor to
round

After:

scaleRounding application setting: optional, and "fractional" by
default, so nothing existing changes. "integer" constrains the automatic
scale factor to a whole number of device pixels per source pixel and
letterboxes the remainder, which is what stops pixel art showing uneven stems
and shimmering edges; it applies to scaleMethod: "fit" only

358 characters, two sentences, in line with its neighbours, and led by
**scaleRounding application setting** the way textureFilter was introduced
in 19.8.

Three things dropped as not actionable: the 480-in-1280 worked example, the
browser-to-browser comparison, and the note that rounding happens in device
pixels. The first two are in the display and scaling skill, next to the table
of what integer scaling actually costs; the last is a correctness property a
reader cannot act on, and is pinned by a test rather than prose.

Worth landing before the tag: the section carries a date, but melonjs is
still unpublished on npm, so this is not retrofitting a released section.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NGvtaUNATVCVxD2qcbiY4t

The entry ran to four sentences and 756 characters, twice the length of
anything near it, and still never said the thing a reader needs first: that
this is a new optional application setting whose default changes nothing.

Leads with that, keeps the one clause that says why anyone would reach for it,
and drops the worked example, the browser-to-browser comparison and the
device-pixel detail. The first two now live in the display and scaling skill,
alongside the table of what integer scaling actually costs, and the last is a
correctness property a reader cannot act on, pinned by a test instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGvtaUNATVCVxD2qcbiY4t
Copilot AI balanced review requested due to automatic review settings October 18, 2026 10:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@obiot
obiot merged commit 5065f3b into master Oct 18, 2026
6 checks passed
@obiot
obiot deleted the docs/changelog-scale-rounding branch October 18, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants