Aspect Ratio
App: apps/aspect_ratio_demo/
Demonstrates a fixed design resolution (1280×720) with letterbox scale mode. The game logic and GUI think in 1280×720; the engine scales to the window and adds black bars when the aspect ratio doesn’t match.
Run from root
Section titled “Run from root”% ./plume3d aspect_ratio_demoor
Run from app directory
Section titled “Run from app directory”% ./../plume3d .What it does
Section titled “What it does”- Sets in
game.toml:design_width = 1280,design_height = 720,scale_mode = "letterbox". - A small GUI window shows the design size, current window size, and tells you to resize to see the letterbox bars.
- Window —
getWidth(),getHeight()(window size); design size and scale mode come from config. - Gui —
beginWindow,layoutRowDynamic,label,endWindow.
Config snippet
Section titled “Config snippet”[Window]width = 800height = 600resizable = truedesign_width = 1280design_height = 720scale_mode = "letterbox"