And three.js has this function
v3d.js
also has this function. You can find the same info here
soft8soft.com/docs/api/en/cameras/PerspectiveCamera.html#setViewOffset
In fact, it’s a clone of three.js
with several additional features )))
it would be nice to also be able to control it with a puzzle in verge3d
You can control it using only 3 lines of code inside the execscript
puzzle.
const width = app.renderer.domElement.width;
const height = app.renderer.domElement.height;
app.camera.setViewOffset(width, height, offsetX, offsetY, width, height);
to make sure that the above left and right are Top and Bottom half?
check the browser window orientation
if (!window.screen.orientation.type.indexOf('landscape')) {
console.log('it\'s a landscape (horizontal) mode');
} else {
console.log('it\'s a portrait (vertical) mode');
}
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.