5.4.0

Sky

Wrapper for the Three.js Sky add-on with sun position controls.

<Sky /> is a wrapper for the Three.js Sky add-on.

Usage

<script setup lang="ts">
import { OrbitControls, Sky } from '@tresjs/cientos'
import { TresCanvas } from '@tresjs/core'
</script>

<template>
  <TresCanvas :tone-mapping-exposure="0.25">
    <TresPerspectiveCamera :position="[0, 15, 200]" />
    <Sky />
    <OrbitControls />
    <TresGridHelper :args="[1000, 20]" />
  </TresCanvas>
</template>

Props

NameTypeDescriptionDefaultRequired
turbiditynumberHaziness3.4No
rayleighnumberRayleigh scattering3No
mieCoefficientnumberMie scattering amount0.005No
mieDirectionalGnumberMie scattering direction0.7No
elevationnumberSun's elevation from the horizon, in degrees0.6No
azimuthnumberSun's azimuth angle, in degrees – its horizontal coordinate on the horizon180No
distancenumberSky box scale450000No