Three.js find edges of visible scene
I am building an animation that requires spawning of elements outside of visible area so they can be thrown into the scene (for example a fountain that starts below the bottom of screen and elements are shooting into the scene).
I made some research for very simple solution and i found this code:
// Get half of the cameras field of view angle in radians
var fov = camera.fov / 180 * Math.PI / 2;
// Get the adjacent to calculate the opposite
// This assumes you are looking at the scene
var adjacent = camera.position.distanceTo( scene.position );
// Use trig to get the leftmost point (tangent = o / a)
var right = Math.tan( fov ) * adjacent * camera.aspect;
Now when i use it does seem to be working for both sides:
left: -right
right: right
But to find bottom edge (or top) with this its tricky as often it gives wrong position. For example i was making tests and when i've set window to be 850x920
the bottom edge is far into the scene.
Could someone help understand how to alter the code to help find all edges:
{
left: ???,
right: ???,
top: ???,
bottom: ???,
}
Maybe the bonus would be a better function where you could for example specify angle instead of just finding hard coded top, left etc...
something like:
let findPoint = (deg) => {
// deg passed for example 270 (top), 90 (bottom) or custom (315)
return // three.js coords (like 5.5, 3.4)
}
But the most important is basic function to work, Any help is welcomed.
On the snippet you can see the problem with top and bottom by using scroll and seeing how its spawned.
let SCENE_WIDTH = window.innerWidth;
let SCENE_HEIGHT = window.innerHeight;
let FIELD_OF_VIEW = 45;
let ASPECT = SCENE_WIDTH / SCENE_HEIGHT;
let NEAR = 0.1;
let FAR = 10000;
let scene = new THREE.Scene();
let renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0x8d8d8d, 1);
renderer.setSize(SCENE_WIDTH, SCENE_HEIGHT);
document.getElementById('webgl-container').appendChild(renderer.domElement);
let camera = new THREE.PerspectiveCamera(FIELD_OF_VIEW, ASPECT, NEAR, FAR);
camera.position.set(0, 0, 50);
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene.add(camera);
let light = new THREE.PointLight(0xffffff, 0.8);
light.position.set(30, 100, 50);
scene.add(light);
/* find edge */
let fov = camera.fov / 180 * Math.PI / 2;
let adjacent = camera.position.distanceTo( scene.position );
let right = Math.tan( fov ) * adjacent * camera.aspect;
/* right */
let geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material = new THREE.MeshPhongMaterial({color: 0x007bff});
let object = new THREE.Mesh( geometry, material );
object.position.x = right;
scene.add(object);
/* left */
let geometry2 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material2 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object2 = new THREE.Mesh( geometry2, material2 );
object2.position.x = -right;
scene.add(object2);
/* top */
let geometry3 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material3 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object3 = new THREE.Mesh( geometry3, material3 );
object3.position.y = right;
scene.add(object3);
/* bottom */
let geometry4 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material4 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object4 = new THREE.Mesh( geometry4, material4 );
object4.position.y = -right;
scene.add(object4);
let controls = new THREE.OrbitControls(camera, renderer.domElement);
function update () {
renderer.render(scene, camera);
requestAnimationFrame(update);
}
requestAnimationFrame(update);
#webgl-container {
position: absolute;
left: 0;
top: 0;
background-color: aqua;
}
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js"></script>
<div id="webgl-container"></div>
javascript math three.js trigonometry
add a comment |
I am building an animation that requires spawning of elements outside of visible area so they can be thrown into the scene (for example a fountain that starts below the bottom of screen and elements are shooting into the scene).
I made some research for very simple solution and i found this code:
// Get half of the cameras field of view angle in radians
var fov = camera.fov / 180 * Math.PI / 2;
// Get the adjacent to calculate the opposite
// This assumes you are looking at the scene
var adjacent = camera.position.distanceTo( scene.position );
// Use trig to get the leftmost point (tangent = o / a)
var right = Math.tan( fov ) * adjacent * camera.aspect;
Now when i use it does seem to be working for both sides:
left: -right
right: right
But to find bottom edge (or top) with this its tricky as often it gives wrong position. For example i was making tests and when i've set window to be 850x920
the bottom edge is far into the scene.
Could someone help understand how to alter the code to help find all edges:
{
left: ???,
right: ???,
top: ???,
bottom: ???,
}
Maybe the bonus would be a better function where you could for example specify angle instead of just finding hard coded top, left etc...
something like:
let findPoint = (deg) => {
// deg passed for example 270 (top), 90 (bottom) or custom (315)
return // three.js coords (like 5.5, 3.4)
}
But the most important is basic function to work, Any help is welcomed.
On the snippet you can see the problem with top and bottom by using scroll and seeing how its spawned.
let SCENE_WIDTH = window.innerWidth;
let SCENE_HEIGHT = window.innerHeight;
let FIELD_OF_VIEW = 45;
let ASPECT = SCENE_WIDTH / SCENE_HEIGHT;
let NEAR = 0.1;
let FAR = 10000;
let scene = new THREE.Scene();
let renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0x8d8d8d, 1);
renderer.setSize(SCENE_WIDTH, SCENE_HEIGHT);
document.getElementById('webgl-container').appendChild(renderer.domElement);
let camera = new THREE.PerspectiveCamera(FIELD_OF_VIEW, ASPECT, NEAR, FAR);
camera.position.set(0, 0, 50);
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene.add(camera);
let light = new THREE.PointLight(0xffffff, 0.8);
light.position.set(30, 100, 50);
scene.add(light);
/* find edge */
let fov = camera.fov / 180 * Math.PI / 2;
let adjacent = camera.position.distanceTo( scene.position );
let right = Math.tan( fov ) * adjacent * camera.aspect;
/* right */
let geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material = new THREE.MeshPhongMaterial({color: 0x007bff});
let object = new THREE.Mesh( geometry, material );
object.position.x = right;
scene.add(object);
/* left */
let geometry2 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material2 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object2 = new THREE.Mesh( geometry2, material2 );
object2.position.x = -right;
scene.add(object2);
/* top */
let geometry3 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material3 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object3 = new THREE.Mesh( geometry3, material3 );
object3.position.y = right;
scene.add(object3);
/* bottom */
let geometry4 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material4 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object4 = new THREE.Mesh( geometry4, material4 );
object4.position.y = -right;
scene.add(object4);
let controls = new THREE.OrbitControls(camera, renderer.domElement);
function update () {
renderer.render(scene, camera);
requestAnimationFrame(update);
}
requestAnimationFrame(update);
#webgl-container {
position: absolute;
left: 0;
top: 0;
background-color: aqua;
}
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js"></script>
<div id="webgl-container"></div>
javascript math three.js trigonometry
Try stackoverflow.com/questions/13350875/three-js-width-of-view/…
– WestLangley
Nov 23 '18 at 15:43
add a comment |
I am building an animation that requires spawning of elements outside of visible area so they can be thrown into the scene (for example a fountain that starts below the bottom of screen and elements are shooting into the scene).
I made some research for very simple solution and i found this code:
// Get half of the cameras field of view angle in radians
var fov = camera.fov / 180 * Math.PI / 2;
// Get the adjacent to calculate the opposite
// This assumes you are looking at the scene
var adjacent = camera.position.distanceTo( scene.position );
// Use trig to get the leftmost point (tangent = o / a)
var right = Math.tan( fov ) * adjacent * camera.aspect;
Now when i use it does seem to be working for both sides:
left: -right
right: right
But to find bottom edge (or top) with this its tricky as often it gives wrong position. For example i was making tests and when i've set window to be 850x920
the bottom edge is far into the scene.
Could someone help understand how to alter the code to help find all edges:
{
left: ???,
right: ???,
top: ???,
bottom: ???,
}
Maybe the bonus would be a better function where you could for example specify angle instead of just finding hard coded top, left etc...
something like:
let findPoint = (deg) => {
// deg passed for example 270 (top), 90 (bottom) or custom (315)
return // three.js coords (like 5.5, 3.4)
}
But the most important is basic function to work, Any help is welcomed.
On the snippet you can see the problem with top and bottom by using scroll and seeing how its spawned.
let SCENE_WIDTH = window.innerWidth;
let SCENE_HEIGHT = window.innerHeight;
let FIELD_OF_VIEW = 45;
let ASPECT = SCENE_WIDTH / SCENE_HEIGHT;
let NEAR = 0.1;
let FAR = 10000;
let scene = new THREE.Scene();
let renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0x8d8d8d, 1);
renderer.setSize(SCENE_WIDTH, SCENE_HEIGHT);
document.getElementById('webgl-container').appendChild(renderer.domElement);
let camera = new THREE.PerspectiveCamera(FIELD_OF_VIEW, ASPECT, NEAR, FAR);
camera.position.set(0, 0, 50);
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene.add(camera);
let light = new THREE.PointLight(0xffffff, 0.8);
light.position.set(30, 100, 50);
scene.add(light);
/* find edge */
let fov = camera.fov / 180 * Math.PI / 2;
let adjacent = camera.position.distanceTo( scene.position );
let right = Math.tan( fov ) * adjacent * camera.aspect;
/* right */
let geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material = new THREE.MeshPhongMaterial({color: 0x007bff});
let object = new THREE.Mesh( geometry, material );
object.position.x = right;
scene.add(object);
/* left */
let geometry2 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material2 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object2 = new THREE.Mesh( geometry2, material2 );
object2.position.x = -right;
scene.add(object2);
/* top */
let geometry3 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material3 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object3 = new THREE.Mesh( geometry3, material3 );
object3.position.y = right;
scene.add(object3);
/* bottom */
let geometry4 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material4 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object4 = new THREE.Mesh( geometry4, material4 );
object4.position.y = -right;
scene.add(object4);
let controls = new THREE.OrbitControls(camera, renderer.domElement);
function update () {
renderer.render(scene, camera);
requestAnimationFrame(update);
}
requestAnimationFrame(update);
#webgl-container {
position: absolute;
left: 0;
top: 0;
background-color: aqua;
}
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js"></script>
<div id="webgl-container"></div>
javascript math three.js trigonometry
I am building an animation that requires spawning of elements outside of visible area so they can be thrown into the scene (for example a fountain that starts below the bottom of screen and elements are shooting into the scene).
I made some research for very simple solution and i found this code:
// Get half of the cameras field of view angle in radians
var fov = camera.fov / 180 * Math.PI / 2;
// Get the adjacent to calculate the opposite
// This assumes you are looking at the scene
var adjacent = camera.position.distanceTo( scene.position );
// Use trig to get the leftmost point (tangent = o / a)
var right = Math.tan( fov ) * adjacent * camera.aspect;
Now when i use it does seem to be working for both sides:
left: -right
right: right
But to find bottom edge (or top) with this its tricky as often it gives wrong position. For example i was making tests and when i've set window to be 850x920
the bottom edge is far into the scene.
Could someone help understand how to alter the code to help find all edges:
{
left: ???,
right: ???,
top: ???,
bottom: ???,
}
Maybe the bonus would be a better function where you could for example specify angle instead of just finding hard coded top, left etc...
something like:
let findPoint = (deg) => {
// deg passed for example 270 (top), 90 (bottom) or custom (315)
return // three.js coords (like 5.5, 3.4)
}
But the most important is basic function to work, Any help is welcomed.
On the snippet you can see the problem with top and bottom by using scroll and seeing how its spawned.
let SCENE_WIDTH = window.innerWidth;
let SCENE_HEIGHT = window.innerHeight;
let FIELD_OF_VIEW = 45;
let ASPECT = SCENE_WIDTH / SCENE_HEIGHT;
let NEAR = 0.1;
let FAR = 10000;
let scene = new THREE.Scene();
let renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0x8d8d8d, 1);
renderer.setSize(SCENE_WIDTH, SCENE_HEIGHT);
document.getElementById('webgl-container').appendChild(renderer.domElement);
let camera = new THREE.PerspectiveCamera(FIELD_OF_VIEW, ASPECT, NEAR, FAR);
camera.position.set(0, 0, 50);
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene.add(camera);
let light = new THREE.PointLight(0xffffff, 0.8);
light.position.set(30, 100, 50);
scene.add(light);
/* find edge */
let fov = camera.fov / 180 * Math.PI / 2;
let adjacent = camera.position.distanceTo( scene.position );
let right = Math.tan( fov ) * adjacent * camera.aspect;
/* right */
let geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material = new THREE.MeshPhongMaterial({color: 0x007bff});
let object = new THREE.Mesh( geometry, material );
object.position.x = right;
scene.add(object);
/* left */
let geometry2 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material2 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object2 = new THREE.Mesh( geometry2, material2 );
object2.position.x = -right;
scene.add(object2);
/* top */
let geometry3 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material3 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object3 = new THREE.Mesh( geometry3, material3 );
object3.position.y = right;
scene.add(object3);
/* bottom */
let geometry4 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material4 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object4 = new THREE.Mesh( geometry4, material4 );
object4.position.y = -right;
scene.add(object4);
let controls = new THREE.OrbitControls(camera, renderer.domElement);
function update () {
renderer.render(scene, camera);
requestAnimationFrame(update);
}
requestAnimationFrame(update);
#webgl-container {
position: absolute;
left: 0;
top: 0;
background-color: aqua;
}
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js"></script>
<div id="webgl-container"></div>
let SCENE_WIDTH = window.innerWidth;
let SCENE_HEIGHT = window.innerHeight;
let FIELD_OF_VIEW = 45;
let ASPECT = SCENE_WIDTH / SCENE_HEIGHT;
let NEAR = 0.1;
let FAR = 10000;
let scene = new THREE.Scene();
let renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0x8d8d8d, 1);
renderer.setSize(SCENE_WIDTH, SCENE_HEIGHT);
document.getElementById('webgl-container').appendChild(renderer.domElement);
let camera = new THREE.PerspectiveCamera(FIELD_OF_VIEW, ASPECT, NEAR, FAR);
camera.position.set(0, 0, 50);
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene.add(camera);
let light = new THREE.PointLight(0xffffff, 0.8);
light.position.set(30, 100, 50);
scene.add(light);
/* find edge */
let fov = camera.fov / 180 * Math.PI / 2;
let adjacent = camera.position.distanceTo( scene.position );
let right = Math.tan( fov ) * adjacent * camera.aspect;
/* right */
let geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material = new THREE.MeshPhongMaterial({color: 0x007bff});
let object = new THREE.Mesh( geometry, material );
object.position.x = right;
scene.add(object);
/* left */
let geometry2 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material2 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object2 = new THREE.Mesh( geometry2, material2 );
object2.position.x = -right;
scene.add(object2);
/* top */
let geometry3 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material3 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object3 = new THREE.Mesh( geometry3, material3 );
object3.position.y = right;
scene.add(object3);
/* bottom */
let geometry4 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material4 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object4 = new THREE.Mesh( geometry4, material4 );
object4.position.y = -right;
scene.add(object4);
let controls = new THREE.OrbitControls(camera, renderer.domElement);
function update () {
renderer.render(scene, camera);
requestAnimationFrame(update);
}
requestAnimationFrame(update);
#webgl-container {
position: absolute;
left: 0;
top: 0;
background-color: aqua;
}
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js"></script>
<div id="webgl-container"></div>
let SCENE_WIDTH = window.innerWidth;
let SCENE_HEIGHT = window.innerHeight;
let FIELD_OF_VIEW = 45;
let ASPECT = SCENE_WIDTH / SCENE_HEIGHT;
let NEAR = 0.1;
let FAR = 10000;
let scene = new THREE.Scene();
let renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0x8d8d8d, 1);
renderer.setSize(SCENE_WIDTH, SCENE_HEIGHT);
document.getElementById('webgl-container').appendChild(renderer.domElement);
let camera = new THREE.PerspectiveCamera(FIELD_OF_VIEW, ASPECT, NEAR, FAR);
camera.position.set(0, 0, 50);
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene.add(camera);
let light = new THREE.PointLight(0xffffff, 0.8);
light.position.set(30, 100, 50);
scene.add(light);
/* find edge */
let fov = camera.fov / 180 * Math.PI / 2;
let adjacent = camera.position.distanceTo( scene.position );
let right = Math.tan( fov ) * adjacent * camera.aspect;
/* right */
let geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material = new THREE.MeshPhongMaterial({color: 0x007bff});
let object = new THREE.Mesh( geometry, material );
object.position.x = right;
scene.add(object);
/* left */
let geometry2 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material2 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object2 = new THREE.Mesh( geometry2, material2 );
object2.position.x = -right;
scene.add(object2);
/* top */
let geometry3 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material3 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object3 = new THREE.Mesh( geometry3, material3 );
object3.position.y = right;
scene.add(object3);
/* bottom */
let geometry4 = new THREE.TorusGeometry( 10, 3, 16, 100 );
let material4 = new THREE.MeshPhongMaterial({color: 0x007bff});
let object4 = new THREE.Mesh( geometry4, material4 );
object4.position.y = -right;
scene.add(object4);
let controls = new THREE.OrbitControls(camera, renderer.domElement);
function update () {
renderer.render(scene, camera);
requestAnimationFrame(update);
}
requestAnimationFrame(update);
#webgl-container {
position: absolute;
left: 0;
top: 0;
background-color: aqua;
}
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js"></script>
<div id="webgl-container"></div>
javascript math three.js trigonometry
javascript math three.js trigonometry
edited Nov 23 '18 at 8:05
Mevia
asked Nov 23 '18 at 7:57
MeviaMevia
367422
367422
Try stackoverflow.com/questions/13350875/three-js-width-of-view/…
– WestLangley
Nov 23 '18 at 15:43
add a comment |
Try stackoverflow.com/questions/13350875/three-js-width-of-view/…
– WestLangley
Nov 23 '18 at 15:43
Try stackoverflow.com/questions/13350875/three-js-width-of-view/…
– WestLangley
Nov 23 '18 at 15:43
Try stackoverflow.com/questions/13350875/three-js-width-of-view/…
– WestLangley
Nov 23 '18 at 15:43
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442672%2fthree-js-find-edges-of-visible-scene%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442672%2fthree-js-find-edges-of-visible-scene%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try stackoverflow.com/questions/13350875/three-js-width-of-view/…
– WestLangley
Nov 23 '18 at 15:43