Skip to content

Commit

Permalink
fix(CameraUtils): CameraTransformOptions parameter stopPlaceOnGroundA…
Browse files Browse the repository at this point in the history
…tEnd is no longer overriden
  • Loading branch information
mgermerie authored and gchoqueux committed Aug 2, 2021
1 parent 011fcbc commit 7f3a542
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Utils/CameraUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export default {
* @property {boolean} [proxy=true] use proxy to handling camera's transformation. if proxy == true, other camera's transformation stops rig's transformation
* @property {Number} [easing=TWEEN.Easing.Quartic.InOut] in and out easing animation
* @property {function} [callback] callback call each animation's frame (params are current cameraTransform and worldTargetPosition)
* @property {boolean} [stopPlaceOnGroundAtEnd=defaultStopPlaceOnGroundAtEnd] stop place target on the ground at animation ending
* @property {boolean} [stopPlaceOnGroundAtEnd=false] stop place target on the ground at animation ending
*/
/**
* Default value for option to stop place target
Expand Down Expand Up @@ -478,14 +478,14 @@ export default {
rig.setProxy(view, camera);
}
return rig.animateCameraToLookAtTarget(view, camera, params).promise.then((finished) => {
const params = rig.getParams();
const stopPlaceOnGround = params.stopPlaceOnGroundAtEnd === undefined ?
this.defaultStopPlaceOnGroundAtEnd : params.stopPlaceOnGroundAtEnd;
const newTransformation = rig.getParams();
if (stopPlaceOnGround) {
rig.stop(view);
}
params.finished = finished;
return params;
newTransformation.finished = finished;
return newTransformation;
});
},

Expand Down

0 comments on commit 7f3a542

Please sign in to comment.