mirror of
https://github.com/toji/gl-matrix.git
synced 2026-01-18 14:26:54 +00:00
103 lines
4.0 KiB
HTML
103 lines
4.0 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
<title>glMatrix</title>
|
|
|
|
<link rel="stylesheet" href="stylesheets/styles.css">
|
|
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
<header>
|
|
<h1>glMatrix</h1>
|
|
<p>Javascript Matrix and Vector library for High Performance WebGL apps</p>
|
|
|
|
<p class="view"><a href="https://github.com/toji/gl-matrix">View the Project on GitHub <small>toji/gl-matrix</small></a></p>
|
|
|
|
<ul>
|
|
<li><a href="https://github.com/toji/gl-matrix/zipball/master">Download <strong>ZIP File</strong></a></li>
|
|
<li><a href="https://github.com/toji/gl-matrix/tarball/master">Download <strong>TAR Ball</strong></a></li>
|
|
<li><a href="https://github.com/toji/gl-matrix">View On <strong>GitHub</strong></a></li>
|
|
</ul>
|
|
</header>
|
|
<section>
|
|
<h1>glMatrix</h1>
|
|
|
|
<p>Javascript has evolved into a language capable of handling realtime 3D graphics,
|
|
via WebGL, and computationally intensive tasks such as physics simulations.
|
|
These types of applications demand high performance vector and matrix math,
|
|
which is something that Javascript doesn't provide by default.
|
|
glMatrix to the rescue!</p>
|
|
|
|
<p>glMatrix is designed to perform vector and matrix operations stupidly fast! By
|
|
hand-tuning each function for maximum performance and encouraging efficient
|
|
usage patterns through API conventions, glMatrix will help you get the most out
|
|
of your browsers Javascript engine.</p>
|
|
|
|
<h2>Documentation</h2>
|
|
|
|
<p>Documentation for all glMatrix functions can be found <a href="docs/2.2.0">here</a></p>
|
|
|
|
<h2>What's new in 2.0?</h2>
|
|
|
|
<p>glMatrix 2.0 is the result of a lot of excellent feedback from the community,
|
|
and features:</p>
|
|
|
|
<ul>
|
|
<li>Revamped and consistent API (not backward compatible with 1.x, sorry!)</li>
|
|
<li>New functions for each type, based on request.</li>
|
|
<li>New array operations: vec(2/3/4).forEach</li>
|
|
<li>Even more optimizations!</li>
|
|
<li>A cleaner code base, broken up by type.</li>
|
|
<li>A more complete unit testing suite.</li>
|
|
</ul><h2>Looking for an older version?</h2>
|
|
|
|
<p>You can download previous versions of glMatrix <a href="https://github.com/toji/gl-matrix/tags">here</a></p>
|
|
|
|
<h2>A note about Matrix formatting</h2>
|
|
|
|
<p>glMatrix is modeled after the needs of WebGL, which in turn uses matrix
|
|
conventions set by <a href="http://www.opengl.org/archives/resources/faq/technical/transformations.htm">OpenGL</a>.
|
|
Specifically, a 4x4 matrix is an array of 16 contiguous floats with the 13th,
|
|
14th, and 15th elements representing the X, Y, and Z, translation components.</p>
|
|
|
|
<p>This may lead to some confusion when referencing OpenGL documentation, however,
|
|
which represents out all matricies in column-major format. This means that while
|
|
in code a matrix may be typed out as:</p>
|
|
|
|
<pre><code>[1, 0, 0, 0,
|
|
0, 1, 0, 0,
|
|
0, 0, 1, 0,
|
|
x, y, z, 0]
|
|
</code></pre>
|
|
|
|
<p>The same matrix in the <a href="http://www.opengl.org/sdk/docs/man2/xhtml/glTranslate.xml">OpenGL documentation</a>
|
|
is written as:</p>
|
|
|
|
<pre><code>1 0 0 x
|
|
0 1 0 y
|
|
0 0 1 z
|
|
0 0 0 0
|
|
</code></pre>
|
|
|
|
<p>Please rest assured, however, that they are the same thing! This is not unique
|
|
to glMatrix, either, as OpenGL developers have long been confused by the
|
|
apparent lack of consistency between the memory layout and the documentation.</p>
|
|
|
|
<p>Sorry about that, but there's not much I can do about it.</p>
|
|
</section>
|
|
<footer>
|
|
<p>This project is maintained by <a href="https://github.com/toji">toji</a> and <a href="https://github.com/sinisterchipmunk">sinisterchipmunk</a></p>
|
|
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
|
|
</footer>
|
|
</div>
|
|
<script src="javascripts/scale.fix.js"></script>
|
|
|
|
</body>
|
|
</html> |