Skip to content

Commit

Permalink
#29 enclosung codebase in one anonymous function
Browse files Browse the repository at this point in the history
  • Loading branch information
tracend committed Jan 18, 2013
1 parent 96d1188 commit cabf241
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 57 deletions.
1 change: 1 addition & 0 deletions lib/_end.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
})( jQuery );
22 changes: 22 additions & 0 deletions lib/_start.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* jQuery Three() - jQuery extension with 3D methods (using Three.js)
* Created by: Makis Tracend (@tracend)
*
* Copyright © 2012 Makesites.org
* Licensed under the MIT license
*
**/

// RequestAnimationFrame shim - Source: http://paulirish.com/2011/requestanimationframe-for-smart-animating/
window.requestAnimFrame = ( function( callback ) {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function ( callback ) {
window.setTimeout( callback, 1000 / 60 );
};
})();

(function( $ ) {
3 changes: 0 additions & 3 deletions lib/attributes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
(function( $ ) {

Three.prototype = $.extend(Three.prototype, {
// get attributes from tags
Expand Down Expand Up @@ -42,5 +41,3 @@ Three.prototype = $.extend(Three.prototype, {
}

});

})( jQuery );
23 changes: 0 additions & 23 deletions lib/core.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
/**
* jQuery Three() - jQuery extension with 3D methods (using Three.js)
* Created by: Makis Tracend (@tracend)
*
* Copyright © 2012 Makesites.org
* Licensed under the MIT license
*
**/

// RequestAnimationFrame shim - Source: http://paulirish.com/2011/requestanimationframe-for-smart-animating/
window.requestAnimFrame = ( function( callback ) {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function ( callback ) {
window.setTimeout( callback, 1000 / 60 );
};
})();

(function( $ ) {
var defaults = {
};

Expand Down Expand Up @@ -245,5 +224,3 @@ $.error( 'Method ' + method + ' does not exist on jQuery.Three' );
}
*/
};

})( jQuery );
3 changes: 0 additions & 3 deletions lib/css.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
(function( $ ) {

Three.prototype = $.extend(Three.prototype, {
// CSS Methods
Expand Down Expand Up @@ -249,5 +248,3 @@ Three.prototype = $.extend(Three.prototype, {
}

});

})( jQuery );
5 changes: 1 addition & 4 deletions lib/effects.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function( $ ) {


Three.prototype = $.extend(Three.prototype, {

animate: function(){
Expand All @@ -8,5 +7,3 @@ Three.prototype = $.extend(Three.prototype, {
}

});

})( jQuery );
5 changes: 1 addition & 4 deletions lib/events.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
(function( $ ) {


Three.prototype = $.extend(Three.prototype, {


});

})( jQuery );
5 changes: 1 addition & 4 deletions lib/manipulation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function( $ ) {


Three.prototype = $.extend(Three.prototype, {
// generic method to add an element
add : function( options ){
Expand Down Expand Up @@ -210,5 +209,3 @@ Three.prototype = $.extend(Three.prototype, {

}
});

})( jQuery );
5 changes: 1 addition & 4 deletions lib/markup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function( $ ) {


Three.prototype = $.extend(Three.prototype, {
// generic method to create an element
html : function(html){
Expand Down Expand Up @@ -77,5 +76,3 @@ Three.prototype = $.extend(Three.prototype, {
}

});

})( jQuery );
5 changes: 1 addition & 4 deletions lib/selectors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function( $ ) {


Three.prototype = $.extend(Three.prototype, {

find : function( query ){
Expand All @@ -12,5 +11,3 @@ Three.prototype = $.extend(Three.prototype, {
}

});

})( jQuery );
5 changes: 1 addition & 4 deletions lib/three.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function( $ ) {


Three.prototype = $.extend(Three.prototype, {
// generic method to create an element
webgl : function( options ){
Expand Down Expand Up @@ -348,5 +347,3 @@ Three.prototype = $.extend(Three.prototype, {
}

});

})( jQuery );
4 changes: 0 additions & 4 deletions lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
(function( $ ) {

Three.prototype = $.extend(Three.prototype, {

colorToHex : function (color) {
Expand Down Expand Up @@ -30,5 +28,3 @@ Three.prototype = $.extend(Three.prototype, {
}

});

})( jQuery );

0 comments on commit cabf241

Please sign in to comment.