Skip to content

XCD-475 Add camera.ortho.fitMode#2071

Draft
paireks wants to merge 1 commit into
xeokit:masterfrom
paireks:XCD-475-add-camera-ortho-fit-modes
Draft

XCD-475 Add camera.ortho.fitMode#2071
paireks wants to merge 1 commit into
xeokit:masterfrom
paireks:XCD-475-add-camera-ortho-fit-modes

Conversation

@paireks

@paireks paireks commented Jun 25, 2026

Copy link
Copy Markdown
Member

Hello @xeolabs and @MichalDybizbanskiCreoox,

this is the proposal of the Ortho.js improvement.

The idea is to allow the user to choose different behaviours of the ortho camera.

Currently we have an automatic fitting of the ortho view into the canvas, depending on the aspect ratio we keep the horizontal or vertical size.

This change allow the user to always keep the horizontal dimension or to always keep the vertical dimension.

This is the example of the wall 3 m high and 6 m long:
image

The existing ("auto") behavior for camera.ortho.scale = 6.0:

2026-06-25.21-05-15.mp4

Optional "horizontal" behavior for camera.ortho.scale = 6.0:

2026-06-25.21-10-39.mp4

Optional "vertical" behavior for camera.ortho.scale = 6.0:

2026-06-25.21-11-11.mp4

This is proposal, if it will be accepted I will add types.

Please let me know what you think about it.

Wojciech

@paireks paireks force-pushed the XCD-475-add-camera-ortho-fit-modes branch from 8f3184b to 4b666b0 Compare June 26, 2026 12:12
@MichalDybizbanskiCreoox MichalDybizbanskiCreoox marked this pull request as draft June 26, 2026 14:03
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