You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to disable camera interpolation when changing camera orbital position #454
As of #452 users can configure the current camera orbital position with an attribute. By default (and partially as a consequence of how camera control works generally), when the position is configured to a new value, the camera interpolates to the new position (only on subsequent changes, not for the initial value).
This is a sound default, but we should also offer a way for users to opt out of this interpolation if they wish.
3 years on, when using the example provided in docs (see below), and allowing camera-controls, the interpolation is still forced on the user even while changing positions, this yanks the user's view. Maybe I misunderstood how to use the method?
I was able to fix the example code like so:
(() => {
const modelViewer = this.threeD_model.nativeElement;
const orbitCycle = [
'45deg 55deg 4m',
'-60deg 110deg 2m',
modelViewer.cameraOrbit
];
setInterval(() => {
// define a var or method to check if your model has a mouse-down event
if (!this.is_3d_model_clicked) {
const currentOrbitIndex = orbitCycle.indexOf(modelViewer.cameraOrbit);
modelViewer.cameraOrbit = orbitCycle[(currentOrbitIndex + 1) % orbitCycle.length];
}
}, 3000);
})();
In Angular2, the framework makes it very easy to set a check to see if the 3D model is being viewed, like so:
I can't figure out what you're trying to achieve. What is "the method"? Can you show what the desired behavior is and what behavior you're getting instead? Also, please open a new discussion, since closed issues are not very visible.
Activity
elalish commentedon May 3, 2019
As part of #526, I added a jumpToTarget() method on SmoothControls for this purpose internally. Perhaps we can use that.
elalish commentedon May 7, 2019
It's now called jumpCamera(), and it's a public method, so I'm tempted to close this as fixed when we merge #526.
cdata commentedon May 7, 2019
This is a feature issue so unless it's user-facing we should not close it.
sam-hajj commentedon Apr 9, 2022
3 years on, when using the example provided in docs (see below), and allowing
camera-controls, the interpolation is still forced on the user even while changing positions, this yanks the user's view. Maybe I misunderstood how to use the method?I was able to fix the example code like so:
In Angular2, the framework makes it very easy to set a check to see if the 3D model is being viewed, like so:
However this is just a messy quick fix
elalish commentedon Apr 11, 2022
I can't figure out what you're trying to achieve. What is "the method"? Can you show what the desired behavior is and what behavior you're getting instead? Also, please open a new discussion, since closed issues are not very visible.