crystal.window.set_aspect_ratio_limits

Sets the narrowest and widest aspect ratios the game supports. These limits are used to determine the viewport width.

The default limits are 4:3 and 21:9.

Usage

crystal.window.set_aspect_ratio_limits(min_aspect_ratio, max_aspect_ratio)

Arguments

Name Type Description
min_aspect_ratio number Minimum supported aspect ratio.
max_aspect_ratio number Maximum supported aspect ratio.

Examples

crystal.window.set_aspect_ratio_limits(4/3, 21/9);

This site uses Just the Docs, a documentation theme for Jekyll.