Open mimooh opened 5 years ago
I would like to second that. I'm trying to move camera along CameraAnimationPath - but with no success - it's almost impossible to guess the numbers for settings. It took me long time just to position static camera in the scene the way i wanted. But for animation? How can i do this? Maybe some generator or some way i can mesure that? I was already trying to getCameraMatrix to identify current camera position - but i don't really get the array... maybe i'm to dumb for it.
Anyhow - the plugin is great i believe it will beat three.js - much better performance.
Ok i'll find a way for that. Just add to your script:
camera.on("matrix", function(matrix) { console.log(camera.eye); console.log(camera.look); console.log(camera.up); });
Then when you set your camera with mouse you will get parameters for all those variables :)
I use this function to get the current camera position
function _getCameraPos() {
return {
eye: [..._camera.eye],
look: [..._camera.look],
up: [..._camera.up],
};
}
where
_camera = scene.camera;
Hi, awesome lib. Seems faster than threejs for basic buliding models. Perhaps it's not the right place, but since I cannot find any forum: what would be the procedure (if it's possible) to achieve this: Say I have a cube. Find the position for the ortho camera, so that the rendered image is say 30x30 pixels square (camera looking at my cube from the top, displaying a single face of the cube, rendered at the size given). I am not asking for the code if that's not quick one, just for the idea.