Skip to content

Commit

Permalink
Merge pull request #1 from arthurjamain/better-module-exports
Browse files Browse the repository at this point in the history
exports the modules and explicitely set them in window
  • Loading branch information
cedricpinson committed Dec 15, 2015
2 parents e5f52ee + d67b30a commit 2282f4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/rStats.extras.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var glStats = function () {
window.glStats = function () {

var _rS = null;

Expand Down Expand Up @@ -99,7 +99,7 @@ var glStats = function () {

};

var threeStats = function ( renderer ) {
window.threeStats = function ( renderer ) {

var _rS = null;

Expand Down Expand Up @@ -174,7 +174,7 @@ var threeStats = function ( renderer ) {
* From https://github.com/paulirish/memory-stats.js
*/

var BrowserStats = function () {
window.BrowserStats = function () {

var _rS = null;

Expand Down Expand Up @@ -253,3 +253,9 @@ var BrowserStats = function () {
};

};

module.exports = {
glStats: window.glStats,
threeStats: window.threeStats,
BrowserStats: window.BrowserStats
};
2 changes: 1 addition & 1 deletion src/rStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

} )();

function rStats ( settings ) {
module.exports = window.rStats = rStats ( settings ) {

function iterateKeys ( array, callback ) {
var keys = Object.keys( array );
Expand Down

0 comments on commit 2282f4a

Please sign in to comment.