Skip to Content

Planet Transit Scene

Exoplanet transit animation: a client-side scene of a dark planet crossing a warm glowing star on a repeating loop. Exports the transit clock hook so a light curve stays in sync; reduced motion holds mid-transit.

Installation

pnpm dlx shadcn@latest add @01orbital/planet-transit-scene

Usage

import { PlanetTransitScene } from "@/components/scene/planet-transit-scene"

export default function PlanetTransitSceneDemo() {
  return (
    <div className="grid w-full place-items-center p-6">
      <div className="relative aspect-video w-full max-w-3xl overflow-hidden rounded-xl">
        <PlanetTransitScene />
      </div>
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/planet-transit-scene-demo

Examples

Indigoplanet-transit-scene-indigo

Planet Transit Scene Indigo: an example of planet-transit-scene.

pnpm dlx shadcn@latest add @01orbital/planet-transit-scene-indigo

API reference

A dark planet crossing a warm glowing star on a repeating loop. useTransitClock keeps a light curve in step with it; reduced motion holds it mid-transit.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Last updated on