Skip to main content

<pc-sky>

The <pc-sky> tag is used to define a sky component.

Usage

Attributes

AttributeTypeDefaultDescription
assetString-Texture asset ID (must reference a texture type asset)
centerVector3"0 0.01 0"Sky center as "X Y Z" values (0-1 range)
intensityNumber"1"Sky brightness intensity
levelNumber"0"Mipmap level to use for rendering
rotationVector3"0 0 0"Sky rotation as "X Y Z" Euler angles
scaleVector3"100 100 100"Sky scale as "X Y Z" values
typeEnum"infinite"Sky type: "box" | "dome" | "infinite" | "none"

Example

<pc-asset id="skybox" src="assets/skybox.webp"></pc-asset>
<pc-scene>
<pc-sky asset="skybox"></pc-sky>
</pc-scene>

JavaScript Interface

You can programmatically create and manipulate <pc-sky> elements using the SkyElement API.