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
  • Development News
  • Documentation
  • Community
  • Resources
  • Contact
  • About

Orbit Camera

Andor Salga | 4 July, 2009 | 7:51
Here’s an interesting demo which makes use of an orbit camera.
orbit camera screen shot

I’m currently implementing an OrbitCamera for the library. An OrbitCamera is a camera which is restricted to orbiting about a single point. The OrbitCamera has pitch and yaw methods, but they pitch and yaw about the orbit point rather than its local axes. I decided to allow the flexibility to select any point to orbit around in the world rather than an object. If the object a camera is orbiting moves, the camera can simply be repositioned in the update callback. Methods to restrict how close or far the camera can move towards or away from the point have been added for convenience. Additionally, I created a Camera base class and now FreeCamera and OrbitCamera both inherit from that base class.

The OrbitCamera will be available for the 1.2 release.
Categories
c3dl development
Comments rss
Comments rss
Trackback
Trackback

« Template Creation User Defined Shaders »

7 responses

Hello, I've tryied this code in the last Canvas3D library,

Maelvon | 2 October, 2009 | 10:38

Hello, I’ve tryied this code in the last Canvas3D library, and in “orbitcamera.js” the zoom prototype doesn’t exist! I’ve only found yaw and pitch, is that normal ?

Maelvon

Hi Maelvon, To 'zoom' in and out you

Andor Salga | 3 October, 2009 | 8:25

Hi Maelvon,

To ‘zoom’ in and out you should use goCloser() and goFarther() methods of the OrbitCamera. At one point I wanted to use just one function, zoom(), but thought it might be a bit vague. Does zoom with a positive value move closer or father away? There shouldn’t be any zoom() prototype in the library if you have the latest one. Make sure you get the latest from the Downloads page.

As I didn't find the zoom() proto, I'll copied the

Maelvon | 5 October, 2009 | 3:05

As I didn’t find the zoom() proto, I’ll copied the zoom proto from this example in the last library, and it works. But, I should look at the goCloser() and goFurther() methods, as you say.

Thanks for the response, and for the great library.

Do you have an example of the use of goFurther() and goCloser() ?

Hi Maelvon, I don't think the demos posted

Andor Salga | 5 October, 2009 | 5:37

Hi Maelvon,
I don’t think the demos posted use the OrbitCamera. But since you’re asking, I’ll post a demo of it’s use sometime this week.

Maelvon, I posted the new Orbit Camera demo which

Andor Salga | 12 October, 2009 | 14:11

Maelvon,
I posted the new Orbit Camera demo which uses the 1.1 version of our library.

Cool, I've implemented it on my test page, it rocks! Thanks

Maelvon | 13 October, 2009 | 4:04

Cool, I’ve implemented it on my test page, it rocks!

Thanks for the code.

I add an other question. If we’re in orbit camera mode, can we Pan the camera ?

When you want someone to pan, set a free camera's

Andor Salga | 13 October, 2009 | 16:00

When you want someone to pan, set a free camera’s position to the orbit camera’s position. Then set the scene’s camera to the free camera and call whichever free camera function you need.

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>

Videos

Demos

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

C3DL Development News

SceneCreator0.3

SceneCaster is an online application that allows people to create “spaces” which are 3d scenes on the browsers and share them which other.  It is free to sign up and relatively  easy easy to use. The main problems with SceneCaster are the requirements: The operating systems used are Windows XP or Vista and the browser [...]

WWW2010 in Raleigh

Yesterday Andor and I gave a talk at www 2010. It was about how mid level API’s can help web developers who may not wish to do extremely low level programming at the WebGL level achieve the 3D effects they want. The “slides” from our talk can be found here. The [...]

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

Documentation

Archives

Archives

C3DL Development News

Recent Comments

  • 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
  • SceneCreator0.3
  • WWW2010 in Raleigh
  • Motionview
  • On the train to Mountainview
  • C3DL 2.0-WebGL and beyond
  • Preliminary WebGL RTS Game
  • Asteroids in 3D… and a bit of 2D
  • Another demo updated
  • Simplifying the Interface
  • Updating Demos
  • I'm encountering sim... - peter
  • I'm having the darnd... - Jeff
  • Excellent, I'm looki... - Some Funky Dude
  • Great demo! I was th... - Some Funky Dude
  • Hey, just wanted to... - Charles
  • keep it coming ve... - gero3
  • congrats on a great... - Paul Brunt
  • c++ not c# actually... - Cathy Leung
  • It's unbelievable ho... - Paul
  • Wow, now that's a co... - Andor Salga



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