Canvas 3d JS Library

WebGL made easy!
  • rss
  • What is C3DL?
  • Download
  • Tutorials
    • Tutorial #1: WebGL Browsers
    • Tutorial #2: A simple scene
    • Tutorial #3: Callback
    • Tutorial #4: Models
    • Tutorial #5: Light effects
    • Tutorial #6: Picking
    • Tutorial #7: Materials
    • Tutorial #8: Particle Systems
    • Tutorial #9: Camera Basics
    • Tutorial #10: Advanced FreeCamera
    • Tutorial #11: OrbitCamera
    • Tutorial #12: Advanced Camera Functions
  • Development News
  • Documentation
  • Community
  • Resources
  • Contact
  • About

A spec change that keeps coming back to haunt me

peter | 24 June, 2011 | 13:22

At some point, the way firefox handles keyboard events changed. I’m not sure exactly when it happened, all I know is that it broke how I was dealing with keyboard interaction on almost every demo I’ve written (for example,the mocap demo and MotionView). When I wrote the demos, the keydown event would be fired once, when the user initially pressed the key (it still works this way on the other browsers as far as I can tell), but at some point that I missed it got changed to firing on every update for as long as the key is held (or until you press another key, at which point the keydown event will start firing repeatedly for that key). Several of the demos and tests I have written relied on the keydown event to start moving something in the scene (usually the camera). Unfortunately, when the event switched over to firing repeatedly as long as a key is held, this caused uncontrollable acceleration which could only be countered by holding a key for the opposite movement a corresponding amount of time.

I accommodated for this by adding a check into the function that handles that event to compare the key most recently pressed to the previous key pressed (which starts off as a value of -1, and must be reset to that whenever the most recent key pressed is released) and only causes the movement if they do not match. I think I’ve added this into the various demos that require it, but if you find any of them have weird camera movement that just doesn’t behave right, let me know in the comments.

Comments
No Comments »
Categories
c3dl development
Comments rss Comments rss
Trackback Trackback

Release 2.2

peter | 22 March, 2011 | 19:15

The 2.2 Release of the Canvas 3D Library includes a number of new features, updates to old features and fixes for several bugs along with the requisite changes to meet the evolving WebGL spec.

Some of the things included (in no particular order) are:

  • Better picking code.
  • The ability to swap textures as a scene is running.
  • The ability to texture an object with video files and canvas tags.
  • More information about objects, such as the number of triangles, the size of the object (and the ability to scale it to a particular size) and the ability to center an object.
  • Primitive objects such as cubes, planes and spheres.
  • Upgraded collision detection.
  • The ability to pause/stop/start the scene (rendering and updating).
  • The ability to label an object in the scene as static, so time won’t be wasted trying to calculate the movements of an object that does not move.
  • Using RequestAnimationFrame so as not to waste time rendering a page that isn’t visible.
  • Frustrum culling.
  • General improvements to the performance of the library.

We have a number of other changes coming, along with new tutorials and demos planned. And as always, you can request new features and/or report bugs through our lighthouse account

Comments
1 Comment »
Categories
C3DL News, c3dl development
Comments rss Comments rss
Trackback Trackback

2.1 Release and things to come

Cathy Leung | 26 October, 2010 | 16:25
As WebGL is implemented and refined by various browser makers, things that were once working for c3DL has been broken. This 2.1 release is made without new features but will hopefully address some of the new issues that have come up.
Comments
No Comments »
Categories
c3dl development
Comments rss Comments rss
Trackback Trackback

Level Up! An Open Web Game Jam

Cathy Leung | 25 October, 2010 | 17:43
On October 27, the Level Up Game Jam will be held at Seneca College (Seneca@York campus) as part of Toronto Open Source Week. A set of small tutorials on tools that can be used to develop games for the open web will be presented in the morning. In the afternoon, attendees are encouraged to break out into small groups (or by themselves) to make games with these tools. Tutorials Topics and Facilitators:
  • Andor Salga – processing.js
  • Catherine Leung – c3DL
  • Alistair MacDonald – web audio
There is a very small number of spots left, please sign up if you are interested! This event is free with registration to FSOSS 2010 and $20 otherwise
Comments
No Comments »
Categories
c3dl development
Comments rss Comments rss
Trackback Trackback

Site moved!

Cathy Leung | 6 October, 2010 | 17:41
We have just recently moved our site to a new web host. As a result there are probably many broken links and so on. These are being fixed as we go (although really old archives will likely not be updated). Please let us know what is broken as we move forward to fix them :)
Comments
No Comments »
Categories
c3dl development
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Videos

Demos

  • Asteroids-3D
  • RTS Prototype
  • Particle Systems Demo
  • Cross-Browser Orbiter
  • Mocap Demo With Spheres
  • Google Maps-3D

C3DL Development News

A spec change that keeps coming back to haunt me

At some point, the way firefox handles keyboard events changed. I’m not sure exactly when it happened, all I know is that it broke how I was dealing with keyboard interaction on almost every demo I’ve written (for example,the mocap demo and MotionView). When I wrote the demos, the keydown event would be fired once, [...]

Release 2.2

The 2.2 Release of the Canvas 3D Library includes a number of new features, updates to old features and fixes for several bugs along with the requisite changes to meet the evolving WebGL spec. Some of the things included (in no particular order) are: Better picking code. The ability to swap textures as a scene [...]

Tutorials

  • Tutorial #1: WebGL Browsers
  • Tutorial #2: A simple scene
  • Tutorial #3: Callback
  • Tutorial #4: Models
  • Tutorial #5: Light effects
  • Tutorial #6: Picking
  • Tutorial #7: Materials
  • Tutorial #8: Particle Systems
  • Tutorial #9: Camera Basics
    • Tutorial9-YawPitchRoll
  • Tutorial #10: Advanced FreeCamera
  • Tutorial #11: OrbitCamera
  • Tutorial #12: Advanced Camera Functions

Documentation

Archives

Archives

C3DL Development News

Recent Comments

  • June 2011
  • March 2011
  • October 2010
  • July 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • A spec change that keeps coming back to haunt me
  • Release 2.2
  • 2.1 Release and things to come
  • Level Up! An Open Web Game Jam
  • Site moved!
  • SceneCreator0.3
  • WWW2010 in Raleigh
  • Motionview
  • On the train to Mountainview
  • C3DL 2.0-WebGL and beyond
  • That depends on what... - peter
  • This application is ... - Haisens
  • I think that example... - peter
  • The above links are ... - Atash
  • Hi there, just wante... - Patrick H. Lauke
  • Firefox 4 was releas... - Cathy Leung
  • In order to access l... - peter
  • I am not able to dis... - preksha
  • "JavaScript can’t di... - Joe Hocking
  • I should point out t... - peter



Canvas 3d JS Library

©2007- 2010 Canvas 3d JS Library

Disclaimer: This website is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Canada License.
The Canvas 3d JS Library and Demos found on this website are licenced under the MIT License

Creative Commons License