Is it possible to make a camera orbit script?

Hi, is it possible to create camera orbit script?
Like this
http://pages.cs.wisc.edu/~lizy/mrdoob-three.js-ef5f05d/examples/misc_camera_orbit.html