Print at Jan 20, 2022, 10:59:12 PM

Posted by Puybaret at Oct 18, 2019, 5:35:17 PM
Re: Export to HTML5 plug-in
There's no parameter to tell the size of the opened canvas in the viewHomeInOverlay version. Its size is 90% of the available space.
You could change the source code of viewHomeInOverlay but generate updated .js code might be complicate for you.
Another solution could be to copy paste viewHomeInOverlay in your page, rename it and change the following part of the code:
var canvas = document.getElementById("viewerCanvas");
if (windowWidth < windowHeight * widthByHeightRatio) {
canvas.width = 0.9 * windowWidth;
canvas.height = 0.9 * windowWidth / widthByHeightRatio;
} else {
canvas.height = 0.9 * windowHeight;
canvas.width = 0.9 * windowHeight * widthByHeightRatio;
}
to:
var canvas = document.getElementById("viewerCanvas");
canvas.width = pageWidth;
canvas.height = pageHeight;

There are probably other parameters to adjust to take into account scroll bars.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer