Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (52 sloc) 1.71 KB
<!doctype html>
<html>
<head>
<title>Raw WebGL/WebVR Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="webgl.css" type="text/css">
</head>
<body>
<canvas id="glcanvas" width="640" height="480">
Your browser doesn't appear to support the <code>&lt;canvas&gt;</code> element.
</canvas>
<button class="stop-start">Start VR display</button>
<button class="pose-stats">Show pose stats</button>
<section>
<div>
<p class="pos">&nbsp;</p>
<p class="orient">&nbsp;</p>
</div>
<div>
<p class="lin-vel">&nbsp;</p>
<p class="ang-vel">&nbsp;</p>
</div>
<div>
<p class="lin-acc">&nbsp;</p>
<p class="ang-acc">&nbsp;</p>
</div>
</section>
<script src="sylvester.js" type="text/javascript"></script>
<script src="glUtils.js" type="text/javascript"></script>
<script src="webgl-demo.js" type="text/javascript"></script>
<!-- Fragment shader program -->
<script id="shader-fs" type="x-shader/x-fragment">
varying highp vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void) {
gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));
}
</script>
<!-- Vertex shader program -->
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat4 uMVMatrix;
uniform mat4 uPMatrix;
varying highp vec2 vTextureCoord;
void main(void) {
gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
vTextureCoord = aTextureCoord;
}
</script>
</body>
</html>
You can’t perform that action at this time.