Skip to Content
🎉 @playcanvas/react 0.3.0! Now with React 19 support. Read more →

The EnvAtlas is used to add realtistic lighting to a scene.

Image Based Lighting (IBL) is a technique to simulate environmental lighting often using an capture of a real world environment. It can add much more natural nuanced lighting to a scene than simply by using Lights alone.

The EnvAtlas component requires a Textures Atlas Asset. There are many sources available that provide high quality textures assets such as HDRI Haven, Poly Haven, and OpenFootage. You may need to convert the format to a Textures Atlas asset using this online texture tool.

Usage

This example will load an environment atlas asset and apply it to the scene. An <EnvAtlas> component can be added to any entity in the scene, but it will have affect all entities in the scene.

import { EnvAtlas } from '@playcanvas/react/components' // Load the environment atlas asset export const EnvAtlasExample = () => { const { data : envAtlas } = useEnvAtlas('/env_atlas_1k.png') return <Entity> <EnvAtlas asset={envAtlas} /> <Entity> <Render type="box" /> </Entity> </Entity> }

Props

The following props are based on the EnvAtlas Component from PlayCanvas version 2.3.3. This documentation is automatically generated from the TypeScript types of the installed PlayCanvas package.

NameTypeDefault
assetAsset

The asset to use for the environment atlas.

skyboxIntensitynumber

The intensity of the skybox.

1
skyboxLuminancenumber

The luminance of the skybox.

1
showSkyboxboolean

Whether to show the skybox.

true
Last updated on