<script src="https://threejs.org/build/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>
<div id="container">
<div id="controls">
<button id="reload">reload</button> <button id="fullScreenToggler">Toggle Fullscreen</button>
<div id="SpeedBarContainer">
Speed: <input id="Speed" type="range" min="0.01" max="1" step="0.01" value="0.1">
</div>
<div id="WorldScaleBar">
WorldScale: <input id="WorldScale" type="range" min="0.0001" max="0.3" step="0.0001" value="0.11">
</div>
<div id="WorldScaleBar2">
WorldScale: <input id="WorldScale2" type="range" min="0.0001" max="0.3" step="0.0001" value="0.11">
</div>
<div id="WorldScaleBar3">
WorldScale: <input id="WorldScale3" type="range" min="0.0001" max="0.3" step="0.0001" value="0.11">
</div>
</div>
</div>
<script type="text/javascript">
/*
* A speed-improved perlin and simplex noise algorithms for 2D.
*
* Based on example code by Stefan Gustavson ([email protected]).
* Optimisations by Peter Eastman ([email protected]).
* Better rank ordering method by Stefan Gustavson in 2012.
* Converted to Javascript by Joseph Gentle.
*
* Version 2012-03-09
*
* This code was placed in the public domain by its original author,
* Stefan Gustavson. You may use it as you see fit, but
* attribution is appreciated.
*
*/
(function(global){
var module = global.noise = {};
function Grad(x, y, z) {
this.x = x; this.y = y; this.z = z;
}
Grad.prototype.dot2 = function(x, y) {
return this.x*x + this.y*y;
};
Grad.prototype.dot3 = function(x, y, z) {
return this.x*x + this.y*y + this.z*z;
};
var grad3 = [new Grad(1,1,0),new Grad(-1,1,0),new Grad(1,-1,0),new Grad(-1,-1,0),
new Grad(1,0,1),new Grad(-1,0,1),new Grad(1,0,-1),new Grad(-1,0,-1),
new Grad(0,1,1),new Grad(0,-1,1),new Grad(0,1,-1),new Grad(0,-1,-1)];
var p =...