@File: /surebert/effect.js
@Version: v3.11
@Description: If you are going to be using color effects make sure to include sb.colors.js by adding a script tag or using sb.include('colors'); or adding it to your surebert cache
@File: /surebert/effect.js
@Type: constructor
@Description: Used to create time based style effects
//set the DOM el we want to work with
var myDiv = $('#accord');
//create an custom effect
var myEffect = new sb.effect({
el : myDiv,
begin : 10,
change : 12,
duration : 120,
onChange : function(c){
this.el.style.fontSize = this.value+'px';
},
onEnd : function(){
//do something
},
onStop : function(){
//do soemthing
}
});
myEffect.start();
@File: /surebert/effect.js
@Type: integer
@Description: The number of times the effect has iterated so far between begin and end. You have reference to this in your effect onChange as this.count
@File: /surebert/effect.js
@Type: integer
@Description: The duration of teh effect from begin to end. Default is 24. Lower numbers are faster, higher numbers are slower.
@File: /surebert/effect.js
@Type: prototype
@Description: prototype methods and properties for a sb.effect instance
@File: /surebert/effect.js
@Type: method
@Description: reset the effect to count and time to 0 and resets value and valueRounded to this.begin an. Also fires the effects onReset method if you have pecified one
myEffect.reset();
@File: /surebert/effect.js
@Type: method
@Description: restarts the effect. run this.reset() and this.start()
myEffect.restart();
@File: /surebert/effect.js
@Type: method
@Description: applies properties from an additional params object with the same structure as the one used in the constructor
myEffect.setParams();
@File: /surebert/effect.js
@Type: method
@Description: starts the effect to run the effect
myEffect.start();
@File: /surebert/effect.js
@Type: method
@Description: stops the effect from running. Also fires the effects onStop method if you have specified one
myEffect.stop();
@File: /surebert/effect.js
@Type: string
@Description: The type of tweening used, see sb.tween
@File: /surebert/effect.js
@Type: object
@Description: A reference to all effects registered ont he page
@File: /surebert/effect.js
@Type: method
@Description: Starts all the effects on the page
@File: /surebert/effect.js
@Type: method
@Description: Stops all the effects on the page
@File: /surebert/effect.js
@Type: method
var myValue = sb.effects.tween.infuse({
inOutCirc : function(t,b,c,d) {
if ((t/=d/2) < 1){
return c/2 * (1-Math.sqrt(1-t*t))+b;
}
return c/2 * (Math.sqrt(1- (t-=2)*t)+1) +b;
}
});
@File: /surebert/effect.js
@Type: object
@Description: If you are going to be using color effects make sure to include sb.colors.js by adding a script tag or using sb.include('colors.getTweenColor'); or adding it to your surebert cache .Tweens Math adapted from http://www.synthesisters.com/hypermail/max-msp/Nov05/34305.html
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inCirc(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inCubic(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inExpo(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inOutCirc(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inOutCubic(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inOutExpo(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inOutQuad(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inOutQuart(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inOutQuint(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inOutSine(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inQuad(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inQuart(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.inSine(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.linear(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.outCirc(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.outCubic(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.outExpo(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.outQuad(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.outQuart(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.outQuint(100, 0, 50, 5);
@File: /surebert/effect.js
@Type: method
@Description: A method for interpolating between two values over time
var myValue = sb.effects.tween.outSine(100, 0, 50, 5);