### Squareroot.js

A 2d/3d engine for WebGL and Canvas drawing and animation.

#### Most important links

#### Tutorials

- Getting Started tutorial basic-setup
- Understanding buffers understanding-buffers
- Understanding shaders understanding-shaders
- Post effects post-effects
- 2d Canvas Rendering canvas-rendering
- C4D/Unity Bone Export HOWTO bone-export

#### Workshops

If you are running a web development company and would like me to come and make a presentation or workshop on WebGL, get in touch! Here is a sample presentation WebGL basics presentation.

#### Other interesting WebGL links

Guide:

#### GL

Core WebGL rendering classes.

- SQR.Transform - basic building block. A transform is a point in space that has rotation, position and scale.
- SQR.Buffer - holds buffers & geometries, see understanding-buffers
- SQR.Shader - utility to compile and execute GLSL shaders, see understanding-shaders
- SQR.Texture - create textures from images, vides and canvas elements
- SQR.Cubemap - similar functionality as the texture, but for cubemaps
- SQR.Primitives - a collection of functions to create basic geometries like cube, sphere, etc...
- SQR.Mesh - utility to import meshes from Unity (J3D JSON format)

#### Canvas 2d

Canvas 2d rendering engine. See canvas-rendering for details.

- SQR.Transform2d - similar to the 3d transform above, but optimized for rendering on canvas and in 2d instead of webgl/3d
- SQR.CanvasRenderer - a renderer to draw shapes on a 2d context
- SQR.SpriteSheet - a utility to create sprite sheets for animation

#### Math

All the math classes, incuding vectors, matrices and some other goodies.

- SQR.Color - an RGB color
- SQR.V2 - a 2d vector
- SQR.V3 - a 3d vector
- SQR.Quaternion - a quaternion
- SQR.Matrix2D - a 2d matrix
- SQR.Matrix44 - a multipurpose 4x4 matrix
- SQR.Matrix33 - a 3x3 matrix for rotations/normals
- SQR.ProjectionMatrix - a 4x4 matrix specialized for creating projection matrices
- SQR.Bezier - a quadratic bezier implementations
- SQR.Spline - a spline: multiple line segments smoothed with bezier function
- SQR.Delaunay - delaunay triangulation utility

#### VR

Highly experimental classes that should help build web based VR expriences.

- SQR.VRApp - a helper class to create universal VR Apps
- SQR.VRPost - a VR stereo post effect
- SQR.Gyro - a gyroscope handler

#### Extras

Misc stuff. Some real gems can be found in here!

- SQR.GeometryTools - a collection of functions to deal with buffer and geometries
- SQR.Trackball - a quaternion based 3d trackball control
- SQR.ConvexHull - a utility to calculate a convex hull
- SQR.PerlinTexture - a utility to genrate Perlin noise based textures