LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
CSS
body,
html {
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  width: 100%;
}

*{
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.scene {
  position: absolute;
  display: inline-block;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  margin-left: -95px;
  margin-top: -115px;
}
.torch-scene {
  position: relative;
}
.canvas {
  width: 600px;
  height: 450px;
  margin: 0 auto;
  display: block;
  position: relative;
  z-index: 2;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  margin: 0 auto;
}
.shadow {
  width: 700px;
  height: 700px;
  background: transparent url("../i/shadow.svg") no-repeat center center;
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  margin-left: -350px;
  margin-top: -311.1111111111111px;
  -webkit-transform: scale(0) translateY(300px);
  transform: scale(0) translateY(300px);
}
.torch {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -130px;
  margin-left: -11px;
  width: 73px;
  height: 144px;
  cursor: move;
  background: transparent url("../i/torch.svg") no-repeat center center;
  opacity: 0;
}
.jelly-torch {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-top: -80px;
  margin-left: 140px;
  z-index: 3;
}
.by {
  position: absolute;
  right: -84px;
  bottom: 40px;
  width: 35px;
  height: 32px;
  background: transparent url("../i/by.svg") no-repeat center center;
  z-index: 3;
  display: none;
  opacity: 0;
}
.legend {
  width: 334px;
  height: 292px;
  background: transparent url("https://is.gd/0FWzSF") no-repeat center center;
  top: 215px;
  left: 112px;
  position: absolute;
  z-index: 4;
  opacity: 0;
}

.shadow {
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjcwMHB4IiBoZWlnaHQ9I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pIiBmaWxsPSIjNEE0QTRBIiBmb250LWZhbWlseT0iJ09wZW5TYW5zJyIgZm9udC1zaXplPSIxMSI+IDwvdGV4dD4NCjxnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgICAgIj4NCgk8cGF0aCBmaWxsPSIjNEE0QTRBIiBkPSJNNy4yNTEsMjAuMTEzaDAuOTU2bDEuMjg5LDMuMzU3YzAuMjgzLDAuNzY2LDAuNDU4LDEuMzE5LDAuNTI2LDEuNjU5aDAuMDQzDQoJCWMwLjA0Ni0wLjE4MywwLjE0NC0wLjQ5NSwwLjI5My0wLjkzOGMwLjE0OC0wLjQ0MiwwLjYzNC0xLjgwMiwxLjQ1OC00LjA3OWgwLjk1NmwtMi41Myw2LjcwM2MtMC4yNSwwLjY2Mi0wLjU0MywxLjEzMy0wLjg3OCwxLjQxDQoJCWMtMC4zMzQsMC4yNzctMC43NDYsMC40MTYtMS4yMzIsMC40MTZjLTAuMjcyLDAtMC41NDEtMC4wMy0wLjgwNi0wLjA5MnYtMC43MTRjMC4xOTcsMC4wNDMsMC40MTcsMC4wNjQsMC42NjEsMC4wNjQNCgkJYzAuNjEyLDAsMS4wNDktMC4zNDQsMS4zMTEtMS4wMzFsMC4zMjgtMC44MzhMNy4yNTEsMjAuMTEzeiIvPg0KPC9nPg0KPC9zdmc+DQo=');
}
JS
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 1) {
      this.top.x = topX;
      this.top.y = topY;
      this.delta = this.getDelta();
      this.p = 0;
    }
    this.drawFlickBounds();
  };

  Ember.prototype.drawFlickBounds = function() {
    var x, y;
    return;
    this.ctx.beginPath();
    x = this.flickCenter.x * h.PX;
    y = this.flickCenter.y * h.PX;
    this.ctx.arc(x, y, this.flickRadius, 0, 2 * Math.PI);
    this.ctx.lineWidth = h.PX / 2;
    this.ctx.strokeStyle = '#777';
    this.ctx.stroke();
  };

  Ember.prototype.getFlickBounds = function() {
    var PX, flickCenter, flickRadius;
    PX = 2;
    flickCenter = {
      x: this.basePoint.x,
      y: this.basePoint.y
    };
    flickRadius = this.flickRadius * PX;
    this.flickCenter = flickCenter;
    this.flickCenterStart = {};
    this.flickCenterStart.x = flickCenter.x;
    this.flickCenterStart.y = flickCenter.y;
    this.flickRadius = flickRadius;
  };

  Ember.prototype.getDelta = function() {
    var ang, bAng, cX, cY, delta, newTop, oX, oY, rX, rY, speed, suppress;
    suppress = Math.abs(this.base.suppress);
    if (this.base.suppress > 0) {
      suppress /= 2;
    }
    speed = Math.abs(this.base.angle);
    this.speed = 60 - Math.max(speed, suppress);
    this.angle += this.angleStep / this.speed;
    ang = this.angle;
    rX = .1 * this.flickRadius;
    rY = 1 * this.flickRadius;
    cX = this.flickCenter.x;
    cY = this.flickCenter.y;
    bAng = this.base.angle * h.DEG;
    oX = cX - (rY * this.sin(ang)) * this.sin(bAng) + rX * this.cos(ang) * this.cos(bAng);
    oY = cY + (rX * this.cos(ang)) * this.sin(bAng) + rY * this.sin(ang) * this.cos(bAng);
    newTop = {
      x: oX,
      y: oY
    };
    return delta = {
      x: newTop.x - this.top.x,
      y: newTop.y - this.top.y
    };
  };

  Ember.prototype.sin = function(n) {
    return Math.sin.apply(n, arguments);
  };

  Ember.prototype.cos = function(n) {
    return Math.cos.apply(n, arguments);
  };

  return Ember;

})();

module.exports = Ember;



},{"./helpers":5,"./tweenjs.min":11}],4:[function(require,module,exports){
/*! Hammer.JS - v2.0.4 - 2014-09-28
 * https://hammerjs.github.io/
 *
 * Copyright (c) 2014 Jorik Tangelder;
 * Licensed under the MIT license */
!function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(k(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e-1}function r(a){return a.trim().split(/\s+/g)}function s(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function v(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=E(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=F(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=J(h,i),b.distance=I(h,i),C(c,b),b.offsetDirection=H(b.deltaX,b.deltaY),b.scale=g?L(g.pointers,d):1,b.rotation=g?K(g.pointers,d):0,D(c,b);var j=a.element;p(b.srcEvent.target,j)&&(j=b.srcEvent.target),b.target=j}function C(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===yb||f.eventType===Ab)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function D(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Bb&&(i>xb||h.velocity===d)){var j=h.deltaX-b.deltaX,k=h.deltaY-b.deltaY,l=G(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=H(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function E(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function G(a,b,c){return{x:b/a||0,y:c/a||0}}function H(a,b){return a===b?Cb:mb(a)>=mb(b)?a>0?Db:Eb:b>0?Fb:Gb}function I(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function J(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function K(a,b){return J(b[1],b[0],Lb)-J(a[1],a[0],Lb)}function L(a,b){return I(b[0],b[1],Lb)/I(a[0],a[1],Lb)}function M(){this.evEl=Nb,this.evWin=Ob,this.allow=!0,this.pressed=!1,y.apply(this,arguments)}function N(){this.evEl=Rb,this.evWin=Sb,y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=Ub,this.evWin=Vb,this.started=!1,y.apply(this,arguments)}function P(a,b){var c=t(a.touches),d=t(a.changedTouches);return b&(Ab|Bb)&&(c=u(c.concat(d),"identifier",!0)),[c,d]}function Q(){this.evTarget=Xb,this.targetIds={},y.apply(this,arguments)}function R(a,b){var c=t(a.touches),d=this.targetIds;if(b&(yb|zb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=t(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return p(a.target,i)}),b===yb)for(e=0;eh&&(b.push(a),h=b.length-1):e&(Ab|Bb)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Tb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Ub="touchstart",Vb="touchstart touchmove touchend touchcancel";j(O,y,{handler:function(a){var b=Tb[a.type];if(b===yb&&(this.started=!0),this.started){var c=P.call(this,a,b);b&(Ab|Bb)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}});var Wb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Xb="touchstart touchmove touchend touchcancel";j(Q,y,{handler:function(a){var b=Wb[a.type],c=R.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}),j(S,y,{handler:function(a,b,c){var d=c.pointerType==tb,e=c.pointerType==vb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Ab|Bb)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Yb=v(jb.style,"touchAction"),Zb=Yb!==d,$b="compute",_b="auto",ac="manipulation",bc="none",cc="pan-x",dc="pan-y";T.prototype={set:function(a){a==$b&&(a=this.compute()),Zb&&(this.manager.element.style[Yb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){l(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),U(a.join(" "))},preventDefaults:function(a){if(!Zb){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=q(d,bc),f=q(d,dc),g=q(d,cc);return e||f&&c&Hb||g&&c&Ib?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var ec=1,fc=2,gc=4,hc=8,ic=hc,jc=16,kc=32;V.prototype={defaults:{},set:function(a){return h(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=Y(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=Y(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=Y(a,this),-1===s(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=Y(a,this);var b=s(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(c.options.event+(b?W(d):""),a)}var c=this,d=this.state;hc>d&&b(!0),b(),d>=hc&&b(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=kc)},canEmit:function(){for(var a=0;af?Db:Eb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Cb:0>g?Fb:Gb,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Z.prototype.attrTest.call(this,a)&&(this.state&fc||!(this.state&fc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),j(_,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&fc)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),j(ab,V,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[_b]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Ab|Bb)&&!f)this.reset();else if(a.eventType&yb)this.reset(),this._timer=e(function(){this.state=ic,this.tryEmit()},b.time,this);else if(a.eventType&Ab)return ic;return kc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===ic&&(a&&a.eventType&Ab?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),j(bb,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&fc)}}),j(cb,Z,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Hb|Ib,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Hb|Ib)?b=a.velocity:c&Hb?b=a.velocityX:c&Ib&&(b=a.velocityY),this._super.attrTest.call(this,a)&&c&a.direction&&a.distance>this.options.threshold&&mb(b)>this.options.velocity&&a.eventType&Ab},emit:function(a){var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),j(db,V,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ac]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance 0) {
      if (val > max) {
        return max;
      }
    }
    return val;
  };

  Helpers.prototype.transform = function(el, val) {
    el.style["" + this.prefix.js + "Transform"] = val;
    return el.style.transform = val;
  };

  function Helpers() {
    this.vars();
  }

  Helpers.prototype.vars = function() {
    this.prefix = this.getPrefix();
    return this.isFF = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
  };

  Helpers.prototype.getPrefix = function() {
    var dom, pre, styles, v;
    styles = window.getComputedStyle(document.documentElement, "");
    v = Array.prototype.slice.call(styles).join("").match(/-(moz|webkit|ms)-/);
    pre = (v || (styles.OLink === "" && ["", "o"]))[1];
    dom = "WebKit|Moz|MS|O".match(new RegExp("(" + pre + ")", "i"))[1];
    return {
      dom: dom,
      lowercase: pre,
      css: "-" + pre + "-",
      js: pre[0].toUpperCase() + pre.substr(1)
    };
  };

  return Helpers;

})();

module.exports = new Helpers;



},{}],6:[function(require,module,exports){
var Base, BasePoint, Ember, Hammer, Main, Shadow, Shaker, Spark, TWEEN, h, mojs;

Ember = require('./ember');

Spark = require('./spark');

Hammer = require('./hammer.min');

TWEEN = require('./tweenjs.min');

Base = require('./base');

BasePoint = require('./base-point');

Shadow = require('./shadow');

Shaker = require('./shaker');

h = require('./helpers');

mojs = require('./mojs.min');

Main = (function() {
  function Main(o) {
    this.o = o != null ? o : {};
    this.vars();
    this.prepareText();
    this.events();
    this.run();
    this.showTorch();
  }

  Main.prototype.stopNormalizingBase = function() {
    TWEEN.remove(this.tween);
    return this.isNormalizing = false;
  };

  Main.prototype.events = function() {
    var currTorchX, currTorchXOld, dir, isTouched, mc, tch, timeout, tm, torchSceneX;
    mc = new Hammer(document.body);
    tch = new Hammer(this.torch);
    isTouched = false;
    timeout = null;
    this.shaker = new Shaker;
    dir = '';
    tch.on('panleft', (function(_this) {
      return function(e) {
        if (dir === 'left') {
          return;
        }
        dir = 'left';
        return _this.shaker.setPosition({
          dir: 'left',
          timestamp: new Date().getTime()
        });
      };
    })(this));
    tch.on('panright', (function(_this) {
      return function(e) {
        if (dir === 'right') {
          return;
        }
        dir = 'right';
        return _this.shaker.setPosition({
          dir: 'right',
          timestamp: new Date().getTime()
        });
      };
    })(this));
    currTorchX = 0;
    torchSceneX = 0;
    tm = null;
    tch.on('pan', (function(_this) {
      return function(e) {
        var angleVelocity, coef, velocityX;
        torchSceneX = currTorchX + e.deltaX;
        velocityX = h.slice(e.velocityX, 6);
        angleVelocity = 12 * velocityX;
        if (Math.abs(velocityX) > 1) {
          _this.stopNormalizingBase();
          _this.ang = angleVelocity;
          _this.ang = h.slice(_this.ang, 35);
          _this.base.setAngle(_this.ang);
          coef = _this.shaker.isShake ? 2 : -1;
          _this.base.setSuppress(coef * Math.abs(9 * velocityX));
        } else {
          _this.normalizeBase();
        }
        return h.transform(_this.torchScene, "translateX(" + torchSceneX + "px)");
      };
    })(this));
    currTorchXOld = -1;
    setInterval((function(_this) {
      return function() {
        if (currTorchX === currTorchXOld && _this.isTorch) {
          return _this.normalizeBase();
        } else {
          return currTorchXOld = currTorchX;
        }
      };
    })(this), 100);
    tch.on('panstart', (function(_this) {
      return function(e) {
        _this.isTorch = true;
        return _this.hideLegend();
      };
    })(this));
    tch.on('panend', (function(_this) {
      return function(e) {
        _this.isTorch = false;
        currTorchX = torchSceneX;
        return _this.normalizeBase();
      };
    })(this));
    mc.on('tap', function(e) {
      isTouched = true;
      return this.hideLegend();
    });
    mc.on('panstart', (function(_this) {
      return function(e) {
        var pointer;
        _this.hideLegend();
        if (_this.isTorch) {
          return;
        }
        pointer = e.pointers[0];
        _this.base.panstart = {
          x: pointer.x,
          y: pointer.y
        };
        isTouched = true;
        TWEEN.remove(_this.tween);
        return _this.isNormalizing = false;
      };
    })(this));
    return mc.on('pan', (function(_this) {
      return function(e) {
        if (_this.isTorch) {
          return;
        }
        if (isTouched) {
          _this.ang = e.deltaX / 10;
          if (_this.ang > _this.MAX_ANGLE) {
            _this.ang = _this.MAX_ANGLE;
          }
          if (_this.ang < -_this.MAX_ANGLE) {
            _this.ang = -_this.MAX_ANGLE;
          }
          _this.base.setAngle(_this.ang);
          _this.suppress = e.deltaY / 20;
          _this.base.setSuppress(_this.suppress);
          if (!timeout) {
            return timeout = setTimeout(function() {
              isTouched = false;
              timeout = null;
              return _this.normalizeBase();
            }, 350);
          }
        }
      };
    })(this));
  };

  Main.prototype.normalizeBase = function() {
    var it;
    if (this.isNormalizing) {
      return;
    }
    this.isNormalizing = true;
    it = this;
    return this.tween = new TWEEN.Tween({
      p: 0
    }).to({
      p: 1
    }, 1500).onUpdate(function() {
      it.base.setAngle(it.ang * (1 - this.p));
      return it.base.setSuppress(it.suppress * (1 - this.p));
    }).easing(TWEEN.Easing.Elastic.Out).onComplete((function(_this) {
      return function() {
        _this.suppress = 0;
        _this.ang = 0;
        return _this.isNormalizing = false;
      };
    })(this)).start();
  };

  Main.prototype.showLegend = function() {
    var it;
    if (this.isLegendHidden) {
      return;
    }
    it = this;
    return this.tweenLegend = new TWEEN.Tween({
      p: 0
    }).to({
      p: 1
    }, 1200).onUpdate(function() {
      return it.legend.style.opacity = "" + this.p;
    }).delay(2000).easing(TWEEN.Easing.Cubic.Out).start();
  };

  Main.prototype.hideLegend = function() {
    if (this.isLegendHidden) {
      return;
    }
    this.legend.style.display = 'none';
    this.isLegendHidden = true;
    return TWEEN.remove(this.tweenLegend);
  };

  Main.prototype.showText = function() {
    var childs;
    childs = this.maskChilds;
    return this.tweenText = new TWEEN.Tween({
      p: 0
    }).to({
      p: 1
    }, 1200).onUpdate(function() {
      var child, currOffset, i, _results;
      i = childs.length - 1;
      _results = [];
      while (i >= 0) {
        child = childs[i];
        if (child.strokeLength) {
          currOffset = child.strokeLength * (1 - this.p);
          child.style['stroke-dashoffset'] = "" + currOffset + "px";
        }
        _results.push(i--);
      }
      return _results;
    }).delay(200).onStart((function(_this) {
      return function() {
        return _this.text.style.display = 'block';
      };
    })(this)).onComplete((function(_this) {
      return function() {
        return _this.showMushroom();
      };
    })(this)).easing(TWEEN.Easing.Cubic.Out).start();
  };

  Main.prototype.showMushroom = function() {
    var it;
    it = this;
    return this.tweenMushroom = new TWEEN.Tween({
      p: 0
    }).to({
      p: 1
    }, 400).onUpdate(function() {
      return it.mushroom.style.opacity = "" + this.p;
    }).onStart((function(_this) {
      return function() {
        _this.mushroom.style.display = 'block';
        return _this.burst.run();
      };
    })(this)).onComplete((function(_this) {
      return function() {
        return _this.showLegend();
      };
    })(this)).easing(TWEEN.Easing.Cubic.Out).start();
  };

  Main.prototype.prepareText = function() {
    var i, length, path, torch, _i, _len, _ref, _results;
    _ref = this.maskChilds;
    _results = [];
    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
      path = _ref[i];
      length = path.getTotalLength();
      if (length > 50) {
        torch = path.getAttribute('torch');
        path.style['stroke-dasharray'] = "" + length + "px";
        path.style['stroke-dashoffset'] = "" + (-length) + "px";
        path.strokeLength = length;
        _results.push(path.isTorch = !!torch);
      } else {
        _results.push(void 0);
      }
    }
    return _results;
  };

  Main.prototype.showTorch = function() {
    var it;
    it = this;
    return this.tweenTorch = new TWEEN.Tween({
      p: 0
    }).to({
      p: 1
    }, 300).onUpdate(function() {
      it.torch.style.opacity = this.p;
      h.transform(it.torch, "translateY(" + (25 * (1 - this.p)) + "px)");
      if (this.p > .5 && !it.isShowRun) {
        return it.showFire();
      }
    }).easing(TWEEN.Easing.Cubic.Out).delay(2000).onComplete((function(_this) {
      return function() {
        return _this.showText();
      };
    })(this)).start();
  };

  Main.prototype.showFire = function() {
    var i, it, lefts, offsets, rights;
    this.isShowRun = true;
    it = this;
    lefts = [];
    rights = [];
    offsets = [];
    i = it.embers.length - 1;
    while (i >= 0) {
      lefts[i] = {
        x: it.embers[i].left.x,
        y: it.embers[i].left.y
      };
      rights[i] = {
        x: it.embers[i].right.x,
        y: it.embers[i].right.y
      };
      offsets[i] = it.embers[i].basePoint.offset;
      i--;
    }
    return this.tweenShow = new TWEEN.Tween({
      p: 0
    }).to({
      p: 1
    }, 1500).onUpdate(function() {
      var ember, left, newLeftX, newLeftY, newRightX, newRightY, right, transform, _results;
      i = it.embers.length - 1;
      _results = [];
      while (i >= 0) {
        ember = it.embers[i];
        left = lefts[i];
        right = rights[i];
        newLeftX = it.startX + ((left.x - it.startX) * this.p);
        newLeftY = (it.startY + 60) + ((left.y - (it.startY + 60)) * this.p);
        newRightX = it.startX + ((right.x - it.startX) * this.p);
        newRightY = (it.startY + 60) + ((right.y - (it.startY + 60)) * this.p);
        ember.left = {
          x: newLeftX,
          y: newLeftY
        };
        ember.right = {
          x: newRightX,
          y: newRightY
        };
        ember.basePoint.setOffset(250 + ((offsets[i] - 250) * this.p));
        transform = "scale(" + this.p + ") translateY(" + (300 * (1 - this.p)) + "px)";
        h.transform(it.shadow.shadow, transform);
        _results.push(i--);
      }
      return _results;
    }).onStart((function(_this) {
      return function() {
        return _this.isShowed = true;
      };
    })(this)).easing(TWEEN.Easing.Elastic.Out).start();
  };

  Main.prototype.vars = function() {
    var child, childs, i, _i, _len, _ref;
    this.canvas = document.getElementById("js-canvas");
    this.ctx = this.canvas.getContext("2d");
    this.wWidth = parseInt(this.canvas.getAttribute('width'), 10);
    this.torch = document.getElementById('js-torch');
    this.legend = document.getElementById('js-legend');
    this.mask = document.getElementById('js-text-mask');
    this.maskChilds = this.mask.childNodes;
    childs = [];
    _ref = this.maskChilds;
    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
      child = _ref[i];
      if (child.getTotalLength) {
        childs.push(child);
      }
    }
    this.maskChilds = childs;
    this.text = document.getElementById('js-text');
    this.scene = document.getElementById('js-scene');
    this.torchScene = document.getElementById('js-torch-scene');
    this.mushroom = document.getElementById('js-mushroom');
    this.animationLoop = this.animationLoop.bind(this);
    this.embers = [];
    this.sparks = [];
    this.basePoints = [];
    this.MAX_ANGLE = 35;
    this.suppress = 0;
    this.startX = this.wWidth / 4;
    this.startY = 390;
    this.burst = new mojs.Burst({
      parent: this.scene,
      isRunLess: true,
      duration: 800,
      cnt: 5,
      radius: {
        75: 150
      },
      color: '#FFC37B',
      bitRadius: {
        3: 0
      },
      lineWidth: {
        2: 0
      },
      position: {
        x: 672,
        y: 394
      },
      easing: 'Cubic.Out'
    });
    this.base = new Base({
      ctx: this.ctx,
      x: (this.startX + 10) * h.PX,
      y: (this.startY + 60) * h.PX,
      radius: 400 * h.PX,
      angle: 0
    });
    this.shadow = new Shadow({
      base: this.base
    });
    this.basePoint1 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 4,
      offset: 71,
      angle: 0
    });
    this.base.addPoint(this.basePoint1);
    this.basePoint11 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 15,
      offset: 61,
      angle: 0
    });
    this.base.addPoint(this.basePoint11);
    this.basePoint2 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 30,
      offset: 182,
      angle: -180
    });
    this.base.addPoint(this.basePoint2);
    this.basePoint21 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 20,
      offset: 182,
      angle: -180
    });
    this.base.addPoint(this.basePoint21);
    this.basePoint3 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 24,
      offset: 101,
      angle: 0
    });
    this.base.addPoint(this.basePoint3);
    this.basePoint31 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 22,
      offset: 106,
      angle: 0
    });
    this.base.addPoint(this.basePoint31);
    this.basePoint4 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 34,
      offset: 173,
      angle: 0
    });
    this.base.addPoint(this.basePoint4);
    this.basePoint41 = new BasePoint({
      ctx: this.ctx,
      base: this.base,
      radius: 42,
      offset: 193,
      angle: 0
    });
    return this.base.addPoint(this.basePoint41);
  };

  Main.prototype.run = function() {
    var ember1, ember11, ember2, ember21, ember3, ember4, ember41, spark1, spark2, spark3, spark4, spark5, spark6, spark7, spark8;
    this.animationLoop();
    ember1 = new Ember({
      ctx: this.ctx,
      sensivity: .25,
      angleStep: 45,
      flickRadius: 20,
      color: "#E86CA9",
      top: {
        x: this.startX + 14,
        y: this.startY - 270
      },
      right: {
        x: this.startX + 64,
        y: this.startY + 12
      },
      bottom: {
        x: this.startX + 10,
        y: this.startY + 60
      },
      left: {
        x: this.startX - 44,
        y: this.startY + 20
      },
      basePoint: this.basePoint1,
      base: this.base,
      name: '1'
    });
    ember11 = new Ember({
      ctx: this.ctx,
      sensivity: .25,
      angleStep: 45,
      angleStart: 90,
      flickRadius: 20,
      color: "#E86CA9",
      top: {
        x: this.startX + 24,
        y: this.startY - 280
      },
      right: {
        x: this.startX + 64,
        y: this.startY + 12
      },
      bottom: {
        x: this.startX + 10,
        y: this.startY + 60
      },
      left: {
        x: this.startX - 4,
        y: this.startY + 20
      },
      basePoint: this.basePoint11,
      base: this.base,
      name: '11'
    });
    ember2 = new Ember({
      ctx: this.ctx,
      sensivity: .25,
      angleStep: 45,
      angleStart: 20,
      flickRadius: 20,
      color: "#ED8CBA",
      top: {
        x: this.startX - 20,
        y: this.startY - 160
      },
      right: {
        x: this.startX,
        y: this.startY + 10
      },
      bottom: {
        x: this.startX,
        y: this.startY + 52
      },
      left: {
        x: this.startX - 68,
        y: this.startY + 4
      },
      basePoint: this.basePoint2,
      base: this.base,
      name: '2'
    });
    ember21 = new Ember({
      ctx: this.ctx,
      sensivity: .25,
      angleStep: 45,
      angleStart: 90,
      flickRadius: 20,
      color: "#ED8CBA",
      top: {
        x: this.startX - 10,
        y: this.startY - 160
      },
      right: {
        x: this.startX,
        y: this.startY + 10
      },
      bottom: {
        x: this.startX,
        y: this.startY + 52
      },
      left: {
        x: this.startX - 68,
        y: this.startY + 4
      },
      basePoint: this.basePoint21,
      base: this.base,
      name: '21'
    });
    ember3 = new Ember({
      ctx: this.ctx,
      sensivity: .25,
      angleStep: 45,
      flickRadius: 20,
      color: "#A4D7F5",
      top: {
        x: this.startX + 33,
        y: this.startY - 240
      },
      right: {
        x: this.startX + 48,
        y: this.startY - 22
      },
      bottom: {
        x: this.startX + 10,
        y: this.startY + 60
      },
      left: {
        x: this.startX - 20,
        y: this.startY - 20
      },
      basePoint: this.basePoint3,
      base: this.base,
      name: '3'
    });
    ember4 = new Ember({
      ctx: this.ctx,
      sensivity: .25,
      angleStep: 45,
      flickRadius: 20,
      color: "#F6D58A",
      top: {
        x: this.startX + 52,
        y: this.startY - 148
      },
      right: {
        x: this.startX + 76,
        y: this.startY + 2
      },
      bottom: {
        x: this.startX + 8,
        y: this.startY + 60
      },
      left: {
        x: this.startX,
        y: this.startY + 10
      },
      basePoint: this.basePoint4,
      base: this.base,
      name: '4'
    });
    ember41 = new Ember({
      ctx: this.ctx,
      sensivity: .25,
      angleStep: 45,
      angleStart: 90,
      flickRadius: 20,
      color: "#F6D58A",
      top: {
        x: this.startX + 44,
        y: this.startY - 168
      },
      right: {
        x: this.startX + 76,
        y: this.startY + 2
      },
      bottom: {
        x: this.startX + 8,
        y: this.startY + 60
      },
      left: {
        x: this.startX,
        y: this.startY + 10
      },
      basePoint: this.basePoint41,
      base: this.base,
      name: '41'
    });
    this.embers.push(ember1, ember11);
    this.embers.push(ember2, ember21);
    this.embers.push(ember3);
    this.embers.push(ember4, ember41);
    spark1 = new Spark({
      ctx: this.ctx,
      color: "#F6D58A",
      base: this.base
    });
    spark2 = new Spark({
      ctx: this.ctx,
      color: "#D5296F",
      isDelayed: true,
      base: this.base
    });
    spark3 = new Spark({
      ctx: this.ctx,
      color: "#65B4ED",
      isDelayed: true,
      base: this.base
    });
    spark4 = new Spark({
      ctx: this.ctx,
      color: "#EA69A9",
      base: this.base
    });
    spark5 = new Spark({
      ctx: this.ctx,
      color: "#65B4ED",
      base: this.base
    });
    spark6 = new Spark({
      ctx: this.ctx,
      color: "#F6D58A",
      base: this.base
    });
    spark7 = new Spark({
      ctx: this.ctx,
      color: "#D5296F",
      base: this.base
    });
    spark8 = new Spark({
      ctx: this.ctx,
      color: "#EA69A9",
      base: this.base
    });
    this.sparks.push(spark1);
    this.sparks.push(spark2);
    this.sparks.push(spark3);
    this.sparks.push(spark4);
    this.sparks.push(spark5);
    this.sparks.push(spark6);
    this.sparks.push(spark7);
    this.sparks.push(spark8);
    return this.ctx.globalCompositeOperation = "multiply";
  };

  Main.prototype.animationLoop = function() {
    var i;
    if (this.isShowed) {
      this.ctx.clearRect(0, 0, this.wWidth, this.wWidth);
      this.shadow.draw();
      i = this.sparks.length - 1;
      while (i >= 0) {
        this.sparks[i].draw();
        i--;
      }
      i = this.embers.length - 1;
      while (i >= 0) {
        this.embers[i].draw();
        i--;
      }
    }
    TWEEN.update();
    return requestAnimationFrame(this.animationLoop);
  };

  return Main;

})();

new Main;



},{"./base":2,"./base-point":1,"./ember":3,"./hammer.min":4,"./helpers":5,"./mojs.min":7,"./shadow":8,"./shaker":9,"./spark":10,"./tweenjs.min":11}],7:[function(require,module,exports){
!function t(i,e,s){function n(o,h){if(!e[o]){if(!i[o]){var a="function"==typeof require&&require;if(!h&&a)return a(o,!0);if(r)return r(o,!0);throw new Error("Cannot find module '"+o+"'")}var p=e[o]={exports:{}};i[o][0].call(p.exports,function(t){var e=i[o][1][t];return n(e?e:t)},p,p.exports,t,i,e,s)}return e[o].exports}for(var r="function"==typeof require&&require,o=0;ol;n=++l)s=d[n],h=(i+t.angle)*t.h.DEG,p=2*t.center+Math.cos(h)*this.radiusX,u=2*t.center+Math.sin(h)*this.radiusY,s.setProp({position:{x:p,y:u},angle:r+this.bitAngle,lineWidth:this.lineWidth,fillObj:t.updateFill(this),colorObj:t.updateColor(this),radiusX:this.bitRadius,radiusY:this.bitRadius,spikes:this.spikes,rate:this.bitRate,lineDash:t.updateLineDash(this),lineDashOffset:this.lineDashOffset}),i+=a,r+=o;return t.ctx.restore()},i.prototype.addElements=function(){var t,i,e,s;for(null==this.els&&(this.els=[]),this.els.length=0,s=[],t=i=0,e=this.cnt;e>=0?e>i:i>e;t=e>=0?++i:--i)s.push(this.els.push(new this.Shape({ctx:this.ctx,parentSize:{x:this.sizeX,y:this.sizeY},position:{x:2*this.center,y:2*this.center},isClearLess:!0,radius:this.bitRadius,color:this.color,fill:this.fill,spikes:this.bitSpikes,rate:this.bitRate,lineDash:this.lineDash})));return s},i.prototype.mixStarSpikesProps=function(){return this.from.spikes=this.spikes,this.to.spikes=this.spikesEnd,this.from.rate=this.rate,this.to.rate=this.rateEnd},i}(s),i.exports=e},{"./byte":4}],3:[function(t,i){var e,s,n;n=t("../helpers"),t("../polyfills"),s=t("../vendor/tween"),e=function(){function t(t){this.o=null!=t?t:{},this.vars(),this.o.isRunLess||("function"==typeof this.run?this.run():void 0)}return t.prototype.oa={},t.prototype.h=n,t.prototype.TWEEN=s,t.prototype.deg=Math.PI/180,t.prototype.DEG=Math.PI/180,t.prototype.px=n.pixel,t.prototype.parent=n.body,t.prototype.vars=function(){return this.ctx=this.o.ctx||this.ctx,this.px=n.pixel,this.parent=this["default"]({prop:"parent",def:n.body}),this.color=this["default"]({prop:"color",def:"#222"}),this.colorMap=this["default"]({prop:"colorMap",def:[this.color]}),this.fill=this["default"]({prop:"fill",def:"rgba(0,0,0,0)"}),this.fillEnd=this["default"]({prop:"fillEnd",def:this.fill}),this.lineWidth=this["default"]({prop:"lineWidth",def:1}),this.lineCap=this["default"]({prop:"lineCap",def:"round"}),this.opacity=this["default"]({prop:"opacity",def:1}),this.isClearLess=this["default"]({prop:"isClearLess",def:!1}),this.colorObj=n.makeColorObj(this.color),this.fillObj=this.h.makeColorObj(this.fill)},t.prototype.setProp=function(t){var i,e;for(i in t)e=t[i],null!=e&&(this[i]=e);return this.render()},t.prototype["default"]=function(t){var i,e;return e=t.prop,i=t.def,this.syntaxSugar({o:this.o,prop:e}),this.syntaxSugar({o:this.oa,prop:e}),this[e]=null!=this.oa[e]?this.oa[e]:null!=this.o[e]?this.o[e]:null!=this[e]?this[e]:i},t.prototype.defaultPart=function(t){return this[t.prop]=null,this["default"](t)},t.prototype.syntaxSugar=function(t){var i,e,s,n,r;if(t.o[t.prop]&&this.h.isObj(t.o[t.prop])){if(null!=(null!=(s=t.o[t.prop])?s.end:void 0))return t.o[""+t.prop+"End"]=t.o[t.prop].end,t.o[""+t.prop]=t.o[t.prop].start;if(!t.o[t.prop].x){n=t.o[t.prop],r=[];for(i in n){e=n[i],"lineDash"!==t.prop&&"lineDashEnd"!==t.prop?(t.o[""+t.prop+"End"]=e,t.o[""+t.prop]=parseFloat(i)):(t.o[""+t.prop+"End"]=this.stringToArray(e),t.o[""+t.prop]=this.stringToArray(i));break}return r}}},t.prototype.stringToArray=function(t){var i,e,s,n,r,o;for(i=[],o=t.split(","),e=n=0,r=o.length;r>n;e=++n)s=o[e],i.push(parseFloat(s));return i},t}(),i.exports=e},{"../helpers":14,"../polyfills":15,"../vendor/tween":16}],4:[function(t,i){var e,s,n,r,o,h,a,p,u,l,f={}.hasOwnProperty,d=function(t,i){function e(){this.constructor=t}for(var s in i)f.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};l=t("../helpers"),e=t("./bit"),n=t("./objects/circle"),h=t("./objects/rectangle"),p=t("./objects/triangle"),a=t("./objects/star"),r=t("./objects/cross"),o=t("./objects/line"),u=t("./objects/zigzag"),s=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return d(i,t),i.prototype.shapes={circle:n,rectangle:h,triangle:p,star:a,cross:r,line:o,zigzag:u},i.prototype.vars=function(){return this.isShowStart=this["default"]({prop:"isShowStart",def:!1}),this.isShowEnd=this["default"]({prop:"isShowEnd",def:!1}),this.parent=this.o.parent||l.body,this.el=this.oa.el||this.o.el||this.el||this.createEl(),this.ctx=this.o.ctx||this.ctx||this.el.getContext("2d"),i.__super__.vars.apply(this,arguments),this.defaultByteVars(),this.s=1*l.time(1),null==this.tweens&&(this.tweens=[]),null!=this.chains?this.chains:this.chains=[]},i.prototype.run=function(t,i){var e,s,n,r,o;if(this.oa=null!=t?t:{},l.size(this.oa)&&this.vars(),!i){for(o=this.tweens,e=n=0,r=o.length;r>n;e=++n)s=o[e],this.TWEEN.remove(s);return this.tweens.length=0,this.chains.length=0}},i.prototype.mixLineDash=function(){var t,i,e,s,n,r,o,h,a;if(this.lineDash&&this.lineDashEnd){for(o=this.lineDash,i=e=0,n=o.length;n>e;i=++e)t=o[i],this.from["lineDash"+i]=t;for(h=this.lineDashEnd,a=[],i=s=0,r=h.length;r>s;i=++s)t=h[i],a.push(this.to["lineDash"+i]=t);return a}},i.prototype.mixColor=function(t){return this.color&&this.colorEnd&&(t||(this.from.r=this.colorObj.r,this.from.g=this.colorObj.g,this.from.b=this.colorObj.b,this.from.a=this.colorObj.a),this.to.r=this.colorEndObj.r,this.to.g=this.colorEndObj.g,this.to.b=this.colorEndObj.b,this.to.a=this.colorEndObj.a),this.colorObjTween=l.clone(this.colorObj)},i.prototype.mixFill=function(t){return this.fill&&this.fillEnd&&(t||(this.from.fr=this.fillObj.r,this.from.fg=this.fillObj.g,this.from.fb=this.fillObj.b,this.from.fa=this.fillObj.a),this.to.fr=this.fillEndObj.r,this.to.fg=this.fillEndObj.g,this.to.fb=this.fillEndObj.b,this.to.fa=this.fillEndObj.a),this.fillObjTween=l.clone(this.fillObj)},i.prototype.updateColor=function(t){return this.colorObjTween.r=parseInt(t.r,10),this.colorObjTween.g=parseInt(t.g,10),this.colorObjTween.b=parseInt(t.b,10),this.colorObjTween.a=parseFloat(t.a),this.colorObjTween},i.prototype.updateFill=function(t){return this.fillObjTween.r=parseInt(t.fr,10),this.fillObjTween.g=parseInt(t.fg,10),this.fillObjTween.b=parseInt(t.fb,10),this.fillObjTween.a=parseFloat(t.fa),this.fillObjTween},i.prototype.updateLineDash=function(t){var i,e,s,n;if(i=0,s=[],this.lineDash&&this.lineDashEnd)for(e in t)n=t[e],("lineDash0"===e||e==="lineDash"+i)&&(s.push(n),i++);return s},i.prototype.initTween=function(t){var i;return i=new this.TWEEN.Tween(this.from).to(this.to,this.duration*this.s).delay(this.delay*this.s).easing(this.TWEEN.Easing[this.easings[0]][this.easings[1]]).repeat(this.repeat-1).onStart(function(i){return function(){var e;return i.setElSize(),i.isRunning=!0,!t&&i.ctx.clear(),(!i.isShowStart||i.isShowEnd)&&(i.el.style.display="block"),null!=(e=i.o.onStart)?e.call(i,arguments):void 0}}(this)).onComplete(function(t){return function(){var i,e,s;return t.isShowStart=!1,null!=(e=t.onComplete)&&e.call(t,arguments),i=null!=(s=t.chains)?s[0]:void 0,i?t.runFromChain(i):(!t.isShowEnd&&(t.el.style.display="none"),t.isRunning=!1)}}(this)).yoyo(this.yoyo).start(),l.startAnimationLoop(),i},i.prototype.runFromChain=function(t){var i;return i=this.h.clone(this.to),t.isChain=!0,null==t.onComplete&&(t.onComplete=function(){}),null==t.onStart&&(t.onStart=function(){}),null==t.repeat&&(t.repeat=0),null==t.yoyo&&(t.yoyo=!1),null==t.delay&&(t.delay=0),null==t.duration&&(t.duration=400*this.s),this.run(t,i),this.chains.shift()},i.prototype.chain=function(t){return null==t&&(t={}),this.isRunning?this.chains.push(t):this.runFromChain(t)},i.prototype.defaultByteVars=function(){var t,i,e;return this.radius=this["default"]({prop:"radius",def:100}),this.radiusX=this["default"]({prop:"radiusX",def:this.radius}),this.radiusY=this["default"]({prop:"radiusY",def:this.radius}),this.radiusEnd=this["default"]({prop:"radiusEnd",def:this.radius}),this.radiusXEnd=this.defaultPart({prop:"radiusXEnd",def:this.radiusEnd}),this.radiusYEnd=this.defaultPart({prop:"radiusYEnd",def:this.radiusEnd}),this.lineWidth=this["default"]({prop:"lineWidth",def:1}),this.lineWidthMiddle=this["default"]({prop:"lineWidthMiddle",def:null}),this.lineWidthEnd=this["default"]({prop:"lineWidthEnd",def:this.lineWidth}),this.lineDashOffset=this["default"]({prop:"lineDashOffset",def:0}),this.lineDashOffsetEnd=this["default"]({prop:"lineDashOffsetEnd",def:this.lineDashOffset}),this.lineDash=this["default"]({prop:"lineDash",def:[]}),this.lineDashEnd=this["default"]({prop:"lineDashEnd",def:this.lineDash}),this.normalizeLineDashes(),this.opacity=this["default"]({prop:"opacity",def:1}),this.opacityEnd=this["default"]({prop:"opacityEnd",def:this.opacity}),this.colorEnd=this["default"]({prop:"colorEnd",def:this.color}),this.colorEnd&&(this.colorEndObj=l.makeColorObj(this.colorEnd)),this.fillEnd&&(this.fillEndObj=l.makeColorObj(this.fillEnd)),this.colorMap=this["default"]({prop:"colorMap",def:[this.color]}),this.angle=this["default"]({prop:"angle",def:0}),this.angleStart=this["default"]({prop:"angleStart",def:this.angle}),this.angleEnd=this["default"]({prop:"angleEnd",def:this.angleStart}),this.shape=this["default"]({prop:"shape",def:"circle"}),this.Shape=this.shapes[this.shape.toLowerCase()]||n,this.repeat=this["default"]({prop:"repeat",def:0}),this.yoyo=this["default"]({prop:"yoyo",def:!1}),this.duration=this["default"]({prop:"duration",def:400}),this.delay=this["default"]({prop:"delay",def:0}),this.easing=this.defaultPart({prop:"easing",def:"Linear.None"}),this.easings=this.easing.split("."),this.onComplete=this["default"]({prop:"onComplete",def:null}),this.onStart=this["default"]({prop:"onStart",def:null}),t=Math.abs,i=Math.max(t(this.radiusXEnd),t(this.radiusYEnd)),e=Math.max(t(this.radiusX),t(this.radiusY)),this.maxRadius=Math.max(i,e),this.maxLineWidth=Math.max(this.lineWidthEnd,this.lineWidthMiddle,this.lineWidth)},i.prototype.normalizeLineDashes=function(){var t,i,e,s,n,r,o,h,a,p,u;if(this.lineDash.lengthn;i=++n)t=a[i],null==(e=this.lineDash)[i]&&(e[i]=this.lineDash[0]);if(this.lineDash.length>this.lineDashEnd.length){for(p=this.lineDash,u=[],i=r=0,h=p.length;h>r;i=++r)t=p[i],u.push(null!=(s=this.lineDashEnd)[i]?s[i]:s[i]=this.lineDashEnd[0]);return u}},i.prototype.createEl=function(){return this.el=document.createElement("canvas"),this.el.style.position="absolute",this.el.style.left=0,this.el.style.top=0,!this.isShowStart&&(this.el.style.display="none"),this.parent.appendChild(this.el)},i.prototype.calcSize=function(){var t,i,e,s;return t=Math.abs,i=Math.max(t(this.to.radiusX),t(this.to.radiusY)),s=Math.max(t(this.from.radiusX),t(this.from.radiusY)),this.maxRadius=Math.max(i,s),this.maxLineWidth=Math.max(this.from.lineWidth,this.to.lineWidth),this.maxBitRadius=Math.max(this.from.bitRadius,this.to.bitRadius),this.maxBitRadius|=0,this.size=2*(this.maxRadius+2*this.maxLineWidth+2*this.maxBitRadius),e=Math.max(this.from.rate,this.to.rate),e>1&&(this.size*=e),this.center=this.size/2,this.sizeX=this.size,this.sizeY=this.size,this.centerX=this.sizeX/2,this.centerY=this.sizeY/2,this.position=this["default"]({prop:"position",def:{x:this.sizeX/2,y:this.sizeY/2}})},i.prototype.setElSize=function(){return this.el.setAttribute("width",l.pixel*this.sizeX),this.el.setAttribute("height",l.pixel*this.sizeY),l.pixel>1&&(this.el.style.width=""+this.sizeX+"px",this.el.style.height=""+this.sizeY+"px"),this.posit(),this.el},i.prototype.setPosition=function(t,i){return null==i&&(i=0),this.position.x=t,null!=i&&(this.position.y=i),this.posit()},i.prototype.posit=function(){var t,i;return t=this.position.x-this.sizeX/2,i=this.position.y-this.sizeY/2,this.el.style.left=""+t+"px",this.el.style.top=""+i+"px"},i.prototype.rotate=function(t){return this.ctx.save(),this.ctx.translate(2*this.centerX,2*this.centerY),this.ctx.rotate(t.angle),this.ctx.translate(-2*this.centerX,-2*this.centerY)},i}(e),i.exports=s},{"../helpers":14,"./bit":3,"./objects/circle":5,"./objects/cross":6,"./objects/line":7,"./objects/rectangle":9,"./objects/star":10,"./objects/triangle":11,"./objects/zigzag":12}],5:[function(t,i){var e,s,n={}.hasOwnProperty,r=function(t,i){function e(){this.constructor=t}for(var s in i)n.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};s=t("./object"),e=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return r(i,t),i.prototype.name="circle",i.prototype.vars=function(){return this.degree=this["default"]({prop:"degree",def:360}),this.degreeOffset=this["default"]({prop:"degreeOffset",def:0}),i.__super__.vars.apply(this,arguments)},i.prototype.render=function(){return this.preRender(),this.ctx.arc(1,1,1,this.degreeOffset*this.deg,(this.degree+this.degreeOffset)*this.deg,!1),this.postRender()},i}(s),i.exports=e},{"./object":8}],6:[function(t,i){var e,s,n={}.hasOwnProperty,r=function(t,i){function e(){this.constructor=t}for(var s in i)n.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};s=t("./object"),e=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return r(i,t),i.prototype.name="Cross",i.prototype.render=function(){return this.preRender(),this.ctx.moveTo(1,0),this.ctx.lineTo(1,2),this.ctx.moveTo(0,1),this.ctx.lineTo(2,1),this.postRender()},i}(s),i.exports=e},{"./object":8}],7:[function(t,i){var e,s,n={}.hasOwnProperty,r=function(t,i){function e(){this.constructor=t}for(var s in i)n.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};s=t("./object"),e=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return r(i,t),i.prototype.name="Line",i.prototype.render=function(){return this.preRender(),this.ctx.moveTo(0,1),this.ctx.lineTo(2,1),this.postRender()},i}(s),i.exports=e},{"./object":8}],8:[function(t,i){var e,s,n={}.hasOwnProperty,r=function(t,i){function e(){this.constructor=t}for(var s in i)n.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};e=t("../bit"),s=function(t){function i(t){this.o=null!=t?t:{},this.vars()}return r(i,t),i.prototype.vars=function(){var t;return this.ctx=this.o.ctx||this.ctx,this.px=this.h.pixel,this.parent=this["default"]({prop:"parent",def:this.h.body}),this.color=this["default"]({prop:"color",def:"#222"}),this.fill=this["default"]({prop:"fill",def:"#222"}),this.lineWidth=this["default"]({prop:"lineWidth",def:1}),this.lineCap=this["default"]({prop:"lineCap",def:"round"}),this.opacity=this["default"]({prop:"opacity",def:1}),this.isClearLess=this["default"]({prop:"isClearLess",def:!1}),this.angle=this["default"]({prop:"angle",def:0}),this.lineDash=this["default"]({prop:"lineDash",def:[]}),this.lineDashOffset=this["default"]({prop:"lineDashOffset",def:0}),this.radius=this["default"]({prop:"radius",def:50}),this.radiusX=this.defaultPart({prop:"radiusX",def:this.radius}),this.radiusY=this.defaultPart({prop:"radiusY",def:this.radius}),this.size={width:2*this.radiusX,height:2*this.radiusY},t={x:this.size.width/2,y:this.size.height/2},this.position=this["default"]({prop:"position",def:t}),this.colorObj=this.h.makeColorObj(this.color),this.fillObj=this.h.makeColorObj(this.fill)},i.prototype.renderStart=function(){var t;return t=this.name||"object",this.ctx?(this.isClearLess||this.ctx.clear(),this.ctx.save(),this.ctx.beginPath()):void console.error(""+t+".render: no context!")},i.prototype.preRender=function(){return this.renderStart(),this.rotation(),this.radiusRender()},i.prototype.postRender=function(){var t;return t=this.fillObj,this.ctx.fillStyle="rgba("+t.r+","+t.g+","+t.b+", "+(this.opacity-(1-t.a))+")",this.ctx.fill(),this.ctx.restore(),this.stroke()},i.prototype.rotation=function(){var t,i;return t=this.position.x,i=this.position.y,this.ctx.translate(t,i),this.ctx.rotate(this.angle*this.h.DEG),this.ctx.translate(-t,-i)},i.prototype.radiusRender=function(){return this.ctx.translate(this.position.x-4*this.radiusX,this.position.y-4*this.radiusY),this.ctx.scale(4*this.radiusX,4*this.radiusY)},i.prototype.stroke=function(){var t,i;return this.ctx.lineWidth=this.lineWidth*this.px,this.ctx.lineCap=this.lineCap,this.ctx.lineDashOffset=this.lineDashOffset,"function"==typeof(i=this.ctx).setLineDash&&i.setLineDash(this.lineDash),t=this.colorObj,this.ctx.strokeStyle="rgba("+t.r+","+t.g+","+t.b+", "+(this.opacity-(1-t.a))+")",this.lineWidth>0&&this.ctx.stroke()},i}(e),i.exports=s},{"../bit":3}],9:[function(t,i){var e,s,n={}.hasOwnProperty,r=function(t,i){function e(){this.constructor=t}for(var s in i)n.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};e=t("./object"),s=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return r(i,t),i.prototype.name="Square",i.prototype.render=function(){return this.preRender(),this.ctx.rect(.3,.3,1.4,1.4),this.postRender()},i}(e),i.exports=s},{"./object":8}],10:[function(t,i){var e,s,n={}.hasOwnProperty,r=function(t,i){function e(){this.constructor=t}for(var s in i)n.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};e=t("./object"),s=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return r(i,t),i.prototype.name="Star",i.prototype.vars=function(){return i.__super__.vars.apply(this,arguments),this.spikes=this["default"]({prop:"spikes",def:5}),this.rate=this["default"]({prop:"rate",def:.5})},i.prototype.render=function(){var t,i,e,s,n,r,o,h,a;for(this.preRender(),r=Math.PI/2*3,t=1,i=1,h=t,a=i,s=this.rate,n=1,o=Math.PI/this.spikes,this.ctx.moveTo(t,i-s),e=0;e=0?a>=h:h>=a;i=a>=0?++h:--h)s=(t+this.angle)*this.h.DEG,r=1+Math.cos(s),o=1+Math.sin(s),t+=n,e=0===i?"moveTo":"lineTo",this.ctx[e](r,o);return this.ctx.closePath(),this.postRender()},i}(e),i.exports=s},{"./object":8}],12:[function(t,i){var e,s,n={}.hasOwnProperty,r=function(t,i){function e(){this.constructor=t}for(var s in i)n.call(i,s)&&(t[s]=i[s]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t};e=t("./object"),s=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return r(i,t),i.prototype.name="ZigZag",i.prototype.vars=function(){return i.__super__.vars.apply(this,arguments),this.rate=this["default"]({prop:"rate",def:.25}),this.spikes=this["default"]({prop:"spikes",def:10})},i.prototype.render=function(){var t,i,e,s,n,r;for(this.preRender(),t=n=0,r=this.spikes;r>=0?r>n:n>r;t=r>=0?++n:--n)i=0===t?"moveTo":"lineTo",s=t%2===0?this.rate:-this.rate,e=0+t*(2/(this.spikes-1)),this.ctx[i](e,1+s);return this.postRender()},i}(e),i.exports=s},{"./object":8}],13:[function(t){var i,e,s,n,r;r=t("./helpers"),i=t("./bits/Bubble"),e=t("./bits/Burst"),s=function(){function t(){}return t.prototype.Bubble=i,t.prototype.Burst=e,t}(),n=new s,"function"==typeof define&&define.amd?define("charites",[],function(){return n}):module.exports = n/*window.charites=n*/},{"./bits/Bubble":1,"./bits/Burst":2,"./helpers":14}],14:[function(t,i){var e,s;s=t("./vendor/tween"),e=function(){function t(t){this.o=null!=t?t:{},this.animationLoop=this.animationLoop.bind(this),this.div=document.createElement("div"),this.computedStyle=function(t){return window.getComputedStyle?getComputedStyle(t,""):t.currentStyle},this.shortColors={aqua:"rgb(0,255,255)",black:"rgb(0,0,0)",blue:"rgb(0,0,255)",fuchsia:"rgb(255,0,255)",gray:"rgb(128,128,128)",green:"rgb(0,128,0)",lime:"rgb(0,255,0)",maroon:"rgb(128,0,0)",navy:"rgb(0,0,128)",olive:"rgb(128,128,0)",purple:"rgb(128,0,128)",red:"rgb(255,0,0)",silver:"rgb(192,192,192)",teal:"rgb(0,128,128)",white:"rgb(255,255,255)",yellow:"rgb(255,255,0)",orange:"rgb(255,128,0)"}}return t.prototype.pixel=2,t.prototype.doc=document,t.prototype.body=document.body,t.prototype.deg=Math.PI/180,t.prototype.DEG=Math.PI/180,t.prototype.s=1,t.prototype.time=function(t){return t*this.s},t.prototype.isFF=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},t.prototype.isIE=function(){return this.isIE9l()||this.isIE10g()},t.prototype.isIE9l=function(){return navigator.userAgent.toLowerCase().indexOf("msie")>-1},t.prototype.isIE10g=function(){return navigator.userAgent.toLowerCase().indexOf("rv")>-1},t.prototype.slice=function(t,i){return t>i?i:t},t.prototype.sliceMod=function(t,i){return t>0?t>i?i:t:-i>t?-i:t},t.prototype.clone=function(t){var i,e,s;e={};for(i in t)s=t[i],e[i]=s;return e},t.prototype.getStyle=function(t){var i;return i=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle},t.prototype.rand=function(t,i){return Math.floor(Math.random()*(i+1-t)+t)},t.prototype.bind=function(t,i){var e,s;return s=function(){var s,n;return s=Array.prototype.slice.call(arguments),n=e.concat(s),t.apply(i,n)},e=Array.prototype.slice.call(arguments,2),s},t.prototype.isObj=function(t){return!!t&&t.constructor===Object},t.prototype.makeColorObj=function(t){var i,e,s,n,r,o,h,a,p,u;return"#"===t[0]&&(p=/^#?([a-f\d]{1,2})([a-f\d]{1,2})([a-f\d]{1,2})$/i.exec(t),s={},p&&(o=2===p[1].length?p[1]:p[1]+p[1],n=2===p[2].length?p[2]:p[2]+p[2],e=2===p[3].length?p[3]:p[3]+p[3],s={r:parseInt(o,16),g:parseInt(n,16),b:parseInt(e,16),a:1})),"#"!==t[0]&&(r="r"===t[0]&&"g"===t[1]&&"b"===t[2],r&&(u=t),r||(u=this.shortColors[t]?this.shortColors[t]:(this.div.style.color=t,this.isFF()||this.isIE()?this.computedStyle(this.div).color:this.div.style.color)),h="^rgba?\\((\\d{1,3}),\\s?(\\d{1,3}),",a="\\s?(\\d{1,3}),?\\s?(\\d{1}|0?\\.\\d{1,})?\\)$",p=new RegExp(h+a,"gi").exec(u),s={},i=parseFloat(p[4]||1),p&&(s={r:parseInt(p[1],10),g:parseInt(p[2],10),b:parseInt(p[3],10),a:null==i||isNaN(i)?1:i})),s},t.prototype.size=function(t){var i,e,s;i=0;for(e in t)s=t[e],i++;return i},t.prototype.isSizeChange=function(t){var i,e,s,n;return e=t.radiusStart||t.radiusEnd,s=t.radiusStartX||t.radiusStartY,n=t.radiusEndX||t.radiusEndX,i=t.lineWidth||t.lineWidthMiddle||t.lineWidthEnd,e||s||n||i},t.prototype.lock=function(t){return!this[t.lock]&&t.fun(),this[t.lock]=!0},t.prototype.unlock=function(t){return this[t.lock]=!1},t.prototype.animationLoop=function(){return s.getAll().length||(this.isAnimateLoop=!1),this.isAnimateLoop?(s.update(),requestAnimationFrame(this.animationLoop)):void 0},t.prototype.startAnimationLoop=function(){return this.isAnimateLoop?void 0:(this.isAnimateLoop=!0,this.animationLoop())},t.prototype.stopAnimationLoop=function(){return this.isAnimateLoop=!1},t}(),i.exports=function(){return new e}()},{"./vendor/tween":16}],15:[function(t,i){i.exports=function(){return CanvasRenderingContext2D.prototype.clear?void 0:CanvasRenderingContext2D.prototype.clear=function(t){t&&(this.save(),this.setTransform(1,0,0,1,0,0)),this.clearRect(0,0,this.canvas.width,this.canvas.height),t&&this.restore()}}()},{}],16:[function(t,i){!function(t){!function(){for(var t=0,i=["ms","moz","webkit","o"],e=0;et;t++)g[t].stop()},this.delay=function(t){return f=t,this},this.repeat=function(t){return a=t,this},this.yoyo=function(t){return p=t,this},this.easing=function(t){return c=t,this},this.interpolation=function(t){return y=t,this},this.chain=function(){return g=arguments,this},this.onStart=function(t){return b=t,this},this.onUpdate=function(t){return v=t,this},this.onComplete=function(t){return x=t,this},this.onStop=function(t){return w=t,this},this.update=function(t){var i;if(d>t)return!0;m===!1&&(null!==b&&b.call(s),m=!0);var e=(t-d)/h;e=e>1?1:e;var u=c(e);for(i in r){var w=n[i]||0,E=r[i];E instanceof Array?s[i]=y(E,u):("string"==typeof E&&(E=w+parseFloat(E,10)),"number"==typeof E&&(s[i]=w+(E-w)*u))}if(null!==v&&v.call(s,u),1==e){if(a>0){isFinite(a)&&a--;for(i in o){if("string"==typeof r[i]&&(o[i]=o[i]+parseFloat(r[i],10)),p){var _=o[i];o[i]=r[i],r[i]=_}n[i]=o[i]}return p&&(l=!l),d=t+f,!0}null!==x&&x.call(s);for(var O=0,j=g.length;j>O;O++)g[O].start(t);return!1}return!0}},e.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)
},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){var i,e=.1,s=.4;return 0===t?0:1===t?1:(!e||1>e?(e=1,i=s/4):i=s*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(t-=1))*Math.sin(2*(t-i)*Math.PI/s)))},Out:function(t){var i,e=.1,s=.4;return 0===t?0:1===t?1:(!e||1>e?(e=1,i=s/4):i=s*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin(2*(t-i)*Math.PI/s)+1)},InOut:function(t){var i,e=.1,s=.4;return 0===t?0:1===t?1:(!e||1>e?(e=1,i=s/4):i=s*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?-.5*e*Math.pow(2,10*(t-=1))*Math.sin(2*(t-i)*Math.PI/s):e*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-i)*Math.PI/s)*.5+1)}},Back:{In:function(t){var i=1.70158;return t*t*((i+1)*t-i)},Out:function(t){var i=1.70158;return--t*t*((i+1)*t+i)+1},InOut:function(t){var i=2.5949095;return(t*=2)<1?.5*t*t*((i+1)*t-i):.5*((t-=2)*t*((i+1)*t+i)+2)}},Bounce:{In:function(t){return 1-e.Easing.Bounce.Out(1-t)},Out:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return.5>t?.5*e.Easing.Bounce.In(2*t):.5*e.Easing.Bounce.Out(2*t-1)+.5}}},e.Interpolation={Linear:function(t,i){var s=t.length-1,n=s*i,r=Math.floor(n),o=e.Interpolation.Utils.Linear;return 0>i?o(t[0],t[1],n):i>1?o(t[s],t[s-1],s-n):o(t[r],t[r+1>s?s:r+1],n-r)},Bezier:function(t,i){var s,n=0,r=t.length-1,o=Math.pow,h=e.Interpolation.Utils.Bernstein;for(s=0;r>=s;s++)n+=o(1-i,r-s)*o(i,s)*t[s]*h(r,s);return n},CatmullRom:function(t,i){var s=t.length-1,n=s*i,r=Math.floor(n),o=e.Interpolation.Utils.CatmullRom;return t[0]===t[s]?(0>i&&(r=Math.floor(n=s*(1+i))),o(t[(r-1+s)%s],t[r],t[(r+1)%s],t[(r+2)%s],n-r)):0>i?t[0]-(o(t[0],t[0],t[1],t[1],-n)-t[0]):i>1?t[s]-(o(t[s],t[s],t[s-1],t[s-1],n-s)-t[s]):o(t[r?r-1:0],t[r],t[r+1>s?s:r+1],t[r+2>s?s:r+2],n-r)},Utils:{Linear:function(t,i,e){return(i-t)*e+t},Bernstein:function(t,i){var s=e.Interpolation.Utils.Factorial;return s(t)/s(i)/s(t-i)},Factorial:function(){var t=[1];return function(i){var e,s=1;if(t[i])return t[i];for(e=i;e>1;e--)s*=e;return t[i]=s}}(),CatmullRom:function(t,i,e,s,n){var r=.5*(e-t),o=.5*(s-i),h=n*n,a=n*h;return(2*i-2*e+r+o)*a+(-3*i+3*e-2*r-o)*h+r*n+i}}},i.exports=e}()},{}]},{},[13]);
},{}],8:[function(require,module,exports){
var Shadow, h;

h = require('./helpers');

Shadow = (function() {
  function Shadow(o) {
    this.o = o != null ? o : {};
    this.vars();
  }

  Shadow.prototype.vars = function() {
    this.shadow = document.getElementById('js-shadow');
    this.base = this.o.base;
    this.tick = 0;
    this.o = .75;
    return this.speed = 3;
  };

  Shadow.prototype.draw = function() {
    var ang, flick, scale, sup, suppress, translate, x;
    if (this.isFF) {
      return;
    }
    suppress = 0;
    suppress = this.base.suppress < 0 ? this.base.suppress / 80 : this.base.suppress / 120;
    scale = "scale(" + (1 - suppress) + ")";
    x = this.base.x - this.base.initX;
    translate = this.base.suppress > 0 ? "translate(" + (2 * this.base.angle) + "px," + (3 * this.base.suppress) + "px)" : '';
    h.transform(this.shadow, "" + scale + " " + translate + " translateZ(0)");
    this.tick++;
    sup = Math.abs(~~(10 * suppress));
    ang = Math.abs(~~(this.base.angle / 45));
    flick = Math.max(sup, ang);
    if (this.tick % (this.speed - flick) === 0) {
      this.o = h.rand(8, 10) / 10;
      return this.shadow.style.opacity = this.o;
    }
  };

  return Shadow;

})();

module.exports = Shadow;



},{"./helpers":5}],9:[function(require,module,exports){
var Shaker;

Shaker = (function() {
  function Shaker() {
    this.vars();
  }

  Shaker.prototype.vars = function() {
    return this.pos = [];
  };

  Shaker.prototype.reset = function() {
    var len;
    this.isShake = false;
    len = this.pos.length;
    if (len < 3) {
      return;
    }
    return this.pos = [this.pos[len - 3], this.pos[len - 2], this.pos[len - 1]];
  };

  Shaker.prototype.setPosition = function(pos) {
    var lastI, len, time;
    this.pos.push(pos);
    len = this.pos.length;
    if (len < 3) {
      return;
    }
    lastI = len - 1;
    if ((pos.dir !== this.pos[lastI - 1].dir) && (pos.dir === this.pos[lastI - 2].dir)) {
      time = (pos.timestamp - this.pos[lastI - 1].timestamp) / 1000;
      return this.isShake = time < .2;
    }
  };

  return Shaker;

})();

module.exports = Shaker;



},{}],10:[function(require,module,exports){
var Spark, h;

h = require('./helpers');

Spark = (function() {
  function Spark(o) {
    this.o = o != null ? o : {};
    this.vars();
  }

  Spark.prototype.vars = function() {
    this.ctx = this.o.ctx;
    this.start = this.o.start;
    this.length = this.o.length || 450;
    this.color = this.o.color;
    this.offset = this.o.offset || 0;
    this.getRandRadius();
    this.getRandOffset();
    this.getRandDelay();
    this.isDelayed = this.o.isDelayed || true;
    this.base2 = {};
    this.cloneBase();
    this.sinCoef = 1;
    this.p = 0;
    this.pSin = 0;
    this.pSinStep = .1;
    return this.d = 0;
  };

  Spark.prototype.getRandOffset = function() {
    return this.offset = h.rand(-35, 35);
  };

  Spark.prototype.getRandDelay = function() {
    return this.delay = h.rand(0, 20);
  };

  Spark.prototype.getRandRadius = function() {
    return this.radius = h.rand(5, 10);
  };

  Spark.prototype.cloneBase = function() {
    var key, value, _ref, _results;
    _ref = this.o.base;
    _results = [];
    for (key in _ref) {
      value = _ref[key];
      _results.push(this.base2[key] = value);
    }
    return _results;
  };

  Spark.prototype.draw = function() {
    var b, quirk, rad, speed, x, y;
    if (!this.isDelayed) {
      !this.isBaseCloned && this.cloneBase();
      this.isBaseCloned = true;
      this.ctx.beginPath();
      b = this.base2;
      speed = Math.abs(b.angle) / 3000;
      rad = b.radius + 100 - this.length + (this.length * this.p);
      quirk = Math.sin(this.pSin) * this.sinCoef;
      x = b.x + Math.cos((b.angle + quirk - 90) * h.DEG) * rad;
      y = b.y + Math.sin((b.angle + quirk - 90) * h.DEG) * rad;
      x += this.offset * h.PX;
      this.ctx.arc(x, y, this.radius * (1 - this.p), 0, 2 * Math.PI);
      this.ctx.fillStyle = this.color;
      this.ctx.fill();
      this.pSin += this.pSinStep + speed;
      this.p += .02 + speed;
      if (this.p >= 1) {
        this.p = 0;
        this.pSin = 0;
        this.sinCoef = -this.sinCoef;
        this.isDelayed = true;
        this.radius = h.rand(5, 10);
        this.pSinStep = h.rand(0, 2) / 10;
        this.getRandOffset();
        this.getRandDelay();
        return this.isBaseCloned = false;
      }
    } else {
      this.d += .1;
      if (this.d >= this.delay * (1 - Math.abs(this.base2.angle) / 45)) {
        this.d = 0;
        return this.isDelayed = false;
      }
    }
  };

  return Spark;

})();

module.exports = Spark;



},{"./helpers":5}],11:[function(require,module,exports){
// tween.js v.0.15.0 https://github.com/sole/tween.js
void 0 === Date.now && (Date.now = function() {
    return (new Date).valueOf()
});
var TWEEN = TWEEN || function() {
        var n = [];
        return {
            REVISION: "14",
            getAll: function() {
                return n
            },
            removeAll: function() {
                n = []
            },
            add: function(t) {
                n.push(t)
            },
            remove: function(t) {
                var r = n.indexOf(t); - 1 !== r && n.splice(r, 1)
            },
            update: function(t) {
                if (0 === n.length) return !1;
                var r = 0;
                for (t = void 0 !== t ? t : "undefined" != typeof window && void 0 !== window.performance && void 0 !== window.performance.now ? window.performance.now() : Date.now(); r < n.length;) n[r].update(t) ? r++ : n.splice(r, 1);
                return !0
            }
        }
    }();
TWEEN.Tween = function(n) {
    var t = n,
        r = {}, i = {}, u = {}, o = 1e3,
        e = 0,
        a = !1,
        f = !1,
        c = !1,
        s = 0,
        h = null,
        l = TWEEN.Easing.Linear.None,
        p = TWEEN.Interpolation.Linear,
        E = [],
        d = null,
        v = !1,
        I = null,
        w = null,
        M = null;
    for (var O in n) r[O] = parseFloat(n[O], 10);
    this.to = function(n, t) {
        return void 0 !== t && (o = t), i = n, this
    }, this.start = function(n) {
        TWEEN.add(this), f = !0, v = !1, h = void 0 !== n ? n : "undefined" != typeof window && void 0 !== window.performance && void 0 !== window.performance.now ? window.performance.now() : Date.now(), h += s;
        for (var o in i) {
            if (i[o] instanceof Array) {
                if (0 === i[o].length) continue;
                i[o] = [t[o]].concat(i[o])
            }
            r[o] = t[o], r[o] instanceof Array == !1 && (r[o] *= 1), u[o] = r[o] || 0
        }
        return this
    }, this.stop = function() {
        return f ? (TWEEN.remove(this), f = !1, null !== M && M.call(t), this.stopChainedTweens(), this) : this
    }, this.stopChainedTweens = function() {
        for (var n = 0, t = E.length; t > n; n++) E[n].stop()
    }, this.delay = function(n) {
        return s = n, this
    }, this.repeat = function(n) {
        return e = n, this
    }, this.yoyo = function(n) {
        return a = n, this
    }, this.easing = function(n) {
        return l = n, this
    }, this.interpolation = function(n) {
        return p = n, this
    }, this.chain = function() {
        return E = arguments, this
    }, this.onStart = function(n) {
        return d = n, this
    }, this.onUpdate = function(n) {
        return I = n, this
    }, this.onComplete = function(n) {
        return w = n, this
    }, this.onStop = function(n) {
        return M = n, this
    }, this.update = function(n) {
        var f;
        if (h > n) return !0;
        v === !1 && (null !== d && d.call(t), v = !0);
        var M = (n - h) / o;
        M = M > 1 ? 1 : M;
        var O = l(M);
        for (f in i) {
            var m = r[f] || 0,
                N = i[f];
            N instanceof Array ? t[f] = p(N, O) : ("string" == typeof N && (N = m + parseFloat(N, 10)), "number" == typeof N && (t[f] = m + (N - m) * O))
        }
        if (null !== I && I.call(t, O), 1 == M) {
            if (e > 0) {
                isFinite(e) && e--;
                for (f in u) {
                    if ("string" == typeof i[f] && (u[f] = u[f] + parseFloat(i[f], 10)), a) {
                        var T = u[f];
                        u[f] = i[f], i[f] = T
                    }
                    r[f] = u[f]
                }
                return a && (c = !c), h = n + s, !0
            }
            null !== w && w.call(t);
            for (var g = 0, W = E.length; W > g; g++) E[g].start(n);
            return !1
        }
        return !0
    }
}, TWEEN.Easing = {
    Linear: {
        None: function(n) {
            return n
        }
    },
    Quadratic: {
        In: function(n) {
            return n * n
        },
        Out: function(n) {
            return n * (2 - n)
        },
        InOut: function(n) {
            return (n *= 2) < 1 ? .5 * n * n : -.5 * (--n * (n - 2) - 1)
        }
    },
    Cubic: {
        In: function(n) {
            return n * n * n
        },
        Out: function(n) {
            return --n * n * n + 1
        },
        InOut: function(n) {
            return (n *= 2) < 1 ? .5 * n * n * n : .5 * ((n -= 2) * n * n + 2)
        }
    },
    Quartic: {
        In: function(n) {
            return n * n * n * n
        },
        Out: function(n) {
            return 1 - --n * n * n * n
        },
        InOut: function(n) {
            return (n *= 2) < 1 ? .5 * n * n * n * n : -.5 * ((n -= 2) * n * n * n - 2)
        }
    },
    Quintic: {
        In: function(n) {
            return n * n * n * n * n
        },
        Out: function(n) {
            return --n * n * n * n * n + 1
        },
        InOut: function(n) {
            return (n *= 2) < 1 ? .5 * n * n * n * n * n : .5 * ((n -= 2) * n * n * n * n + 2)
        }
    },
    Sinusoidal: {
        In: function(n) {
            return 1 - Math.cos(n * Math.PI / 2)
        },
        Out: function(n) {
            return Math.sin(n * Math.PI / 2)
        },
        InOut: function(n) {
            return .5 * (1 - Math.cos(Math.PI * n))
        }
    },
    Exponential: {
        In: function(n) {
            return 0 === n ? 0 : Math.pow(1024, n - 1)
        },
        Out: function(n) {
            return 1 === n ? 1 : 1 - Math.pow(2, - 10 * n)
        },
        InOut: function(n) {
            return 0 === n ? 0 : 1 === n ? 1 : (n *= 2) < 1 ? .5 * Math.pow(1024, n - 1) : .5 * (-Math.pow(2, - 10 * (n - 1)) + 2)
        }
    },
    Circular: {
        In: function(n) {
            return 1 - Math.sqrt(1 - n * n)
        },
        Out: function(n) {
            return Math.sqrt(1 - --n * n)
        },
        InOut: function(n) {
            return (n *= 2) < 1 ? -.5 * (Math.sqrt(1 - n * n) - 1) : .5 * (Math.sqrt(1 - (n -= 2) * n) + 1)
        }
    },
    Elastic: {
        In: function(n) {
            var t, r = .1,
                i = .4;
            return 0 === n ? 0 : 1 === n ? 1 : (!r || 1 > r ? (r = 1, t = i / 4) : t = i * Math.asin(1 / r) / (2 * Math.PI), - (r * Math.pow(2, 10 * (n -= 1)) * Math.sin(2 * (n - t) * Math.PI / i)))
        },
        Out: function(n) {
            var t, r = .1,
                i = .4;
            return 0 === n ? 0 : 1 === n ? 1 : (!r || 1 > r ? (r = 1, t = i / 4) : t = i * Math.asin(1 / r) / (2 * Math.PI), r * Math.pow(2, - 10 * n) * Math.sin(2 * (n - t) * Math.PI / i) + 1)
        },
        InOut: function(n) {
            var t, r = .1,
                i = .4;
            return 0 === n ? 0 : 1 === n ? 1 : (!r || 1 > r ? (r = 1, t = i / 4) : t = i * Math.asin(1 / r) / (2 * Math.PI), (n *= 2) < 1 ? -.5 * r * Math.pow(2, 10 * (n -= 1)) * Math.sin(2 * (n - t) * Math.PI / i) : r * Math.pow(2, - 10 * (n -= 1)) * Math.sin(2 * (n - t) * Math.PI / i) * .5 + 1)
        }
    },
    Back: {
        In: function(n) {
            var t = 1.70158;
            return n * n * ((t + 1) * n - t)
        },
        Out: function(n) {
            var t = 1.70158;
            return --n * n * ((t + 1) * n + t) + 1
        },
        InOut: function(n) {
            var t = 2.5949095;
            return (n *= 2) < 1 ? .5 * n * n * ((t + 1) * n - t) : .5 * ((n -= 2) * n * ((t + 1) * n + t) + 2)
        }
    },
    Bounce: {
        In: function(n) {
            return 1 - TWEEN.Easing.Bounce.Out(1 - n)
        },
        Out: function(n) {
            return 1 / 2.75 > n ? 7.5625 * n * n : 2 / 2.75 > n ? 7.5625 * (n -= 1.5 / 2.75) * n + .75 : 2.5 / 2.75 > n ? 7.5625 * (n -= 2.25 / 2.75) * n + .9375 : 7.5625 * (n -= 2.625 / 2.75) * n + .984375
        },
        InOut: function(n) {
            return .5 > n ? .5 * TWEEN.Easing.Bounce.In(2 * n) : .5 * TWEEN.Easing.Bounce.Out(2 * n - 1) + .5
        }
    }
}, TWEEN.Interpolation = {
    Linear: function(n, t) {
        var r = n.length - 1,
            i = r * t,
            u = Math.floor(i),
            o = TWEEN.Interpolation.Utils.Linear;
        return 0 > t ? o(n[0], n[1], i) : t > 1 ? o(n[r], n[r - 1], r - i) : o(n[u], n[u + 1 > r ? r : u + 1], i - u)
    },
    Bezier: function(n, t) {
        var r, i = 0,
            u = n.length - 1,
            o = Math.pow,
            e = TWEEN.Interpolation.Utils.Bernstein;
        for (r = 0; u >= r; r++) i += o(1 - t, u - r) * o(t, r) * n[r] * e(u, r);
        return i
    },
    CatmullRom: function(n, t) {
        var r = n.length - 1,
            i = r * t,
            u = Math.floor(i),
            o = TWEEN.Interpolation.Utils.CatmullRom;
        return n[0] === n[r] ? (0 > t && (u = Math.floor(i = r * (1 + t))), o(n[(u - 1 + r) % r], n[u], n[(u + 1) % r], n[(u + 2) % r], i - u)) : 0 > t ? n[0] - (o(n[0], n[0], n[1], n[1], - i) - n[0]) : t > 1 ? n[r] - (o(n[r], n[r], n[r - 1], n[r - 1], i - r) - n[r]) : o(n[u ? u - 1 : 0], n[u], n[u + 1 > r ? r : u + 1], n[u + 2 > r ? r : u + 2], i - u)
    },
    Utils: {
        Linear: function(n, t, r) {
            return (t - n) * r + n
        },
        Bernstein: function(n, t) {
            var r = TWEEN.Interpolation.Utils.Factorial;
            return r(n) / r(t) / r(n - t)
        },
        Factorial: function() {
            var n = [1];
            return function(t) {
                var r, i = 1;
                if (n[t]) return n[t];
                for (r = t; r > 1; r--) i *= r;
                return n[t] = i
            }
        }(),
        CatmullRom: function(n, t, r, i, u) {
            var o = .5 * (r - n),
                e = .5 * (i - t),
                a = u * u,
                f = u * a;
            return (2 * t - 2 * r + o + e) * f + (-3 * t + 3 * r - 2 * o - e) * a + o * u + t
        }
    }
}, "undefined" != typeof module && module.exports && (module.exports = TWEEN);
},{}]},{},[6])
Host Instantly Drag and Drop Website Builder

 

Description

repo: https://github.com/legomushroom/ignite
Term
Mon, 11/27/2017 - 21:45

Related Codes

Pen ID
Pen ID
Pen ID