#bevy #graphics #gamedev #skybox

bevy_skybox

A skybox from an image for bevyengine.org

5 releases (breaking)

0.5.0 Jul 21, 2021
0.4.0 Apr 12, 2021
0.3.0 Jan 14, 2021
0.2.0 Jan 8, 2021
0.1.0 Jan 5, 2021

#1438 in Game dev

23 downloads per month

MIT/Apache

29KB
314 lines

Bevy Skybox

Provides a skybox from a given image that can be attached to a bevy camera.

Assumes that the image is of the same format as the examples given in the assets folder: a net of six squares in the same shape as these examples, exactly aligned with the image rectangle and filling most of its width and height.

Usage

The usage is documented in the module comment at the top of src/lib.rs.

To demonstrate this, examples\board_flyover.rs puts a skybox around a flat "board". Key/mouse camera movement is provided by bevy_fly_camera.

Board Flyover example

Skybox images come from the following sources.

Image processing

Many skybox are available as net images. bevy_skybox assumes that the image is a specific net of a cube.

The assumptions about the image are listed in src/image.rs, but the image is measured like this.

Measuring the cube net

Build

Build using stable or nightly toolchain, e.g.

cargo run --release --example board_flyover

Dependencies

~27–36MB
~414K SLoC