mcpbeat

Threejs Raymarched Space Effects

scottstts/threejs-raymarched-space-effects

Build raymarched space phenomena in Three.js. Use for black-hole lensing, accretion disks, wormholes, curved-ray integration, procedural star fields, relativistic-looking distortion, bounded volumetric structures, and GPU effects that need controlled numerical integration.

255k tokens
context cost
the whole folder, loaded on every use
6
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
527
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/scottstts/Threejs-Awesome-Graphics-Agent-Skills --skill threejs-raymarched-space-effects

The instruction itself

4 sections, as written by the author

Raymarched Space Effects

Treat these effects as numerical renderers with explicit integration state. The visual character depends on coordinate choice, step policy, and how rays interact with emissive structures.

Workflow

  • Define the effect-space transform and camera ray.
  • Choose a physical, physically inspired, or purely artistic bending model.
  • Bound the integration domain.
  • Track ray position, direction, throughput, and accumulated radiance.
  • Detect crossings with disks, shells, throats, or event boundaries.
  • Sample the background only after integration terminates.
  • Add diagnostics for trajectory, step count, and termination reason.

Read references/curved-ray-integrators.md

for the RK4 wormhole, artistic curved-ray accretion integrator, disk

composition, and implementation defects.

Read the

curved-ray accretion volume

for the inverse-square steering loop, thin disk density, front-to-back

accumulation, deterministic star environment, and integrator diagnostics.

Read the

Schwarzschild geodesic black-hole effect

for RK2 null-geodesic integration, interpolated equatorial disk crossings,

Doppler/redshift disk emission, lensed procedural deep field, and HDR bloom

composition.

Constraints

  • Do not call a UV swirl “gravitational lensing.”
  • Cap iterations and provide early termination.
  • Use continuous crossing tests for thin structures.
  • Keep numerical stability independent from frame rate.
  • Separate the integrator from shading of the accretion disk or wormhole interior.
  • Provide a cheaper approximation for non-hero views.

Routing boundary

Use $threejs-procedural-vfx for ordinary particles, trails, plasma, and event

effects. This skill is for per-pixel numerical ray integration through curved

or bounded space-effect domains.

How to use it

Copy the folder

Take scottstts/threejs-raymarched-space-effects from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.