[core] Added mbgl::util::DEFAULT_TRANSITION_EASE
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/util/chrono.hpp>
|
||||
#include <mbgl/util/unitbezier.hpp>
|
||||
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
@@ -40,6 +41,8 @@ constexpr uint64_t DEFAULT_MAX_CACHE_SIZE = 50 * 1024 * 1024;
|
||||
constexpr Duration DEFAULT_FADE_DURATION = Milliseconds(300);
|
||||
constexpr Seconds CLOCK_SKEW_RETRY_TIMEOUT { 30 };
|
||||
|
||||
constexpr UnitBezier DEFAULT_TRANSITION_EASE = { 0, 0, 0.25, 1 };
|
||||
|
||||
} // namespace util
|
||||
|
||||
namespace debug {
|
||||
|
||||
@@ -584,7 +584,7 @@ void Transform::startTransition(const CameraOptions& camera,
|
||||
if (t >= 1.0) {
|
||||
result = frame(1.0);
|
||||
} else {
|
||||
util::UnitBezier ease = animation.easing ? *animation.easing : util::UnitBezier(0, 0, 0.25, 1);
|
||||
util::UnitBezier ease = animation.easing ? *animation.easing : util::DEFAULT_TRANSITION_EASE;
|
||||
result = frame(ease.solve(t, 0.001));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user