<commit_before>SVG.easing = {
  '-': function(pos){return pos}
, '<>':function(pos){return -Math.cos(pos * Math.PI) / 2 + 0.5}
, '>': function(pos){return  Math.sin(pos * Math.PI / 2)}
, '<': function(pos){return -Math.cos(pos * Math.PI / 2) + 1}
}

var someVar = 0

SVG.FX = SVG.invent({

  create: function(element) {

    this.pos = 0        // position before easing
    this.lastPos = 0    // needed for once callbacks
    this.paused = false
    this.finished = false
    this.active = false
    this.shared = {current:this}
    this.target = element
    this._next = null
    this._prev = null

    this.id = someVar++

    this.animations = {
      // functionToCall: [morphable object, destination value]
      // e.g. x: [SVG.Number, 5]
      // this way its assured, that the start value is set correctly
    }

    this.attrs = {
      // holds all attributes which are not represented from a function svg.js provides
    }

    this.styles = {
      // holds all styles which should be animated
    }

    this.transforms = [
      // holds all transformations of teh form:
      // [A, B, C] or, [A, [25, 0, 0]] where ABC are matrixes and the array represents a rotation
    ]

    this._once = {
      // functions to fire at a specific position
      // e.g. "0.5": function foo(){}
    }


  }

, extend: {

    // sets up the animation
    animate: function(o){
      // the end time of the previous is our start
      var start = this._prev ? this._prev._end : +new Date

      o = o || {}

      if(typeof o == 'number') o = {duration:o}

      this._duration = o.duration || 1000
      this._delay = o.delay || 0

      this._start = start + this._delay
      this._end = this._start + this._duration

      this.easing = SVG.easing[o.easing || '-'] || o.easing // when easing is a function, its not in SVG.easing

      this.init = false

      return this<commit_msg>make the animate method compatible to v2 again<commit_after>SVG.easing = {
  '-': function(pos){return pos}
, '<>':function(pos){return -Math.cos(pos * Math.PI) / 2 + 0.5}
, '>': function(pos){return  Math.sin(pos * Math.PI / 2)}
, '<': function(pos){return -Math.cos(pos * Math.PI / 2) + 1}
}

var someVar = 0

SVG.FX = SVG.invent({

  create: function(element) {

    this.pos = 0        // position before easing
    this.lastPos = 0    // needed for once callbacks
    this.paused = false
    this.finished = false
    this.active = false
    this.shared = {current:this}
    this.target = element
    this._next = null
    this._prev = null

    this.id = someVar++

    this.animations = {
      // functionToCall: [morphable object, destination value]
      // e.g. x: [SVG.Number, 5]
      // this way its assured, that the start value is set correctly
    }

    this.attrs = {
      // holds all attributes which are not represented from a function svg.js provides
    }

    this.styles = {
      // holds all styles which should be animated
    }

    this.transforms = [
      // holds all transformations of teh form:
      // [A, B, C] or, [A, [25, 0, 0]] where ABC are matrixes and the array represents a rotation
    ]

    this._once = {
      // functions to fire at a specific position
      // e.g. "0.5": function foo(){}
    }


  }

, extend: {

    // sets up the animation
    animate: function(o, easing, delay){
      // the end time of the previous is our start
      var start = this._prev ? this._prev._end : +new Date

      if(typeof o == 'object'){
        easing = o.ease
        delay = o.delay
        o = o.duration
      }

      //if(typeof o == 'number') o = {duration:o}

      this._duration = o || 1000
      this._delay = delay || 0

      this._start = start + this._delay
      this._end = this._start + this._duration

      this.easing = SVG.easing[easing || '-'] || easing // when easing is a function, its not in SVG.easing

      this.init = false

      return this
{'fraction_non_alphanumeric': 0.1312691914022518, 'fraction_numerical': 0.011003070624360286, 'mean_word_length': 2.1272, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '597609', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1232, 'n_words': 389}