Skip to main content

<pc-sky>

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

note

Attributes

AttributeDescription
assetA string that should match the id of a <pc-asset> tag that has a type of texture.
centerThe center of the sky. Specified as a space-separated list of X, Y, and Z values in the range 0 to 1. If not specified, 0 0.01 0 is used.
intensityThe intensity of the sky. If not specified, 1 is used.
levelThe mipmap level used to render the sky. If not specified, 0 is used (base mip level).
rotationThe rotation of the sky. Specified as a space-separated list of X, Y, and Z values. If not specified, 0 0 0 is used.
scaleThe scale of the sky. Specified as a space-separated list of X, Y, and Z values. If not specified, 100 100 100 is used.
typeThe type of sky component. Can be box, dome, infinite or none. If not specified, infinite is used.

Example

<pc-asset id="skybox" src="assets/skybox.webp" preload></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.