Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
IO 0.66 KB | None | 0 0
  1. //constructor
  2. function Animation(){
  3.     this.interval = false,
  4.     propSet = false,
  5.     this.start = 0,
  6.     this.end = 0,
  7.     this.time = 0,
  8.     this.style = '';
  9.  
  10.       propSet = true;
  11.     }
  12.  
  13.     console.log(start);
  14.  
  15.     if(!this.interval) this.interval = setInterval(function(){}, 50);
  16.   };
  17.  
  18.   Animation.prototype.setProps = function(oProps){
  19.       for(varName in oProps){
  20.         if( oProps.hasOwnProperty("" + varName){
  21.       this["" + varName] = oProps[varName];
  22.     }
  23.       }
  24.  
  25.  
  26. //instantiation
  27.       var a = new Animation();
  28.       a.setProps({
  29.         'start' : -21,
  30.         'end'   : 0,
  31.         'time'  : 3,
  32.         'style' : 'top'
  33.       });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement