[graphics] Configuration
The [graphics] section of your easel.toml configuration file can be used
to specify configuration related to graphics.
Resolution
[graphics]
resolution = "max"
minResolution = "low"
minAutoResolution = "high"
Easel can function at three resolutions: low, high, and max.
See Resolution to learn more about what these mean.
-
resolution: defines the initial resolution of your game. -
minResolution: defines the lowest resolution that your game can be set to, either automatically or manually. Defaults tolow. -
minAutoResolution: defines the lowest resolution that the adaptive resolution system can choose when automatically adjusting the resolution for performance. Defaults to eitherhighor the same value asminResolution, whichever is higher.
Sharp
[graphics]
sharp = true
The sharp parameter determines whether to preserve the pixelation of image sprites when scaling them up or down.
- A value of
truewill use nearest neighbor interpolation, which preserves the pixelation of the image. This can be used to make pixel art games. falsewill use linear interpolation, which smooths out the image when scaling. This can be overridden on a per-sprite basis. This configuration option simply sets the default value for all sprites.
This only affects sprites.
There is also a similar parameter for the UI, see [ui] configuration.
Camera
[graphics]
cameraRadius = 50.0
aspectRatio = "auto"
The camera determines how the game-world coordinates are mapped to the pixels on the screen.
-
cameraRadius: defines the default radius of the camera. A single number defines both the vertical and horizontal radius at the same time. Specify an array of two numbers to define the vertical and horizontal radius separately, e.g.[100, 50]. -
aspectRatio: parameter defines the aspect ratio of the camera. The string value"auto"means that the aspect ratio will automatically match the aspect ratio of the game window. You can also specify a fixed aspect ratio using an Array in the format[16, 9]where the first number is the width and the second number is the height.
These values may be overridden at runtime using the Camera function.
Bloom
[graphics]
bloomAlpha = 0.3
bloomAlpha: defines the default opacity of the bloom effect. This value can be overridden on a sprite-by-sprite basis using thebloomAlphaparameter, for example see PolygonSprite.
Shadow
[graphics]
shadow = [0, 0.5]
shadow: defines the offset of the shadow in game-world coordinates. Specify as an array of two numbers, where the first number is the horizontal offset and the second number is the vertical offset, e.g.[0, 0.5].