How to define object size based on size container?

Software: Away3D 3.x

mqj, Newbie
Posted: 24 October 2013 10:51 PM   Total Posts: 1

I am very new to Away3D and I need to make a chance to an existing application my company has.

We are generating 3D previews of our products, we display them on our website. Originally, the flash component was being displayed inside a DIV container with a fixed size, so the person who develop the 3D previews for each product set the camera zoom, focus and distance as fixed values for each product in a way that they would look fine in the container. However, now the DIV container is created with a dynamic size based on the user’s screen, so in some cases the 3D previews look too big so we need a way to calculate the zoom or distance based on the DIV container size, but the size of the container is expressed in pixels.

How can I relate those pixel values to the camera zoom or distance? Is there a formula that I can use to calculate those values based on the width and height of the DIV container so the 3d object is rendered in the correct size ?

Thanks!!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X