Exploring techniques to rotate models in 2d
Building an intuitive understanding of how the GPU works and the math behind it. This code explores several techniques for rotating a 2D model including
- Calculating a rotation matrix in JavaScript
- Calculating the rotation matrix with GLSL in the GPU
- Using complex numbers to calculate rotation in Javascript.
References: Code draws from the following references https://webgl2fundamentals.org/ https://archive.org/details/3d-math-primer-for-graphics-and-game-development-2e/mode/1up
To Run
- In directory containing package.json, execute 'npm install'
- After dependencies install execute 'npm start'