Skip to content

Sky

Draw

To draw sky in the scene, an image with equirectangular projection (aspect ratio 2:1) is used. These are images that typically 360-degree cameras generate.

Use yg.gl.drawSky() or yg.gl.drawSky2() to draw sky. Sky should usually be the first thing to draw in a scene to prevent occlusion.

Sky Images

Here are some examples of images, that can be used as sky in yourgame.

Gradient with Horizon

Gradient with Horizon Sky

360-degree Photo

360-degree Sky Photo

Assembled from Sprites

Assembled Sky Image

The image above has been created with this tool: