- I'm still a little confused about the lookAt and up functions of the
camera three.js API, specifically up.set.
Well,
up
isn't a function; it's a property of the camera: a vector that determines how the camera is oriented.LookAt
is a method that turns the camera to face a given point, preservingposition
andup
. - I hope to talk more about the fovy and lookat, and how we should
approach the numbers when we saw different perspective of the same object.
FOVY is how zoomed in the camera is.
- Can you go over how to use keyboard events to call functions and
re-render the scene?
Here's the basic idea:
function randCam() { // overwrite the global used by the render function camera = new THREE.PerspectiveCamera( ?, ?, ?, ?); camera.position.set(?,?,?); camera.up.set(?,?,?); camera.lookAt(new THREE.Vector3(?,?,?); render(); } TW.setKeyboardCallback("c", randCam, "sets up a random camera");
- Also, can you go over using up in various combinations, ie how to
think about (1, 1, 0) or (1, 1, 1) when setting the up?
I'd be glad to.
- Feeling good, would like to go over the final question of the Math problem
set in class though.
The triangle with colors on each vertex and a vertex in the interior with specified distances? Sure!
- The teddy bear camera demo is very useful for visualizing the camera
and how the variables work together! Will we be having similar demos for
future concepts?
Whenever I can!