Meteoroid

v1.0.0
Free3D Models3DWebGLpowered by @vectorvesper/motion

A cratered, hollow stone lit by one hard sun, with a second light inside shining out through holes in the craters. It turns slowly on its own, and a drag turns it, a flick throws it. Each seed makes a different rock. Shows a poster under reduced motion.

Meteoroid

Installation

Step 1. Initialize ProjectOne-time setup

Run once in your project root to configure paths and dependencies:

npx vectorvesper init
Step 2. Add ComponentInstalls source & assets

Downloads and registers the component in your project:

npx vectorvesper add meteoroid
Step 3. Required DependenciesAuto-installed with CLI

If installing manually or managing your package lock:

npm install @vectorvesper/motion three
Packages:@vectorvesper/motionthree

Usage

A dark hero or a section opener that wants one object to look at and play with. It fills the area, so lay your headline over it as children.

Usage

import { Meteoroid } from "@/components/vv/meteoroid";

export function Hero() {
  return (
    <Meteoroid poster="/meteoroid-poster.jpg">
      <h1>Made from what fell</h1>
    </Meteoroid>
  );
}

Do

  • Give it a poster: a still of the rock shown under reduced motion and on devices that cannot run the scene.
  • Try a few seeds to find the stone that suits the page; each one is a different shape.

Don't

  • Do not put buttons right over the rock if drag is on; the drag takes the pointer there. Set draggable to false, or keep them to the edges.

WebGL — render it on the client only

On Next.js, load it with ssr: false from a Client Component, as below. Vite apps need nothing extra.

"use client";

import dynamic from "next/dynamic";

const Meteoroid = dynamic(
  () => import("@/components/vv/meteoroid").then((m) => m.Meteoroid),
  { ssr: false }
);
This component respects prefers-reduced-motion and provides a graceful fallback.

Props

A hollow, cratered stone that turns slowly in the dark, lit from inside through the cracks in its shell. Drag it to turn it, flick it and it keeps spinning, then settles back to its own pace.

<Meteoroid />

The rock, with your content laid over it. Fills the area, which is 100svh tall unless you size it.

PropTypeDefaultDescription
spinnumber1How fast the rock turns. 0 holds it still until someone drags it.
draggablebooleantrueWhether a drag turns the rock, and a flick throws it.
seednumber7Which rock to make. Each seed is a different stone.
posterstring—Image shown where the scene cannot run: reduced motion, or a device below the floor.
classNamestring—Sizes the area. Without a height it is 100svh tall.
styleReact.CSSProperties—Inline styles for the area. A height here wins over the default.
childrenReact.ReactNode—Content drawn over the rock.
Under reduced motion it shows the poster and nothing moves.
Runs on the Vector Vesper runtime: it stops drawing when it is off screen, draws at a lower resolution on a slow device, and comes back by itself if the browser drops its graphics context.
Client component. It renders its dark area and your children on the server and starts drawing once it mounts, so it is safe in a server-rendered route.

Source

/**
 * Meteoroid — Vector Vesper
 * https://vectorvesper.dev/components
 *
 * Copyright (c) 2026 Vector Vesper
 * Released under the MIT License. This notice must be retained in copies and
 * substantial portions of the file. https://vectorvesper.dev/license
 */
export { Meteoroid } from "./Meteoroid";
export type { MeteoroidProps } from "./Meteoroid";
View on GitHubReport an issue