Last active
April 22, 2023 09:59
-
-
Save humbletim/f5428fefb1d0985292094d7fc1d5807b to your computer and use it in GitHub Desktop.
glm-js source test page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- for gist purposes this BASE HREF makes everything load relative to the current live web examples --> | |
<!-- note: save this file in a subfolder off the the project root and remove the BASE HREF to experimental locally --> | |
<base href='https://humbletim.github.io/glm-js/code/test/index.html' /> | |
<!-- glm-js core scripts --> | |
<script src="../src/glm.common.js" type="text/javascript"></script> | |
<script src="../src/glm.buffers.js" type="text/javascript"></script> | |
<script src="../src/glm.experimental.js" type="text/javascript"></script> | |
<!-- specific vendor back-end (variations exist for tdl-fast and gl-matrix as well) --> | |
<script src="../lib/three.js" type="text/javascript"></script> | |
<script src="../src/glm.three.js" type="text/javascript"></script> | |
<!-- ... quick inline example of printing out some lookAt values --> | |
<pre id="output"></pre> | |
<script> | |
var q = glm.lookAt( | |
glm.vec3(20, 80, 15), | |
glm.vec3(15, 0, 12), | |
glm.vec3(0, -1, 0) | |
); | |
output.innerText += [ | |
'glm: ' + glm.version, | |
'glm.lookAt(...): ' + q, | |
'glm.toMat4(glm.lookAt(...)): ' + glm.toMat4(q), | |
].join('\n'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment