#!/usr/bin/env python3 """Embed the two GLSL passes into the standalone ice_plasma.html page.""" import json from pathlib import Path here = Path(__file__).resolve().parent scene = (here / '6_ice_plasma.frag').read_text() ice = (here / '7_ice_over.frag').read_text() html = r''' Сквозь лёд
Сквозь лёд
Двигайте мышь · скорость − / =
''' (here / 'ice_plasma.html').write_text(html.replace('__SCENE__', json.dumps(scene)).replace('__ICE__', json.dumps(ice))) print('ice_plasma.html written')