Skip to content

Sky

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

Usage

vue
<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, 0, 2000]" />
    <Sky />
    <OrbitControls
      :enable-pan="false"
      :enable-zoom="false"
    />
  </TresCanvas>
</template>

Props

NameTypeDescriptionDefaultRequired
turbiditynumberHaziness
3.4No
rayleighnumberRayleigh scattering
3No
mieCoefficientnumberMie scattering amount
0.005No
mieDirectionalGnumberMie scattering direction
0.7No
elevationnumberSun's elevation from the horizon, in degrees
0.6No
azimuthnumberSun's azimuth angle, in degrees – its horizontal coordinate on the horizon
180No
distancenumberSky box scale
450000No