Comments (2)
The function applyCameraUp triggers several calculations, as seen here:
camera-controls/src/CameraControls.ts
Lines 2475 to 2491 in cf39295
I am concerned that making it animatable within the tick function might lead to performance issues.
Typically, changing the camera's up direction is uncommon in regular usage, so it might be more efficient to handle this as a separate function and call it only when necessary.
What are your thoughts on this approach?
from camera-controls.
I've also had some issues with this. For me it's mostly about updateCameraUp().
I use a six view system, where a view looking along each axis can be selected. Moving to a view that looks directly towards the previous camera up requires me to change the camera up so that camera orbiting does something useful. So I select a new camera up vector, do an updateCameraUp(), then perform a setLookAt() with a transition.
On the surface, this is fine, as setLookAt only uses the new _yAxisUpSpace to set _sphericalEnd. But it seems the update() function also uses _yAxisUpSpace during the transition, even though the original orientation was built with the previous camera up value. So the transition "snaps" then moves.
Not a biggie really, as I just don't use a transition if I change the camera's up value. Just mentioning it as it may not be such an obscure request as it may seem. Not sure of an easy solution to it though, given the update() function's reliance on _yAxisUpSpace.
from camera-controls.
Related Issues (20)
- It would be nice to have setFov method with smooth transition HOT 2
- Control functions skip frames when frameloop = demand HOT 3
- setFocalOffset -- How to keep the model always facing the screen HOT 2
- Use .isSphere instead of "instanceof Sphere" HOT 2
- The automated release is failing 🚨 HOT 1
- Can you add an "autoRotate" function, like OrbitControls in Threejs? HOT 2
- moveTo changes target incorrectly
- using "isSphere" requires three.js version compatibility bump to r160 HOT 3
- Collision detection is abnormal HOT 3
- Behavior similar to three.js Trackball Controls HOT 1
- Trackpad Zoom/Scroll so slow in Orthographic Camera HOT 1
- Invert Colliders HOT 4
- Truck/Controls Event Listener Disappears after Clicking Twice HOT 2
- Forward scroll slower than Backward scroll motion in Infinite Dolly mode HOT 2
- On the initial start the only one control that is working is left mouse button until changing of the initial position of the camera. HOT 2
- Use CSS to complete the screen flip, and the camera is adapted HOT 2
- How to keep the center position of the orbit unchanged when using InfinityDolly?
- Method to stop transitions? HOT 1
- smoothTime doesn't work with dollyInFixed (infinite dolly) after user input on Mobile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camera-controls.