1,234
edits
Changes
no edit summary
The Canvas 3D JS Libary (C3DL) is a Javascript library that will make it easier to write 3D applications using WebGL. It provides a set of math, scene, and 3d object classes to make the canvas more accessible for developers that want to develop 3D content in browser. == People Working On This Project Contributors==
* Catherine Leung
* [[User:asalga | Andor Salga]]* Peter Callaghan* [[User:Pplam3 | Patrick Lam]] (Picking)* [[User:Jamesboston | James Boston]] (Garbage collection)* Mark Paruzel (CodeBot)
* Andrew Smith
* Chris Bishop
* Jeremy Giberson
* Joe Drew
* Matthew Postill
== Downloads ==
For the library, samples, and tutorials, go to [http://cs.senecacwww.onc3dl.caorg/~leung/canvas3d/canvas3d-0c3DL.2.0.xpi Andrew's patchorg] - this change to the canvas 3D extension allows the "simple" examples from Vlad's page to work with ati cards. This is intended for Windows only. Model viewer examples do not work yet.
== Canvas3D Helper Classes Links ==* [http://www.c3dl.org c3DL.org]* [http://github.com/cathyatseneca/c3dl GitHub Repo]* [svn://cdot.senecac.on.ca/canvas3d Old SVN Repo]* [http://en.wikipedia.org/wiki/C3DL Wikipedia page]
=== Math Helper =Related Resources ==* IN PROGRESS[http://www.khronos.org/webgl/ Khronos WebGL]
==Documentation = Vector Class ===A Vector basically describes a direction in the form of X, Y, and Z coordinates of a 3D world. Basic 3D math cannot exist without the utilization of spatial coordinates which the Vector Class encapsulates. The Vector Class will have the following members within it:
Here are the wishlist of things we want to be able to do with the library.... If you want something add it to the list.
* Getters** getMatrix() Solar System Explorer - '''Returns an array Pull the positions of 16 numbersour planets from some sort of webservice and display them, allowing users to see their relative alignment. Each value represents a location of the matrix starting at the top left corner (Row-Major)'''
* Setters** setMatrix(newMatArray) - '''Takes an Array Simulation of 16 numbers that represent the matrix in Row-Major format'''3D path finding
* Calculations3D graphs:** identity() - '''Sets the matrix up to be an identity matrix'''** transpose() - ''' Transposes the matrix to be in Column-Major format, Display social networks and vice versa'''** inverse() - '''Calculates the Inverse of the matrix. Returns NULL if it fails, else it returns an inverse matrix'''** determinant() - '''Returns a number that is the Matrices determinant'''** adjoint() - '''Returns the Hermitian transpose (Adjoint) of this matrix'''** multiplyByScalar(scalar) - '''Multiplies the values of the matrix by a number'''their relationships<br />:** divideByScalar(scalar) Get earthquake Richter- '''Divides the scale values of the matrix by from a number'''** multiplyByMatrix(mat) - '''Multiplies two matrices together. It returns service and show graphs on a new matrix'''map<br />:** multiplyByVector(vec) - '''Mutiplies the orientation of the matrix by the vector. This function returns the newly oriented Vector'''** addMatrix(mat) - '''Adds the Display 3D graphs beside one another, gas prices along stock market values of two matrices together. It returns a new matrix'''<br />:** subtractMatrix(mat) - '''Subtracts the values of the two matrices. It return a new matrix'''3D flowcharts<br />
* 3D Traceroute - graphical view of an IP's path across the internet. More details [http://www.c3dl.org/index.php/uncategorized/canvas3d-traceroute-idea/ in this blog post]
* Getters** getW() Molecule Viewer - '''Returns the numerical W component of the Quaternion'''** getX() - '''Returns the numerical X component of the Quaternion'''** getY() - '''Returns the numerical Y component of the Quaternion'''** getZ() - '''Returns the numerical Z component of the Quaternion'''** getMatrix() - '''Returns a Matrix object that reflects the orientation of the quaternion'''** getAxisAngle(axis, angle) - '''Takes in two values, a Vector object and a NumberRotate 3D molecules. Similar to [http://www.worldofmolecules.com/3D/bcarotene_3d. Converts the orientation of the quaternion into an axis Vector and an angle around it'''htm this]
* Setters** setFromQuat(quat) - '''Sets this Quaternion with the same value as the one being passed in'''** setFromMatrix(mat) - '''Creates a Quaternion orientation from the orientation of the Matrix object that is passed in'''3D Sudoku
* Calculations** length() - '''Returns the length of the Quaternion'''** lengthSq() - '''Returns a number that represents the square of this Quaternion's length'''** addQuat(quat) - '''Takes a Quaternion object that will be added to this Quaternion's internal (w, x, y, z) values'''** subtractQuat(quat) - '''Takes a Quaternion object where its values will be subtracted from this Quaternion's (w, x, y, z) values'''** multiplQuat(scalar) - '''Takes a number and multiplies its values by the Quaternion's (w, x, y, z) values'''** conjugate() - '''Returns a Quaternion that is this Quaternion3D Rubik's conjugate'''** dot(quat) - '''Takes a Quaternion and returns the Dot Product of the two'''** normalize() - '''Normalizes the quaternion'''** inverse() - '''Returns the inverse of this Quaternion'''Cube
* Getters** getPosition() - '''Returns a Vector Object that represents the position of the Camera'''** getUp() - '''Returns a Vector Object that represents the orientation of Up'''** getDir() - '''Returns a Vector Object that is the direction the camera is facing'''** getLeft() - '''Returns a Vector Object that represents the orientation of Left'''** getLinearVel() - '''Returns a Vector that is the velocity that the camera is traveling at'''** getAngularVel() - '''Returns a Vector that contains the rotation velocity around the local (x, yPong. Should be fairly easy, z) axis of we just need to code the camera'''collision detection.
* Setters** setPosition(vec) multi- '''Takes player network air hockey. Supports up to 8 players. Create an arena based on number of players . Each wall has a Vector that sets the camera's position'''** setLookAtPoint(vec) - '''Takes hole and a Vector paddle that represents the point the camera will look at'''** setUpVector(vec) - '''Takes players can move left and right. A ball is randomly sent flying and each time it goes through a vector that orients hole, the camera Up'''** setLinearVel(vec) - ''' Takes player loses a vector point. Lose 10 points and that player is the camera's linear velocity'''** setAngularVec(vec) - '''Takes a vector that represents the camera's rotational velocity around local (x, y, z) axis'''eliminated. Last person alive wins.
* Other Functions2 Player Online Chess:** rotateOnAxis(axis, angle) - '''Takes a vector and a number that represents a relative rotation Orbit camera can be used to orbit around the camera's orientation'''board.<br />:** yaw(angle) - '''Takes a number that Effects can be used to change what material the camera will rotate around its Up vector'''pieces and board use such as metal, wood, etc.<br />:** roll(angle) - '''Takes Picking can be used to allow a number that simple interface to move the camera will rotate around its direction vector'''** pitch(angle) - '''Takes pieces. Either clicking on two tiles can move a piece or clicking on a piece and then a number that tile can move the camera will rotate around its Left vector'''piece.<br />:** update(timeElapsed) Further research is needed to determine the best server- '''Takes a number that represents the amount of milliseconds that passed since the last call side language to use to updateshare board state between players. This function updates the position and rotation based on the set <br />:* Animation can be achieved simply by setting velocities'''of pieces.<br />