I'm currently utilizing the OrtographicCamera
.
Within the HTML, a canvas
is declared and then passed to the renderer
like this:
var canvas = document.getElementById("canvas")
var width = canvas.clientWidth;
var height = canvas.clientHeight;
renderer = new THREE.WebGLRenderer({
antialias: true,
canvas: canvas
});
renderer.setClearColor(0xf0f0f0);
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(width, height);
An issue I am facing is that the cubes in my scene are being clipped.
The scene expands beyond the viewport's height. It would be ideal to have scrollbars that allow me to navigate to the bottom of the canvas and view all the cubes without needing to zoom in.
Please refer to the screenshot:
https://i.sstatic.net/zJphl.png
HTML
<div id="container">
<canvas id="canvas"></canvas>
</div>
CSS
#canvas
{
width: 100%;
height: 100%;
}
Any suggestions would be greatly appreciated.