blackhole

command
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Black hole is a black hole and its accretion disk, drawn by shaders written in Go (package ui/shader) on the GPU: every pixel's ray of light is traced back through the hole's gravity, so the disk's far side shows above and below the shadow, the side turning toward the camera blazes brighter and bluer, and the stars behind smear into arcs around an Einstein ring.

go run ./examples/blackhole

Drag to orbit, scroll to come closer. Three passes draw a frame: the scene into a canvas, its brightest light blurred into a smaller one, and both over the window with a lens's color fringes and a film's grain. The scene renders at a resolution of its own, which drops while frames come late and rises again once they keep up, as games do.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL