Permalink
Browse files

shuffling things around to organize this all better

  • Loading branch information...
1 parent a0ebc90 commit 693d28e04c6a5c4bfa0fa55da044b7b9de60eab3 @heygrady committed Oct 6, 2010
View
28 js/modernizr-1.5.min.js
@@ -1,28 +0,0 @@
-/*!
- * Modernizr JavaScript library 1.5
- * http://www.modernizr.com/
- *
- * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/
- * Dual-licensed under the BSD and MIT licenses.
- * http://www.modernizr.com/license/
- *
- * Featuring major contributions by
- * Paul Irish - http://paulirish.com
- */
- window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b<c;b++)J[a[b]]=!!(a[b]in n);return J}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));j[Q]=function(a){for(var b=0,c,h=a.length;b<h;b++){n.setAttribute("type",a[b]);if(c=n.type!==
- "text"){n.value=K;/tel|search/.test(n.type)||(c=/url|email/.test(n.type)?n.checkValidity&&n.checkValidity()===false:n.value!=K)}L[a[b]]=!!c}return L}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var j={},s=e.documentElement,D=e.createElement("modernizr"),m=D.style,n=e.createElement("input"),E="input",Q=E+"types",K=":)",M=Object.prototype.toString,y=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d={},L={},J={},N=[],u=function(){var a={select:"input",
- change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},b={};return function(c,h){var t=arguments.length==1;if(t&&b[c])return b[c];h=h||document.createElement(a[c]||"div");c="on"+c;var g=c in h;if(!g&&h.setAttribute){h.setAttribute(c,"return;");g=typeof h[c]=="function"}h=null;return t?(b[c]=g):g}}(),F={}.hasOwnProperty,O;O=typeof F!=="undefined"&&typeof F.call!=="undefined"?function(a,b){return F.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};
- d.canvas=function(){return!!e.createElement("canvas").getContext};d.canvastext=function(){return!!(d.canvas()&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.geolocation=function(){return!!navigator.geolocation};d.crosswindowmessaging=function(){return!!i.postMessage};d.websqldatabase=function(){var a=!!i.openDatabase;if(a)try{a=!!openDatabase("testdb","1.0","html5 test db",2E5)}catch(b){a=false}return a};d.indexedDB=function(){return!!i.indexedDB};d.hashchange=function(){return u("hashchange",
- i)&&(document.documentMode===I||document.documentMode>7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+
- m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!==
- -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty",
- "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a};
- d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBAD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AAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";
- e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+
- (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};
- d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker};
- d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg",
- "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f,
- k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x<f.length;){k=f[x].media||k;h(f[x].imports,k);c(k,f[x].cssText.replace(l,q))}}for(var t=b.documentElement,g=b.createDocumentFragment(),o={},w="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",v=w.split("|"),p=[],H=-1,G="firstChild",A="createElement";++H<v.length;){b[A](v[H]);g[A](v[H])}g=
- g.appendChild(b[A]("div"));a.attachEvent("onbeforeprint",function(){for(var f,k=b.getElementsByTagName("*"),l,q,x=new RegExp("^"+w+"$","i"),B=-1;++B<k.length;)if((f=k[B])&&(q=f.nodeName.match(x))){l=new RegExp("^\\s*<"+q+"(.*)\\/"+q+">\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint",
- function(){for(var f=-1,k;++f<p.length;)p[f][1].parentNode.replaceChild(p[f][0],p[f][1]);for(k in o)t[G].removeChild(o[k]);o={};p=[]})}(this,e);j._enableHTML5=true;j._version="1.5";s.className=s.className.replace(/\bno-js\b/,"")+" js";s.className+=" "+N.join(" ");return j}(this,this.document);
View
13 lib/modernizr-1.1.min.js
@@ -1,13 +0,0 @@
-/*
- * Modernizr JavaScript library 1.1
- * http://modernizr.com/
- *
- * Copyright (c) 2009 Faruk Ates - http://farukat.es/
- * Licensed under the MIT license.
- * http://modernizr.com/license/
- *
- * Featuring major contributions by
- * Paul Irish - http://paulirish.com
- * Ben Alman - http://benalman.com/
- */
- window.Modernizr=(function(P,l){var _='1.1', J={},T=true,ab=true,M=100,ad=l.documentElement,U=l.createElement("modernizr"),k=U.style,Z=l.createElement("input"),o="canvas",Y="canvastext",V="rgba",g="hsla",Q="multiplebgs",x="borderimage",D="borderradius",v="boxshadow",X="opacity",B="cssanimations",R="csscolumns",a="cssgradients",p="cssreflections",h="csstransforms",w="csstransforms3d",aa="csstransitions",F="fontface",K="geolocation",e="video",A="audio",d="input",u=d+"types",N="background",b=N+"Color",G="canPlayType",H="localstorage",j="sessionstorage",C="webworkers",O="applicationcache",c=" -o- -moz- -ms- -webkit- ".split(" "),s={},z={},r={},q,S,W,L,n=[];function y(f){k.cssText=f}function E(i,f){return y(c.join(i+";")+(f||""))}function I(i,f){return i.indexOf(f)!==-1}function ac(m,ae){for(var f in m){if(k[m[f]]!==undefined&&(!ae||ae(m[f]))){return true}}}function t(ae,m){var i=ae.charAt(0).toUpperCase()+ae.substr(1),f=[ae,"webkit"+i,"Moz"+i,"moz"+i,"o"+i,"ms"+i];return !!ac(f,m)}s[o]=function(){return !!l.createElement(o).getContext};s[Y]=function(){return !!(s[o]()&&typeof l.createElement(o).getContext("2d").fillText=="function")};s[K]=function(){return !!navigator.geolocation};s[V]=function(){y(N+"-color:rgba(150,255,150,.5)");return I(k[b],V)};s[g]=function(){y(N+"-color:hsla(120,40%,100%,.5)");return I(k[b],V)};s[Q]=function(){y(N+":url(m.png),url(a.png),#f99 url(m.png)");return/(url\s*\(.*?){3}/.test(k[N])};s[x]=function(){return t("borderImage")};s[D]=function(){return t("borderRadius","",function(f){return I(f,"orderRadius")})};s[v]=function(){return t("boxShadow")};s[X]=function(){y("opacity:.5");return I(k[X],"0.5")};s[B]=function(){return t("animationName")};s[R]=function(){return t("columnCount")};s[a]=function(){var m=N+"-image:",i="gradient(linear,left top,right bottom,from(#9f9),to(white));",f="linear-gradient(left top,#9f9, white);";y(m+i+m+"-webkit-"+i+m+"-moz-"+i+m+"-o-"+i+m+"-ms-"+i+m+f+m+"-webkit-"+f+m+"-moz-"+f+m+"-o-"+f+m+"-ms-"+f);return I(k.backgroundImage,"gradient")};s[p]=function(){return t("boxReflect")};s[h]=function(){return !!ac(["transformProperty","webkitTransform","MozTransform","mozTransform","oTransform","msTransform"])};s[w]=function(){return !!ac(["perspectiveProperty","webkitPerspective","MozPerspective","mozPerspective","oPerspective","msPerspective"])};s[aa]=function(){return t("transitionProperty")};s[F]=(function(){var i;if(!(!/*@cc_on@if(@_jscript_version>=5)!@end@*/0)){i=true}else{var aj=l.createElement("style"),ae=l.createElement("span"),ak,af,ah=false,ag=l.body,ai,m;aj.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAA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gADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";l.getElementsByTagName("head")[0].appendChild(aj);ae.setAttribute("style","font:99px _,serif;position:absolute;visibility:hidden");if(!ag){ag=ad.appendChild(l.createElement(F));ah=true}ae.innerHTML="........";ae.id="fonttest";ag.appendChild(ae);ak=ae.offsetWidth;ae.style.font="99px testfont,_,serif";i=ak!==ae.offsetWidth;var f=function(){i=J[F]=ak!==ae.offsetWidth;ad.className=ad.className.replace(/(no-)?font.*?\b/,"")+(i?" ":" no-")+F;ai&&(m=true)&&ai(i);ah&&setTimeout(function(){ag.parentNode.removeChild(ag)},50)};setTimeout(f,M)}J._fontfaceready=function(al){(m||i)?al(i):(ai=al)};return function(){return i||ak!==ae.offsetWidth}})();s[e]=function(){var i=l.createElement(e),f=!!i[G];if(f){f=new Boolean(f);f.ogg=i[G]('video/ogg; codecs="theora, vorbis"');f.h264=i[G]('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')}return f};s[A]=function(){var i=l.createElement(A),f=!!i[G];if(f){f=new Boolean(f);f.ogg=i[G]('audio/ogg; codecs="vorbis"');f.mp3=i[G]("audio/mpeg3;");f.wav=i[G]('audio/wav; codecs="1"');f.m4a=i[G]("audio/x-m4a;")}return f};s[H]=function(){return"localStorage" in P};s[j]=function(){return"sessionStorage" in P};s[C]=function(){return !!P.Worker};s[O]=function(){return !!P.applicationCache};for(L in s){if(s.hasOwnProperty(L)){n.push((!(J[L]=s[L]())&&ab?"no-":"")+L)}}J.addTest=function(f,i){if(this.hasOwnProperty(f)){}i=!!(i());ad.className+=" "+(!i&&ab?"no-":"")+f;J[f]=i};J[d]=(function(m){for(var f in m){r[m[f]]=!!(m[f] in Z)}return r})("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));J[u]=(function(m){for(var f in m){Z.setAttribute("type",m[f]);z[m[f]]=!!(Z.type!=="text")}return z})("search tel url email datetime date month week time datetime-local number range color".split(" "));y("");U=Z=null;if(T&&!(!/*@cc_on!@*/0)){q="abbr article aside audio canvas datalist details eventsource figure footer header hgroup mark menu meter nav output progress section time video".split(" ");W=q.length+1;while(--W){S=l.createElement(q[W])}S=null}J._enableHTML5=T;J._enableNoClasses=ab;J._version=_;(function(f,i){f[i]=f[i].replace(/\bno-js\b/,"js")})(ad,"className");ad.className+=" "+n.join(" ");return J})(this,this.document);
View
120 lib/sylvester-matrix-0.1.3.js
@@ -1,120 +0,0 @@
-// === Sylvester ===
-// Vector and Matrix mathematics modules for JavaScript
-// Copyright (c) 2007 James Coglan
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the "Software"),
-// to deal in the Software without restriction, including without limitation
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,
-// and/or sell copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-// DEALINGS IN THE SOFTWARE.
-
-var Sylvester = {
- version: '0.1.3',
- precision: 1e-6
-};
-
-function Matrix() {}
-Matrix.prototype = {
- // Returns element (i,j) of the matrix
- e: function(i,j) {
- if (i < 1 || i > this.elements.length || j < 1 || j > this.elements[0].length) { return null; }
- return this.elements[i-1][j-1];
- },
-
- // Maps the matrix to another matrix (of the same dimensions) according to the given function
- map: function(fn) {
- var els = [], ni = this.elements.length, ki = ni, i, nj, kj = this.elements[0].length, j;
- do { i = ki - ni;
- nj = kj;
- els[i] = [];
- do { j = kj - nj;
- els[i][j] = fn(this.elements[i][j], i + 1, j + 1);
- } while (--nj);
- } while (--ni);
- return Matrix.create(els);
- },
-
- // Returns true iff the matrix can multiply the argument from the left
- canMultiplyFromLeft: function(matrix) {
- var M = matrix.elements || matrix;
- if (typeof(M[0][0]) == 'undefined') { M = Matrix.create(M).elements; }
- // this.columns should equal matrix.rows
- return (this.elements[0].length == M.length);
- },
-
- // Returns the result of multiplying the matrix from the right by the argument.
- // If the argument is a scalar then just multiply all the elements. If the argument is
- // a vector, a vector is returned, which saves you having to remember calling
- // col(1) on the result.
- multiply: function(matrix) {
- if (!matrix.elements) {
- return this.map(function(x) { return x * matrix; });
- }
- var returnVector = matrix.modulus ? true : false;
- var M = matrix.elements || matrix;
- if (typeof(M[0][0]) == 'undefined') { M = Matrix.create(M).elements; }
- if (!this.canMultiplyFromLeft(M)) { return null; }
- var ni = this.elements.length, ki = ni, i, nj, kj = M[0].length, j;
- var cols = this.elements[0].length, elements = [], sum, nc, c;
- do { i = ki - ni;
- elements[i] = [];
- nj = kj;
- do { j = kj - nj;
- sum = 0;
- nc = cols;
- do { c = cols - nc;
- sum += this.elements[i][c] * M[c][j];
- } while (--nc);
- elements[i][j] = sum;
- } while (--nj);
- } while (--ni);
- var M = Matrix.create(elements);
- return returnVector ? M.col(1) : M;
- },
-
- x: function(matrix) { return this.multiply(matrix); },
-
- // Set the matrix's elements from an array. If the argument passed
- // is a vector, the resulting matrix will be a single column.
- setElements: function(els) {
- var i, elements = els.elements || els;
- if (typeof(elements[0][0]) != 'undefined') {
- var ni = elements.length, ki = ni, nj, kj, j;
- this.elements = [];
- do { i = ki - ni;
- nj = elements[i].length; kj = nj;
- this.elements[i] = [];
- do { j = kj - nj;
- this.elements[i][j] = elements[i][j];
- } while (--nj);
- } while(--ni);
- return this;
- }
- var n = elements.length, k = n;
- this.elements = [];
- do { i = k - n;
- this.elements.push([elements[i]]);
- } while (--n);
- return this;
- }
-};
-
-// Constructor function
-Matrix.create = function(elements) {
- var M = new Matrix();
- return M.setElements(elements);
-};
-
-var $M = Matrix.create;
View
23 lib/sylvester-matrix-0.1.3.min.js
@@ -1,23 +0,0 @@
-// === Sylvester ===
-// Vector and Matrix mathematics modules for JavaScript
-// Copyright (c) 2007 James Coglan
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the "Software"),
-// to deal in the Software without restriction, including without limitation
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,
-// and/or sell copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-// DEALINGS IN THE SOFTWARE.
-
-var Sylvester={version:"0.1.3",precision:0.000001};function Matrix(){}Matrix.prototype={e:function(b,a){if(b<1||b>this.elements.length||a<1||a>this.elements[0].length){return null}return this.elements[b-1][a-1]},map:function(f){var e=[],d=this.elements.length,h=d,c,b,g=this.elements[0].length,a;do{c=h-d;b=g;e[c]=[];do{a=g-b;e[c][a]=f(this.elements[c][a],c+1,a+1)}while(--b)}while(--d);return Matrix.create(e)},canMultiplyFromLeft:function(a){var b=a.elements||a;if(typeof(b[0][0])=="undefined"){b=Matrix.create(b).elements}return(this.elements[0].length==b.length)},multiply:function(q){if(!q.elements){return this.map(function(c){return c*q})}var h=q.modulus?true:false;var n=q.elements||q;if(typeof(n[0][0])=="undefined"){n=Matrix.create(n).elements}if(!this.canMultiplyFromLeft(n)){return null}var e=this.elements.length,f=e,l,b,d=n[0].length,g;var p=this.elements[0].length,a=[],m,k,o;do{l=f-e;a[l]=[];b=d;do{g=d-b;m=0;k=p;do{o=p-k;m+=this.elements[l][o]*n[o][g]}while(--k);a[l][g]=m}while(--b)}while(--e);var n=Matrix.create(a);return h?n.col(1):n},x:function(a){return this.multiply(a)},setElements:function(h){var m,a=h.elements||h;if(typeof(a[0][0])!="undefined"){var d=a.length,f=d,b,c,l;this.elements=[];do{m=f-d;b=a[m].length;c=b;this.elements[m]=[];do{l=c-b;this.elements[m][l]=a[m][l]}while(--b)}while(--d);return this}var e=a.length,g=e;this.elements=[];do{m=g-e;this.elements.push([a[m]])}while(--e);return this}};Matrix.create=function(a){var b=new Matrix();return b.setElements(a)};var $M=Matrix.create;
View
51 test/_test.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Untitled Document</title>
+<style type="text/css">
+.wrap {
+ width: 150px;
+ height: 150px;
+ background-color: #eeeeee;
+ margin: 25px;
+}
+.transform {
+ width: 130px;
+ height: 130px;
+ padding: 10px;
+ background-color: deeppink;
+}
+.ie {
+
+}
+</style>
+</head>
+
+<body>
+
+<div class="wrap">
+ <div class="transform">Transform This</div>
+</div>
+<div class="wrap">
+ <div class="transform ie">Transform This</div>
+</div>
+<div class="wrap">
+ <div class="transform ie">Transform This</div>
+</div>
+
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
+<script type="text/javascript" src="lib/jquery.transform.js"></script>
+<script type="text/javascript">
+ $('.transform').click(function() {
+ $(this).transform({scale: '1.25', skew: '25', rotate: 180, reflectY: true, translate: 25}, {forceMatrix: true});
+ });
+
+ var i = 0;
+ $('.ie').unbind().click(function() {
+ $(this).transform({scale: '1.25', skew: '25', rotate: 180, reflectY: true, translate: 25});
+ });
+
+</script>
+</body>
+</html>
View
0 css/global.css → test/css/global.css
File renamed without changes.
View
0 css/style.css → test/css/style.css
File renamed without changes.
View
0 css/transform.css → test/css/transform.css
File renamed without changes.
View
0 i/arrow-up.png → test/i/arrow-up.png
File renamed without changes
View
0 i/background.jpg → test/i/background.jpg
File renamed without changes
View
0 i/elephant.png → test/i/elephant.png
File renamed without changes
View
0 i/example-all.png → test/i/example-all.png
File renamed without changes
View
0 i/example-center-default.png → test/i/example-center-default.png
File renamed without changes
View
0 i/example-center.png → test/i/example-center.png
File renamed without changes
View
0 i/example-default.png → test/i/example-default.png
File renamed without changes
View
0 i/example-rotate-45-skewx-25.png → test/i/example-rotate-45-skewx-25.png
File renamed without changes
View
0 i/example-rotate-45.png → test/i/example-rotate-45.png
File renamed without changes
View
0 i/example-scale-0.5-0.5.png → test/i/example-scale-0.5-0.5.png
File renamed without changes
View
0 i/example-scalex-0.5.png → test/i/example-scalex-0.5.png
File renamed without changes
View
0 i/example-scaley-0.5.png → test/i/example-scaley-0.5.png
File renamed without changes
View
0 i/example-skew-25-25.png → test/i/example-skew-25-25.png
File renamed without changes
View
0 i/example-skewx-25-rotate-45.png → test/i/example-skewx-25-rotate-45.png
File renamed without changes
View
0 i/example-skewx-25-skewy-25.png → test/i/example-skewx-25-skewy-25.png
File renamed without changes
View
0 i/example-skewx-25.png → test/i/example-skewx-25.png
File renamed without changes
View
0 i/example-skewy-25.png → test/i/example-skewy-25.png
File renamed without changes
View
0 i/example-top-left.png → test/i/example-top-left.png
File renamed without changes
View
0 i/example-translate-25-25.png → test/i/example-translate-25-25.png
File renamed without changes
View
0 i/example-translatex-25.png → test/i/example-translatex-25.png
File renamed without changes
View
0 i/example-translatey-25.png → test/i/example-translatey-25.png
File renamed without changes
View
206 test/js/attr.js
@@ -0,0 +1,206 @@
+var rfunc = /(matrix|reflect(XY|X|Y)?|rotate|scale[X|Y]?|skew[X|Y]?|translate[X|Y]?)\((*?)\)/g,
+ rspace = /\s+/,
+ rcspace = /,\s+/;
+
+$.extend($.transform.prototype, {
+ /**
+ * @param String func with associated value rotate(13deg)
+ */
+ addTransform: function( func ) {
+ // split the function into component parts
+ var parts = rfunc.exec(func);
+ if (parts) {
+ var $elem = this.$elem,
+ transform = $elem.attr('data-transform');
+
+ if (!transform) {
+ // it's empty, just save
+ $elem.attr('data-transform', func);
+ } else if (transform.indexOf(parts[1]) > -1) {
+ // if we've already got it, replace it
+ var result = null,
+ string = '';
+
+ // loop the funcs to replace
+ while ((result = rfunc.exec(transform)) != null) {
+ if (parts[1] == result[1]) {
+ string += ' ' + func;
+ } else {
+ string += ' ' + result[0];
+ }
+ }
+ $elem.attr('data-transform', jQuery.trim(string));
+ } else {
+ // this is a new one, just save
+ $elem.attr('data-transform', transform + ' ' + func);
+ }
+ }
+ },
+
+ /**
+ * @param String func
+ */
+ removeTransform: function( func ) {
+ if (func) {
+ var $elem = this.$elem,
+ transform = $elem.attr('data-transform'),
+ result = null,
+ string = '';
+
+ if (transform && transform.indexOf(func) > -1) {
+ // loop the funcs to remove
+ while ((result = rfunc.exec(transform)) != null) {
+ if (func != result[1]) {
+ string += ' ' + result[0];
+ }
+ }
+
+ string = jQuery.trim(string);
+ if (!string) {
+ $elem.removeAttr('data-transform');
+ } else {
+ $elem.attr('data-transform', jQuery.trim(string));
+ }
+ }
+ } else {
+ this.$elem.removeAttr('data-transform');
+ }
+
+ },
+
+ /**
+ * @param String func
+ * @return bool
+ */
+ hasTransform: function( func ) {
+ var transform = this.$elem.attr('data-transform');
+
+ if (!transform) {
+ return false;
+ } else if (func && transform.indexOf(func) > -1) {
+ return true;
+ }
+ return false;
+ },
+
+ /**
+ * @param String func
+ * @param Array
+ */
+ getTransform: function( func ) {
+ var transform = this.$elem.attr('data-transform');
+
+ if (!transform) {
+ // console.log('getTransform(' + func + ') =>', 'nothing');
+ return null;
+ }
+
+ var result = null;
+ if (func && transform.indexOf(func) > -1) {
+ // return a specific value
+ var value;
+ while ((result = rfunc.exec(transform)) != null) {
+ if (func == result[1]) {
+ value = result[4].split(rcspace);
+ //console.log(func, value);
+ return value.length == 1 ? value[0] : value;
+ }
+ }
+ } else if (!func) {
+ // return all values
+ var values = {}, value;
+ while ((result = rfunc.exec(transform)) != null) {
+ value = result[4].split(rcspace);
+ values[result[2]] = value.length == 1 ? value[0] : value;
+ }
+ return values;
+ }
+ console.log(transform);
+ return null;
+ },
+
+ /**
+ * Clears out all of the custom attributed
+ * @param void
+ */
+ clearAttrs: function() {
+ this.$elem.attr('data-transform', '');
+ },
+
+ /**
+ * @param Object funcs a list of transform functions to store on this element
+ * @return void
+ */
+ setAttrs: function(funcs) {
+ var string = '',
+ value;
+ for (var func in funcs) {
+ value = funcs[func];
+
+ // TODO: normalize values on px, deg, etc
+ if ($.isArray(value)) {
+ value = value.join(', ');
+ }
+
+ string += ' ' + func + '(' + value + ')';
+ }
+ this.$elem.attr('data-transform', jQuery.trim(string));
+ },
+
+ /**
+ * @param string func name of a transform function
+ * @param mixed value with proper units
+ * @return void
+ */
+ setAttr: function(func, value) {
+ // TODO: normalize values on px, deg, etc
+ if ($.isArray(value)) {
+ value = value.join(', ');
+ }
+
+ this.addTransform(func + '(' + value + ')'); //should be unitless
+ },
+
+ /**
+ * @return Object values with proper units
+ */
+ getAttrs: function() {
+ return this.getTransform();
+ },
+
+ /**
+ * @param String func
+ * @return Array of values
+ */
+ getAttr: function(func) {
+ //NOTE: Moz and WebKit always return the value of transform
+ // as a matrix and obscures the individual functions. So
+ // it's impossible to know what was set in the CSS.
+ var value = this.getTransform(func);
+ var rspace = /\s/;
+ var rperc = /%/;
+
+ if (func == 'origin' && !value && value !== 0) {
+ // we can look up the origin in CSS
+ value = this.$elem.css(this.transformProperty + '-origin');
+
+ //Moz reports the value in % if there hasn't been a transformation yet
+ if (rperc.test(value)) {
+ value = value.split(rspace);
+ if (rperc.test(value[0])) {
+ value[0] = this.safeOuterWidth() * (parseFloat(value[0])/100);
+ }
+ if (rperc.test(value[1])) {
+ value[1] = this.safeOuterHeight() * (parseFloat(value[1])/100);
+ }
+ } else if (!$.isArray(value)) {
+ value = value.split(rspace);
+ }
+ } else if (!value && value !== 0 && $.transform.rfunc.scale.test(func)) {
+ //scale functions return 1 by default
+ //value = 1;
+ }
+ //console.log('getAttr(' + func + ') =>', value);
+ return value;
+ }
+});
View
0 lib/form.js → test/js/form.js
File renamed without changes.
View
0 test.html → test/test.html
File renamed without changes.
View
402 test/test2.html
@@ -0,0 +1,402 @@
+<!doctype html>
+<html lang="en" class="no-js">
+<head>
+ <meta charset="utf-8">
+
+ <!-- http://www.phpied.com/conditional-comments-block-downloads/ -->
+ <!--[if IE]><![endif]-->
+
+ <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
+ <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"><![endif]-->
+
+ <title></title>
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <!-- Mobile Viewport Fix
+ @link http://j.mp/mobileviewport & http://davidbcalhoun.com/2010/viewport-metatag
+ device-width : Occupy full width of the screen in its current orientation
+ initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
+ maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
+ -->
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
+
+ <!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
+ <link rel="shortcut icon" href="/favicon.ico">
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png">
+
+ <!-- CSS : implied media="all"-->
+ <link rel="stylesheet" href="http://yui.yahooapis.com/3.1.1/build/cssreset/reset-min.css" />
+ <link rel="stylesheet" href="css/style.css?v=0.1">
+
+ <!-- All JavaScript at the bottom, except for Modernizr. -->
+ <script src="js/modernizr-1.5.min.js"></script>
+</head>
+
+<!-- http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
+
+<!--[if lt IE 7 ]> <body class="ie ie6 lt-ie7 lt-ie8 lt-ie9"> <![endif]-->
+<!--[if IE 7 ]> <body class="ie ie7 lt-ie8 lt-ie9"> <![endif]-->
+<!--[if IE 8 ]> <body class="ie ie8 lt-ie9"> <![endif]-->
+<!--[if IE 9 ]> <body class="ie ie9"> <![endif]-->
+<!--[if gt IE 9]> <body> <![endif]-->
+<!--[if !IE]><!--> <body> <!--<![endif]-->
+ <div id="container">
+ <div id="header">
+ <button id="go">Click It!</button>
+ <button id="test">Test!</button>
+ <h2>Test</h2>
+ </div>
+ <div id="body">
+
+ <div class="clearfix">
+ <div class="box">
+ <div class="outer">
+ <div class="transform">
+ <img src="i/elephant.png" height="150" width="150" />
+ </div>
+ </div>
+ </div>
+ <div class="box">
+ <div class="outer">
+ <div class="transform">
+ <img src="i/arrow-up.png" height="150" width="150" />
+ </div>
+ </div>
+ </div>
+ <div class="box plain">
+ <div class="outer">
+ <div class="transform">
+ <p>Some Text</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="clearfix">
+ <div class="box">
+ <div class="outer">
+ <div class="animate">
+ <img src="i/elephant.png" height="150" width="150" />
+ </div>
+ </div>
+ </div>
+ <div class="box">
+ <div class="outer">
+ <div class="animate">
+ <img src="i/arrow-up.png" height="150" width="150" />
+ </div>
+ </div>
+ </div>
+ <div class="box plain">
+ <div class="outer">
+ <div class="animate">
+ <p>Some Text</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="clearfix">
+ <div class="box">
+ <div class="outer">
+ <div class="transition">
+ <img src="i/elephant.png" height="150" width="150" />
+ </div>
+ </div>
+ </div>
+ <div class="box">
+ <div class="outer">
+ <div class="transition">
+ <img src="i/arrow-up.png" height="150" width="150" />
+ </div>
+ </div>
+ </div>
+ <div class="box plain">
+ <div class="outer">
+ <div class="transition">
+ <p>Some Text</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <div class="box plain">
+ <div class="outer">
+ <div class="transform">
+ <p>Some Text</p>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+ <!-- JavaScrpt -->
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js"></script>
+ <script src="lib/jquery.transform.js"></script>
+ <script type="text/javascript">
+ var log = 0;
+ if ($.transform.prototype.exec) {
+ var _exec = $.transform.prototype.exec;
+ $.transform.prototype.exec = function(){
+ log++;
+ return _exec.apply(this, arguments);
+ };
+ } else if ($.transform.prototype.transform) {
+ var _transform = $.transform.prototype.transform;
+ $.transform.prototype.transform = function(){
+ log++;
+ return _transform.apply(this, arguments);
+ };
+ }
+
+ $('#test').click(test);
+
+ function test() {
+ var $elem = $elem = $('.transform:last');
+
+ $elem.transform({matrix: [.75, 0, 0, .75], reflect: false});
+ }
+
+
+ $('#go').click(go);
+
+ var $elem = $('.transform, .transition');
+ var $anim = $('.animate');
+ var $text = $('h2');
+ var step = 0;
+
+ function next(current) {
+ if (step == current) {
+ step++;
+ go();
+ }
+ }
+
+ function go() {
+ switch (step) {
+ case 0:
+ $elem.transform({"reflect": true});
+ $anim.animate({"reflect": true}, {
+ 'complete': function(){
+ //$anim.transform({"reflect": true});
+ next(0);
+ }
+ });
+ $text.text('reflect');
+
+ break;
+ case 1:
+ $elem.transform({"reflectX": true});
+ $anim.animate({"reflectX": true}, {
+ 'complete': function(){
+ //$anim.transform({"reflectX": true});
+ next(1);
+ }
+ });
+ $text.text('reflectX');
+ break;
+ case 2:
+ $elem.transform({"reflectXY": true});
+ $anim.animate({"reflectXY": true}, {
+ 'complete': function(){
+ //$anim.transform({"reflectXY": true});
+ next(2);
+ }
+ });
+ $text.text('reflectXY');
+ break;
+ case 3:
+ $elem.transform({"reflectY": true});
+ $anim.animate({"reflectY": true}, {
+ 'complete': function(){
+ //$anim.transform({"reflectY": true});
+ next(3);
+ }
+ });
+ $text.text('reflectY');
+ break;
+ case 4:
+ $elem.transform({"reflectXY": true});
+ $anim.animate({"reflectXY": true}, {
+ 'complete': function(){
+ //$anim.transform({"reflectXY": true});
+ next(4);
+ }
+ });
+ $text.text('reflectXY');
+ break;
+ case 5:
+ $elem.transform({"rotate": '13deg'});
+ $anim.animate({"rotate": 13, "reflectXY": false}, {
+ 'complete': function(){
+ $anim.transform({"rotate": 13});
+ next(5);
+ }
+ });
+ $text.text('rotate: 13');
+ break;
+ case 6:
+ $elem.transform({"rotate": '-13deg'});
+ $anim.animate({"rotate": -13}, {
+ 'complete': function(){
+ $anim.transform({"rotate": -13});
+ next(6);
+ }
+ });
+ $text.text('rotate: -13');
+ break;
+ case 7:
+ $elem.transform({"rotate": 195});
+ $anim.animate({"rotate": 195}, {
+ 'complete': function(){
+ $anim.transform({"rotate": 195});
+ next(7);
+ }
+ });
+ $text.text('rotate: 195');
+ break;
+ case 8:
+ $elem.transform({"rotate": -195});
+ $anim.animate({"rotate": -195}, {
+ 'complete': function(){
+ $anim.transform({"rotate": -195});
+ next(8);
+ }
+ });
+ $text.text('rotate : -195');
+ break;
+ case 9:
+ $elem.transform({"scale": .75});
+ $anim.animate({"scale": .75, "rotate": 0}, {
+ 'complete': function(){
+ $anim.transform({"scale": .75});
+ next(9);
+ }
+ });
+ $text.text('scale : .75');
+ break;
+ case 10:
+ $elem.transform({"scale": [.75, .75]});
+ $anim.animate({"scale": [.75, .75]}, {
+ 'complete': function(){
+ $anim.transform({"scale": [.75, .75]});
+ next(10);
+ }
+ });
+ $text.text('scale : [.75, .75]');
+ break;
+ case 11:
+ $elem.transform({"scaleX": .75});
+ $anim.animate({"scaleX": .75, "scale": [1, 1]}, {
+ 'complete': function(){
+ $anim.transform({"scaleX": .75});
+ next(11);
+ }
+ });
+ $text.text('scaleX : .75');
+ break;
+ case 12:
+ $elem.transform({"scaleY": .75});
+ $anim.animate({"scaleY": .75, "scaleX": 1}, {
+ 'complete': function(){
+ $anim.transform({"scaleY": .75});
+ next(12);
+ }
+ });
+ $text.text('scaleY : .75');
+ break;
+ case 13:
+ $elem.transform({"skew": [13, 0]});
+ $anim.animate({"skew": '13, 0', "scaleY": 1}, {
+ 'complete': function(){
+ $anim.transform({"skew": [13, 0]});
+ next(13);
+ }
+ });
+ $text.text('skew : 13');
+ break;
+ case 14:
+ $elem.transform({"skew": ['13', 13]});
+ $anim.animate({"skew": '13, 13'}, {
+ 'complete': function(){
+ $anim.transform({"skew": [13, 13]});
+ next(14);
+ }
+ });
+ $text.text('skew : [13, 13]');
+ break;
+ case 15:
+ $elem.transform({"skewX": '13'});
+ $anim.animate({"skewX": '13', "skew": '0, 0'}, {
+ 'complete': function(){
+ $anim.transform({"skewX": 13});
+ next(15);
+ }
+ });
+ $text.text('skewX : 13');
+ break;
+ case 16:
+ $elem.transform({"skewY": 13});
+ $anim.animate({"skewY": 13, "skewX": 0}, {
+ 'complete': function(){
+ $anim.transform({"skewY": 13});
+ next(16);
+ }
+ });
+ $text.text('skewY : 13');
+ break;
+ case 17:
+ $elem.transform({"translate": [13, 0]});
+ $anim.animate({"translate": '13, 0', "skewY": 0}, {
+ 'complete': function(){
+ $anim.transform({"translate": [13, 0]});
+ next(17);
+ }
+ });
+ $text.text('translate : 13');
+ break;
+ case 18:
+ $elem.transform({"translate": [13, 13]});
+ $anim.animate({"translate": '13, 13'}, {
+ 'complete': function(){
+ $anim.transform({"translate": [13, 13]});
+ next(18);
+ }
+ });
+ $text.text('translate : [13, 13]');
+ break;
+ case 19:
+ $elem.transform({"translateX": 13});
+ $anim.animate({"translateX": 13, "translate": '0, 0'}, {
+ 'complete': function(){
+ $anim.transform({"translateX": 13});
+ next(19);
+ }
+ });
+ $text.text('translateX : 13');
+ break;
+ case 20:
+ $elem.transform({"translateY": 13});
+ $anim.animate({"translateY": 13, "translateX": 0}, {
+ 'complete': function(){
+ $anim.transform({"translateY": 13});
+ next(20);
+ }
+ });
+ $text.text('translateY : 13');
+ break;
+ default:
+ step = 0;
+ $elem.transform({});
+ $anim.animate({"translateY": 0}, {
+ 'complete': function(){
+ $anim.transform({});
+ }
+ });
+ $text.text('Test ran ' + log + ' times.');
+ }
+ }
+ </script>
+</body>
+</html>
View
0 transform.html → test/transform.html
File renamed without changes.

0 comments on commit 693d28e

Please sign in to comment.