Skip to content

Document the units for size related parameters in the public contract - #1586

Merged
bghgary merged 3 commits into
BabylonJS:masterfrom
bghgary:add-dip-doc
Jan 9, 2026
Merged

bghgary merged 3 commits into
BabylonJS:masterfrom
bghgary:add-dip-doc

Conversation

@bghgary

@bghgary bghgary commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@bghgary
bghgary requested review from Copilot and ryantrem January 9, 2026 22:09
@bghgary
bghgary marked this pull request as draft January 9, 2026 22:09

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.

Pull request overview

This PR adds documentation to clarify that size-related parameters use device-independent pixels (dp/dip) as their unit of measurement across multiple components of the graphics and input system.

  • Documents that mouse and touch coordinates in NativeInput use device-independent pixels relative to the back buffer
  • Adds inline comments to DeviceImpl.h to clarify Width/Height are in device-independent pixels
  • Enhances Device.h configuration struct documentation to explain Width/Height units and their relationship to rendering dimensions via hardware scaling

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Plugins/NativeInput/Include/Babylon/Plugins/NativeInput.h Adds comment documenting that mouse coordinate parameters use device-independent pixels
Core/Graphics/Source/DeviceImpl.h Adds inline comments to Resolution Width/Height fields indicating device-independent pixel units
Core/Graphics/Include/Shared/Babylon/Graphics/Device.h Enhances documentation for Width/Height configuration parameters with unit information and hardware scaling remarks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Plugins/NativeInput/Include/Babylon/Plugins/NativeInput.h Outdated
Comment thread Plugins/NativeInput/Include/Babylon/Plugins/NativeInput.h Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread Plugins/NativeInput/Include/Babylon/Plugins/NativeInput.h

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bghgary
bghgary marked this pull request as ready for review January 9, 2026 22:28
@bghgary
bghgary enabled auto-merge (squash) January 9, 2026 22:28
@bghgary
bghgary merged commit ee488a0 into BabylonJS:master Jan 9, 2026
31 checks passed
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.

3 participants