Bill Thiede 5faba9cf26 Moved lode/perlin code to noise module.
Changed how NoiseTexture is created to allow noise function and
parameters to be passed in as options.
Allowed setting of noise source from URL parameters.
2018-10-14 15:09:57 -07:00

43 lines
987 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Noise test</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
</head>
<body>
<h1>
{% if noise_source == NoiseSource::Perlin %}
Perlin
{% else %}
<a href="/perlin">Perlin</a>
{% endif %}
/
{% if noise_source == NoiseSource::Lode %}
Lode
{% else %}
<a href="/lode">Lode</a>
{% endif %}
</h1>
{% for s in specimens %}
<h2>{{ s.title }}</h2>
{% for np in s.params %}
<figure>
<p>
<a href="{{ np.big_url()|safe }}">
<img width="{{ np.width }}" height="{{ np.height }}" src="{{ np.url()|safe }}"/>
</a>
<figcaption>
<table>
{% for p in np.noise_type.parameters() %}
<tr><th>{{ p.0 }}</th><td>{{ p.1 }}</td></tr>
{% endfor %}
</table>
</figcaption>
</figure>
{% endfor %}
{% endfor %}
<p>Rendered at: {{ render_time }}</p>
</body>
</html>