Adding views using the CameraRotate JavaScript

Learn how to set different views from the Menage view using the CameraRotate.js script.

By Tony DeYoung – January 24, 2006

 

By default, the CameraRotate.js [JS: 16 KB] script overrides the camera movement and view management in Acrobat 3D. For example, if you activate the selected view from a button and move the object (with CameraRotate.js enabled), the view will return to the position set from the camera before the button is clicked.

If you want to save views you have to set the parameters yourself using the following examples:

//Example code (untested) 
//Add this to the cameraRotate.js 
//Angles should be in radians 
var CameraView1 = new CameraPosition(new Vector3(0,0,0), 0.7, 0, 10); 
//Add this code to a button 
var context = getAnnots3D(0)[0].context3D; 
context.CameraController.setCameraPos(CameraView1); 


Related topics:

JavaScript

Top Searches:


2 comments

Comments for this tutorial are now closed.

Patty Friesen

6, 2013-03-05 05, 2013

Hi Karl,

Can you post your question in the Answers Q&A forum and perhaps one of our experts can answer it for you:

http://answers.acrobatusers.com/

Thanks,

Patty

Karl

10, 2013-02-27 27, 2013

One mistake found: CameraController != cameraController

I tried it several times, but it doesn’t work.

Isn’t it just possible to “get” the “camera position” when you click on a button and then “set” the “camera position”?

Comments for this tutorial are now closed.