BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Pixel Planet Registry/pixel-planet

pixel-planet

pixel-planet-registry/pixel-planet
FreeComponent

A collection of 3D pixel planets built with React Three Fiber.

Live preview

live · rendered by the registry
Rendered by Pixel Planet Registry on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://pixel-planet.fartlabs.org/r/pixel-planet.json

Source

src/registry/new-york/items/pixel-planet/components/pixel-planet.tsxpixel-planet.fartlabs.org/r/pixel-planet.json · first 6 KB
1"use client"
2
3import { Canvas, useFrame } from "@react-three/fiber"
4import { Stars } from "@react-three/drei"
5import { useEffect, useMemo, useRef, useState } from "react"
6import { generatePlanetByType, type PlanetOptions } from "../lib/utils"
7import { Timer } from "three"
8
9export interface PixelPlanetProps {
10 type:
11 | "ice"
12 | "gas_giant_1"
13 | "gas_giant_2"
14 | "asteroid"
15 | "star"
16 | "lava"
17 | "dry"
18 | "earth"
19 | "no_atmosphere"
20 seed: number
21
22 cameraZ?: number
23 /**
24 * advanced customization options for the planet.
25 */
26 advanced?: PlanetOptions
27 className?: string
28 stars?: boolean
29 orbitControls?: boolean
30 orbitControlsSensitivity?: number
31}
32
33const mapTypeToLabel: Record<PixelPlanetProps["type"], string> = {
34 ice: "Ice Planet",
35 gas_giant_1: "Gas giant 1",
36 gas_giant_2: "Gas giant 2",
37 asteroid: "Asteroid",
38 star: "Star",
39 lava: "Lava Planet",
40 dry: "Dry Planet",
41 earth: "Earth Planet",
42 no_atmosphere: "No atmosphere",
43}
44
45function CameraUpdater({ cameraZ }: { cameraZ: number }) {
46 useFrame(({ camera }) => {
47 if (camera.position.z !== cameraZ) {
48 camera.position.set(0, 0, cameraZ)
49 camera.lookAt(0, 0, 0)
50 }
51 })
52 return null
53}
54
55function PlanetContent({
56 type,
57 seed,
58 advanced: options,
59 rotationOffset = 0,
60}: PixelPlanetProps & { rotationOffset?: number }) {
61 const planetLabel = mapTypeToLabel[type]
62
63 // Generate planet group when type changes
64 const planet = useMemo(() => {
65 return generatePlanetByType(planetLabel, options)
66 }, [planetLabel, options])
67
68 // Update seed when it changes
69 useEffect(() => {
70 if (!planet) return
71 // eslint-disable-next-line @typescript-eslint/no-explicit-any
72 planet.children.forEach((layer: any) => {
73 if (layer.material && layer.material.uniforms) {
74 if (layer.material.uniforms["seed"]) {
75 layer.material.uniforms["seed"].value = seed
76 }
77 }
78 })
79 }, [planet, seed])
80
81 const timer = useMemo(() => new Timer(), [])
82
83 // Animation loop - update time and manual offset for texture scrolling
84 useFrame(() => {
85 if (!planet) return
86
87 timer.update()
88
89 // eslint-disable-next-line @typescript-eslint/no-explicit-any
90 planet.children.forEach((layer: any) => {
91 if (layer.material && layer.material.uniforms) {
92 if (layer.material.uniforms["time"]) {
93 layer.material.uniforms["time"].value =
94 timer.getElapsed() + rotationOffset
95 }
96 }
97 })
98 })
99
100// … truncated

What it pulls in

npm packages

  • three
  • @react-three/fiber
  • @react-three/drei

Files it writes

  • src/registry/new-york/items/pixel-planet/components/pixel-planet.tsx
  • src/registry/new-york/items/pixel-planet/lib/utils.ts
  • src/registry/new-york/items/pixel-planet/lib/seed-utils.ts
  • src/registry/new-york/items/pixel-planet/lib/Three.ts
  • src/registry/new-york/items/pixel-planet/lib/camera.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/asteroid.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/dryPlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/earthPlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/gasGiant.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/gasGiantRing.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/icePlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/lavaPlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/noAtmospherePlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Planets/starPlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/atmosphereLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/background.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/baseGasPlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/basePlanet.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/cloudLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/craterLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/denseGasLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/gasLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/highlightBorder.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/lakeLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/landMass.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/ringLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/riversLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/star.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/starBlobLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/starFlareLayer.ts
  • src/registry/new-york/items/pixel-planet/lib/Layers/stars.ts

Facts

Registry
Pixel Planet Registry
Type
registry:component
Access
Free
Files written
31
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

Docs on Pixel Planet Registry pixel-planet.fartlabs.org FartLabs/pixel-planet on GitHub Raw registry item This item as JSON

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex