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
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
| turbidity | number | Haziness | 3.4 | No |
| rayleigh | number | Rayleigh scattering | 3 | No |
| mieCoefficient | number | Mie scattering amount | 0.005 | No |
| mieDirectionalG | number | Mie scattering direction | 0.7 | No |
| elevation | number | Sun's elevation from the horizon, in degrees | 0.6 | No |
| azimuth | number | Sun's azimuth angle, in degrees – its horizontal coordinate on the horizon | 180 | No |
| distance | number | Sky box scale | 450000 | No |