@polygonschmied/stellar-three
v0.1.4
Published
Stellar DS 3D wrapper — @react-three/fiber + drei in a Theater container, with the only sanctioned glass overlay.
Downloads
683
Maintainers
Readme
@polygonschmied/stellar-three
A thin Stellar veneer over @react-three/fiber and drei for Stellar DS.
TheaterCanvas— the dark inset shell plus Canvas defaultsGlassPanel— the only sanctioned glass overlay (Theater-only)
Install
pnpm add @polygonschmied/stellar-three @polygonschmied/stellar-tokensPeer dependencies: react >= 18, react-dom >= 18. three,
@react-three/fiber, and @react-three/drei ship as direct dependencies —
no extra install needed.
Use
import "@polygonschmied/stellar-tokens/styles.css";
import { TheaterCanvas, GlassPanel, OrbitControls } from "@polygonschmied/stellar-three";
export function Hero() {
return (
<TheaterCanvas>
<ambientLight intensity={0.6} />
<mesh>
<boxGeometry />
<meshStandardMaterial color="orange" />
</mesh>
<OrbitControls />
<GlassPanel position="bottom-left">Stats overlay</GlassPanel>
</TheaterCanvas>
);
}The package also re-exports useFrame, useThree, useLoader,
OrbitControls, Environment, Grid, Stats, Html, plus common
three type aliases (Mesh, Group, Object3D, Camera, Vector3,
Color, …) so you don't need a second R3F or Three.js dependency.
Heavier drei helpers (post-processing, examples) are intentionally left to direct imports.
License
MIT — see the repo README for the wider picture.
