Dubbox
Dubbox

Reputation: 243

Three-JS - Fullscreen change Size of renderer

I have made an ThreeJS application which is build to run in a 4:3 layout (there are many of buttons and so on). I would like to allow using Fullscreen via THREEx.Fullscreen.js. The Fullscreen mode is working, the problem I run into is, that the renderer.size(x,y) is changed into the screen size. Which is in my case a 16:9 layout.

So the question is, how to run ThreeJS fullscreen but still keep the renderer size?

Upvotes: 0

Views: 1361

Answers (1)

Geethu Jose
Geethu Jose

Reputation: 1993

Make the display property of your canvas element as

canvas{
display: block;
}

Upvotes: 4

Related Questions