Author Topic: Viewport size  (Read 275 times)

Florian BERNARD   «   on: May 30, 2012, 06:36:22 AM »
Hi,

Is it possible to specify a viewport size? I mean, if I want my scene to be not fullscreen.

Cheers

Ivan Vodopiviz   «   Reply #1 on: May 30, 2012, 10:08:49 AM »
Hi,

You can do this:

_scene.setViewport( 50, 50, 400, 300 ); // x, y, width, height

That way you can center / resize your viewport as you wish.

Regards,

Florian BERNARD   «   Reply #2 on: May 30, 2012, 12:53:37 PM »
Ok thank you.

For those would read this post: you must do setViewport once the Scene3D triggered the Scene3D.COMPLETE_EVENT event, or you'll get an error.

Regards