ParabolaBall.js 1.9 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/parabolaBall/ParabolaBall"],{"158e":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={props:{size:{type:Number,default:20},color:{type:String,default:"#f5222d"},zIndex:{type:Number,default:999},duration:{type:Number,default:500}},data:function(){return{dots:[]}},methods:{showBall:function(t){var e=this,n=t.start,a=(t.end,t.src);return new Promise((function(t){var r=e.dots.find((function(t){return!t.show}));r||(r={src:"",left:0,top:0,show:!1},e.dots.push(r));var o=e.duration,u=n.x-e.size/2,i=n.y-e.size/2,s=50-e.size/2,f=640-e.size/2,c=Date.now(),l=s-u,d=f-i,b=-2*l/(o*o)/5,p=Math.abs(b),v=l/o-b*o/2,h=d/o-p*o/2;r.src=a,r.show=!0,function e(){var n=Date.now()-c,a=u+(v*n+b*n*n/2),s=i+(h*n+p*n*n/2);r.left=a,r.top=s,n<o?setTimeout(e):(r.show=!1,t())}()}))}}};e.default=a},"34e3":function(t,e,n){"use strict";n.r(e);var a=n("ac7a"),r=n("9dbb");for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var u=n("f0c5"),i=Object(u["a"])(r["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=i.exports},"9dbb":function(t,e,n){"use strict";n.r(e);var a=n("158e"),r=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=r.a},ac7a:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement;this._self._c},r=[]}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/parabolaBall/ParabolaBall-create-component',
  4. {
  5. 'components/parabolaBall/ParabolaBall-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("34e3"))
  7. })
  8. },
  9. [['components/parabolaBall/ParabolaBall-create-component']]
  10. ]);