motionUtil.js 203 B

123456789
  1. export function getMotion(mode, motion, defaultMotions) {
  2. if (motion) {
  3. return motion;
  4. }
  5. if (defaultMotions) {
  6. return defaultMotions[mode] || defaultMotions.other;
  7. }
  8. return undefined;
  9. }