Files
shaders/shot.py
T
emil28092005 27d238cbe6 Ice slab with layered plasma, two-pass refraction
Pass 1 renders eight plasma sheets into an atlas with linear depth in alpha;
pass 2 marches the refracted ray to each sheet and absorbs it by real path
length, so near and far layers separate under pointer parallax. Plasma cycle
repeats exactly every 30 s; - / = change speed.
2026-10-30 19:56:16 +03:00

12 lines
664 B
Python
Executable File

#!/usr/bin/env python3
"""shot.py <page.html> <out.png> [t] [size] — single still of a live page (uses its #shot mode)."""
import os, subprocess, sys
page, out = sys.argv[1], os.path.abspath(sys.argv[2])
t = sys.argv[3] if len(sys.argv) > 3 else "0"
w = sys.argv[4] if len(sys.argv) > 4 else "700"
url = "file://" + os.path.abspath(page) + "#shot&t=%s&w=%s" % (t, w)
subprocess.run(["firefox","--headless","--new-instance","--profile","/tmp/ff2",
"--window-size=%s,%s" % (w, w), "--screenshot=" + out, url],
env={**os.environ,"MOZ_NO_REMOTE":"1"},
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=180)