Skip to content

Commit 8c8345a

Browse files
committed
mod: export method
1 parent cfc66c9 commit 8c8345a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

terrain.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
* Check out http://gameprogrammer.com/fractal.html for a detailed description.
55
* @author Xueqiao Xu <[email protected]>
66
*/
7-
8-
(function(window) {
7+
var generateTerrain = (function() {
98

109
/**
1110
* Generate fractal terrain
@@ -231,6 +230,6 @@
231230

232231

233232
// export to global
234-
window.generateTerrain = generateTerrain;
233+
return generateTerrain;
235234

236-
})(window);
235+
})();

0 commit comments

Comments
 (0)