Canvas3D JS Library
Introduction
The Canvas 3D JS Libary (C3DL) is a javascript library that will make it easier to write 3D applications using canvas 3d. It will provide 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.
Contributors
- Catherine Leung
- Mark Paruzel (CodeBot)
- Andrew Smith
- Chris Bishop (Javascript)
- Andor Salga
- Patrick Lam (Picking - Javascript)
- James Boston (Garbage collection)
Downloads
You can get the extension from https://addons.mozilla.org/en-US/firefox/addon/7171 (use suckmenot@mailinator.com/bugmenot for authentication).
For the library, samples, and tutorials, go to http://www.c3dl.org/
Links
- Our Web Site
- Our SVN Repo: svn://cdot.senecac.on.ca/canvas3d
- canvas3d source code in Vlad's hg repo
Related Resources
Prototype
Documentation
Documentation can be found within the SVN repository in the documentation directory.
Web site Task List
- Write particle system tutorial
- Write camera tutorial
- Write keyboard control tutorial
- Write callback function tutorial
- Write transition tutorial for flash developers
- Write blender tutorial: How to export to collada and import into the library
- Write debugging tutorial: Creating meaningful debug output with and without firebug
- At end of tutorials, provide link to demo showing what user can now do
1.0 Task List
Update library so it's compatible with canvas3d 0.4Update library with hierarchy changesRemove old 1.1 context codeUpdate documentation- Run final tests
1.1 Task List
- Fix backface culling
- Switch to using VBOs to speed up rendering
- Implement drawing lines and points
- Detect and warn users if they try to initialize a Collada object without first using addModel()
- Refine distance calculations for overlapping objects for picking
Library Task List
- Add dynamic object loading.
- Add sound support.
- Create a mechanism to prevent scripts from running before everything (textures, models) is done loading.
- Catch and report error on "Access to restricted URI denied", which occurs if user tries to access a model file which does not exist.
- Create a progress bar which includes percentage complete of model and texture loading.
- Add particle system size attenuation.
- Add set/getVisible for Collada object.
- Allow users to specify texture filtering
- Delete texture objects when textures are deleted from library.
- Create and post a hierarchical diagram of the library classes
- Investigate overriding spacebar and arrow keys from browser's default behavior.
- Add multi-texture support.
- Add option to change back-face culling.
- Add option to use orthographic projection.
- Add picking for orthographic projection.
- Generate error if user tries to place camera at (0,0,0) and set's it's lookat to (0,0,0)
Bug List
- Collada
- fix FindNode for Collada's scenegraph.
- Objects
- Fix angular velocity/gc bug. If object is set to spin on more than one axis, its angular velocity will change when the gc starts.
- Same linear velocity for Models and Collada objects makes one type 'overtake' the other.
- Picking
- Picking does not work when the canvas width isn't equal to the canvas height
- Particle System
- Error when creating a particle system without texture
- BoundingSphere
- When the bounding Sphere is rendered, it is not the correct size until the user clicks on the canvas. At that point all BoundingSpheres will change their sizes.
Ideas List
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
- 3D Asteroids - Good use of Collision detection, animation, particles, camera work, both mouse and keyboard controls.
- Solar System Explorer - Pull the positions of our planets from some sort of webservice and display them, allowing users to see their relative alignment.
- Simulation of 3D path finding
- 3D graphs
- Display social networks and their relationships
- Get earthquake Richter-scale values from a service and show graphs on a map
- Display 3D graphs beside one another, gas prices along stock market values
- 3D flowcharts
- 3D Traceroute - graphical view of an IP's path across the internet. More details in this blog post
- 3D Canvas Racing Demo - like this but better, to show that it's both easier to use, more funcionality is available, and runs much faster (hopefully)
- Molecule Viewer - Rotate 3D molecules. Similar to this
- 3D Sudoku
- 3D Rubik's Cube
- House Explorer/Designer - Load a mesh of a room or a house and allow users to navigate through the environment or design a room in a house.
- 3D Photo Album - Download images and create a 3D photo album similar to this.
- Matrix - Query search engines for sites, chat logs, blogs, etc. and display all the text in a matrix-like fashion.
- Really fancy animation of a bar graph, with columns growing and arrow moving. Will be an instant hit with businessmen. Usable as easy as google's toy
- Generic model viewer application, with back/forward/index + zoom/rotate buttons that would download and display models from the web. Would have to be able to convert 3dsmax models in JS. So a museum or such could just slap the app on the page and give it an array of URLs for the stuff to show.
- Pong. Should be fairly easy, we just need to code the collision detection.
- multi-player network air hockey. Supports up to 8 players. Create an arena based on number of players . Each wall has a hole and a paddle that players can move left and right. A ball is randomly sent flying and each time it goes through a hole, the player loses a point. Lose 10 points and that player is eliminated. Last person alive wins.
Meeting Summaries
May 29
For next week:
Mark: Add to library and do some bug fixes based on what Chris found
Chris: Work on putting his apps on site
Andrew: Work on making the libraries work with shaders. Provide a method for detecting capability of client to use a 2.0 context and switch
Andor: was absent but will work on shaders
June 04
Mark:
Cathy: send andrew a simple model to play with. Add equivalent of hello world tutorial for library. Begin documentation
Chris:
- Release Version 2 of the Type Game. New feature is vertical movement.
Andrew: figure out how to load files form http:// in javascript to be able to load a model from the internet; and display a model that's in some ascii format
Andor:
- Get textures applied to cubes (no uv's yet) in 1.1 context.
- Investigate box skewing problem in 2.0 context.
- Get camera working in 2.0 context.
- Clean up shader code converter and upload to repo.
June 12
General goal: establish a format for models. 0.3 release date goal: end of june.
Cathy: Work on more tutorials involving keyboard and camera control. Look for bugs, document the functions
Mark: test changes with the basic demo (especially involving 2.0 context) when changing rendering.
Chris: studying for midterms
Andrew: Fix the 2.0 rendering. Work on loading and displaying models. Give Andor some idea about the preffered format.
Andor: figure out the model format, get model and texture working in 1.1 context, get texture working in 2.0 context(?)
June 19
Cathy: continue on tutorials.
Mark:
Chris: back from Exams. Updated demo to use latest API. Working on adding vertical movement for the cubes.
Andrew:
Andor: Add textures to benchmarking, get rendering in Model work with same file with different contexts, get Model scaling to work, fix bugs.