JSFiddle - React, Tailwind, and code Playground
by demee
HTML
<div id="blah">This is a cage full of squirrels. <br /> ~~,==,^> </div>
CSS
div#blah {
width: 80px;
height: 80px;
border: 1px solid #00f;
background-color: #def;
padding: 5px;
position: absolute;
}
JavaScript
/**
* Global shortcut variable for this namespace/class
*/
var _manim,
_mut = {},
_m = { $: function(a){ return a; } },
SUPPRESS_ANIMATION = false;
_mut.isFunction = function( fn ) {
return !!fn && typeof fn != "string" && !fn.nodeName &&
fn.constructor !== Array && /^[\s[]?function/.test( fn + "" );
};
_mut.style = {
setOpacity : function(el,o) {
el.style.opacity = o;
}
};
(function() {
/*global m3, window */
var _counter = 0,
_easing = {
linear: function(t, d) {
return t/=d;
},
inOutCubic: function(t, d){
var ts= (t /= d) * t,
tc= ts * t;
return (-2*tc + 3*ts);
},
inOutQuintic: function(t, d){
var ts = (t /= d) * t,
tc = ts * t;
return (6*tc*ts + -15*ts*ts + 10*tc);
},
inElastic: function(t, d){
var ts=(t /= d) * t;
tc= ts * t;
return (33*tc*ts + -59*ts*ts + 32*tc + -5*ts);
},
outElastic: function(t, d){
var ts=(t/=d)*t,
tc=ts*t;
return (56*tc*ts + -175*ts*ts + 200*tc + -100*ts + 20*t);
}
},
_requestAnimationFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback, element){
window.setTimeout(callback, 1000 / 60);
};
})(),
_cancelAnimationFrame = (function(){
return window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.oCancelAnimationFrame ||
...