77 lines
1.4 KiB
HTML
77 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<div>
|
|
depth .05<input id="depthSlider" type="range"
|
|
min=".05" max="3" step="0.1" value="2" />
|
|
3
|
|
</div>
|
|
<div>
|
|
radius 0.05<input id="radiusSlider" type="range"
|
|
min="0.05" max="2" step="0.1" value="1" />
|
|
2
|
|
</div>
|
|
<div>
|
|
theta -90<input id="thetaSlider" type="range"
|
|
min="-90" max="90" step="5" value="0" />
|
|
90
|
|
</div>
|
|
<div>
|
|
phi -90<input id="phiSlider" type="range"
|
|
min="-90" max="90" step="5" value="0" />
|
|
90
|
|
</div>
|
|
<div>
|
|
width 0<input id="widthSlider" type="range"
|
|
min="0" max="20" step="1" value="10" />
|
|
20
|
|
</div>
|
|
<div>
|
|
height 0<input id="heightSlider" type="range"
|
|
min="0" max="20" step="1" value="10" />
|
|
20
|
|
</div>
|
|
<script id="vertex-shader" type="x-shader/x-vertex">
|
|
#version 300 es
|
|
|
|
in vec4 aPosition;
|
|
in vec4 aColor;
|
|
out vec4 vColor;
|
|
|
|
uniform mat4 uModelViewMatrix;
|
|
uniform mat4 uProjectionMatrix;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = uProjectionMatrix*uModelViewMatrix*aPosition;
|
|
vColor = aColor;
|
|
}
|
|
</script>
|
|
|
|
<script id="fragment-shader" type="x-shader/x-fragment">
|
|
#version 300 es
|
|
|
|
precision mediump float;
|
|
|
|
in vec4 vColor;
|
|
out vec4 fColor;
|
|
|
|
void
|
|
main()
|
|
{
|
|
fColor = vColor;
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript" src="../Common/initShaders.js"></script>
|
|
<script type="text/javascript" src="../Common/MVnew.js"></script>
|
|
<script type="text/javascript" src="ortho2.js"></script>
|
|
|
|
<body>
|
|
<canvas id="gl-canvas" width="512" height="512">
|
|
Oops ... your browser doesn't support the HTML5 canvas element
|
|
</canvas>
|
|
|
|
</body>
|
|
</html>
|