{"ast":null,"code":"import { smoothFrame } from './smooth-frame.js';\nimport { getFrameData } from 'framesync';\nvar smooth = function smooth(strength) {\n  if (strength === void 0) {\n    strength = 50;\n  }\n  var previousValue = 0;\n  var lastUpdated = 0;\n  return function (v) {\n    var currentFramestamp = getFrameData().timestamp;\n    var timeDelta = currentFramestamp !== lastUpdated ? currentFramestamp - lastUpdated : 0;\n    var newValue = timeDelta ? smoothFrame(previousValue, v, timeDelta, strength) : previousValue;\n    lastUpdated = currentFramestamp;\n    previousValue = newValue;\n    return newValue;\n  };\n};\nexport { smooth };","map":{"version":3,"names":["smoothFrame","getFrameData","smooth","strength","previousValue","lastUpdated","v","currentFramestamp","timestamp","timeDelta","newValue"],"sources":["D:/DSP_Management/node_modules/popmotion/dist/es/utils/smooth.js"],"sourcesContent":["import { smoothFrame } from './smooth-frame.js';\nimport { getFrameData } from 'framesync';\n\nvar smooth = function (strength) {\n    if (strength === void 0) { strength = 50; }\n    var previousValue = 0;\n    var lastUpdated = 0;\n    return function (v) {\n        var currentFramestamp = getFrameData().timestamp;\n        var timeDelta = currentFramestamp !== lastUpdated ? currentFramestamp - lastUpdated : 0;\n        var newValue = timeDelta\n            ? smoothFrame(previousValue, v, timeDelta, strength)\n            : previousValue;\n        lastUpdated = currentFramestamp;\n        previousValue = newValue;\n        return newValue;\n    };\n};\n\nexport { smooth };\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,WAAW;AAExC,IAAIC,MAAM,GAAG,SAATA,MAAMA,CAAaC,QAAQ,EAAE;EAC7B,IAAIA,QAAQ,KAAK,KAAK,CAAC,EAAE;IAAEA,QAAQ,GAAG,EAAE;EAAE;EAC1C,IAAIC,aAAa,GAAG,CAAC;EACrB,IAAIC,WAAW,GAAG,CAAC;EACnB,OAAO,UAAUC,CAAC,EAAE;IAChB,IAAIC,iBAAiB,GAAGN,YAAY,CAAC,CAAC,CAACO,SAAS;IAChD,IAAIC,SAAS,GAAGF,iBAAiB,KAAKF,WAAW,GAAGE,iBAAiB,GAAGF,WAAW,GAAG,CAAC;IACvF,IAAIK,QAAQ,GAAGD,SAAS,GAClBT,WAAW,CAACI,aAAa,EAAEE,CAAC,EAAEG,SAAS,EAAEN,QAAQ,CAAC,GAClDC,aAAa;IACnBC,WAAW,GAAGE,iBAAiB;IAC/BH,aAAa,GAAGM,QAAQ;IACxB,OAAOA,QAAQ;EACnB,CAAC;AACL,CAAC;AAED,SAASR,MAAM","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}