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.
This commit is contained in:
2018-10-14 15:09:57 -07:00
parent accfd09ce4
commit 5faba9cf26
12 changed files with 286 additions and 161 deletions

View File

@@ -6,6 +6,19 @@
<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 %}
@@ -16,7 +29,7 @@
</a>
<figcaption>
<table>
{% for p in np.noise.parameters() %}
{% for p in np.noise_type.parameters() %}
<tr><th>{{ p.0 }}</th><td>{{ p.1 }}</td></tr>
{% endfor %}
</table>