Canvas 3d JS Library

where 3D is born!
  • rss
  • What is C3DL?
  • Download
  • Tutorials
    • Tutorial #1: Installing Canvas 3D Addon
    • Tutorial #2: A Scene and a Cube
    • Tutorial #3: Update Callback
    • Tutorial #4: Models 101
  • Development News
  • Demos
    • Typing Game V2.1
    • Typing Game V3 (0.3 Release)
    • Explorer
    • Flickr - Picking
    • Ricochet
    • FSOSS Pictures
    • Puzzler
  • Resources
  • Contact
  • About

Flickr Demo - Almost done!

Chris Bishop | 30 July, 2008 | 12:19
I have completed the flickr demo and need to polish it up for displaying on the website.  The demo has 5 untextured cubes.  The user enters a search term and then clicks a button to search flickr for 5 images.  Once the images have been found they are downloaded and applied to the 5 cubes.  The user has the option to search for the next 5 pictures available if so desired.  The cube can be rotated in any given direction by clicking and dragging the cube.  Zooming and out from a cube happens by double clicking the cube. I said I would have the demo done this week but I ran into problems with the Free Camera.  I believe at one time the Free Camera Object would rotate around its Look At Point when its position was changed.  With this assumption I was setting its Look At Point to a point in 3d space.  This resulted in weird behaviour.  It turns out the Free Camera has changed and the Look At Point is not a fixed point in space but more of a direction and the camera does not rotate around the Look At Point when its position has changed. Here is my attempt to illustrate the situation: You are standing in a room looking at a chair in the middle of that room and you are facing the chair directly. What I thought would happen: Taking 2 steps to your left would result in doing a side step to the left and turning your body to the right to remain facing the chair directly. What is happening: Taking 2 steps to your left will result in doing a side step without turning your body to the right.  You are no longer looking directly at the chair. So it turned out I didn’t need to set the Look At Point since the Camera did not rotate on its own.  Another issue I came across was with Intervals in Javascript.  We have an Interval that runs to update the scene and all the objects in the scene.  Well I has set the linear velocity of the camera so it would move to the right spot gradually and I needed a way to check if the camera had arrived.  I used a timer to check every 250 milliseconds if the camera was close.  I started some debugging to see how close the camera was getting and I notice that my interval was only being executed about 3 times.  So I decreased my interval to 25 milliseconds and my interval was now executed 4 times.  I created a counter and removed as much processing as possible from the function and still it was only called 4 times.  I have not looked into it but there may be issues with intervals in Javascript.  I’m not sure how we’ll be handling threading in the future.  The problem might not have been the intervals since I have not researched it but I plan to.
Categories
c3dl development
Comments rss
Comments rss

« Explorer demo (not the browser) 0.4 Release »

2 responses

Awesome, can't wait!

David Humphrey | 30 July, 2008 | 22:59

Awesome, can’t wait!

the problem you see is recent ...I don't think the

Cathy Leung | 31 July, 2008 | 12:51

the problem you see is recent …I don’t think the 0.3 release has this problem as I used a moving camera trick to simulate the spinning teapot (see front page source on this). I think that andor is working on fixing this.

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Search

Demos

  • Explorer
  • Flickr - Picking
  • FSOSS Pictures
  • Puzzler
  • Ricochet
  • Typing Game V2.1
  • Typing Game V3 (0.3 Release)

C3DL Development News

Portable Canvas v0.2!

Portable Canvas version 0.2 is available!!

It is now a usable browser, but restricted to pages on c3dl.org only. It can display canvas elements right out of the box, and doesn’t require anything else to be on your system (not even FF3!)*. It’s only been tested on Windows XP, but in theory it should be easy [...]

Namespaces and const

As our library expands with more functions, classes and global variables, the need for namespacing increases.  I started placing code in a C3DL namespace when I wrote the matrix stack operations.  However, yesterday I was looking in the constants.js file and saw the ‘tolerance’ variable.  It’s a const variable used when comparing floats to check [...]

Tutorials

  • Tutorial #1: Installing Canvas 3D Addon
  • Tutorial #2: A Scene and a Cube
  • Tutorial #3: Update Callback
  • Tutorial #4: Models 101

Archives

C3DL Development News

Recent Comments

  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • Portable Canvas v0.2!
  • Namespaces and const
  • DAE Scenegraph
  • The Matrix Stack
  • .obj to .dae
  • 0.5 Release and Other News!
  • Tracemonkey performance
  • More memory usage improvements
  • Canvas3D crashes in tracemonkey
  • Patched one hole in floating text
  • For name spaces, my... - Jeremy Giberson
  • Great! Really really... - Edson Mattos
  • Beautiful!... - Funtomas
  • Was no need to conta... - Andrew Smith
  • Andrew, have you con... - Funtomas
  • Thanks for posting t... - Andrew Smith
  • Vlad was in town and... - Cathy Leung
  • the upside down issu... - Cathy Leung
  • Got it! the addon is... - Bill Mill
  • Yes it does. The ad... - Cathy Leung



Canvas 3d JS Library

©2007- 2008 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