Installation
Install the component
Run the following command to install the component and its dependencies:
npx @motion-core/cli add haloImport the component
Import the component into your Svelte file:
Canvas
Atmospheric scattering (Rayleigh & Mie) based halo effect with dynamic camera rotation and sun light simulation.
npx @motion-core/cli add haloimport { Halo } from "$lib/motion-core";import { Halo } from "$lib/motion-core";<script lang="ts">
import { Halo } from "motion-core";
</script>
<Halo
class="h-full min-h-96 w-full"
backgroundColor="#191A1D"
intensity={2.2}
/>
| Prop | Type | Default |
|---|---|---|
rotationSpeed | number | 0.5 |
backgroundColor | "THREE.ColorRepresentation" | "#000000" |
cameraDistance | number | 3.0 |
fov | number | 55.0 |
sunX | number | 0.0 |
sunY | number | 0.0 |
sunZ | number | 1.0 |
intensity | number | 1.0 |
class | string | "" |