MCPcopy Index your code
hub / github.com/XenoverseUp/procedural-planets

github.com/XenoverseUp/procedural-planets @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
81 symbols 251 edges 55 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Procedural Planet Generation (GPGPU)

Read the full article on Medium.

This is a procedural planet mesh generation tool working on web technologies. Using multilayered simplex noises, we can simulate continents and mountains. In the showcase, a polaroid of the scene and the .obj file can be exported. Thanks to Sebastian Lague for it's series on the subject and the inspiration.

Installation

Since this is a web app, apparently, you need NodeJS installed.

  • npm install: Installs the necessary dependencies.
  • npm run dev: Runs the local development server on localhost:5173.
  • npm run build: Build the project as a client only bundle.

To utilize GPGPU, you don't need any additional configuration. Instead of WebGPU, it uses rendering pipeline, so it is widely supported. In case you need CPU generation, you can swap PlanetGPU with the PlanetCPU on the src/editor/renderer.tsx.

Technicality & Implementation

Generation Parameters

Examples

Extension points exported contracts — how you extend this code

NoiseFilter (Interface)
(no doc) [2 implementers]
src/lib/noise.ts
CaptureRef (Interface)
(no doc)
src/components/util/capture.tsx
UseScreenshotReturn (Interface)
(no doc)
src/hooks/useScreenshot.ts
ElevationGradientStop (Interface)
(no doc) [1 implementers]
src/lib/gradient.ts

Core symbols most depended-on inside this repo

getRandomElement
called by 10
src/lib/generate-planet-name.ts
cn
called by 10
src/lib/cn.ts
add
called by 9
src/lib/min-max.ts
max
called by 9
src/lib/min-max.ts
min
called by 4
src/lib/min-max.ts
lerp
called by 3
src/lib/lerp.ts
map
called by 2
src/lib/map.ts
pad
called by 2
src/lib/pad.ts

Shape

Function 58
Class 10
Method 8
Interface 4
Enum 1

Languages

TypeScript100%

Modules by API surface

src/lib/noise.ts8 symbols
src/lib/min-max.ts6 symbols
src/lib/gradient.ts5 symbols
src/components/ui/gradient-input.tsx5 symbols
src/lib/generate-planet-name.ts4 symbols
src/hooks/useScreenshot.ts4 symbols
src/components/ui/numeric-value.tsx4 symbols
src/lib/gpu-compute.ts3 symbols
src/components/showcase/showcase-hud.tsx3 symbols
src/components/planet-cpu/mesh-generation.ts3 symbols
src/hooks/useMediaQuery.ts2 symbols
src/components/showcase/film.tsx2 symbols

For agents

$ claude mcp add procedural-planets \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact