2
0
Эх сурвалжийг харах

Merge pull request #6931 from missingdays/dev

RequireJs native support
Mr.doob 10 жил өмнө
parent
commit
c34d58e510
1 өөрчлөгдсөн 5 нэмэгдсэн , 5 устгасан
  1. 5 5
      src/Three.js

+ 5 - 5
src/Three.js

@@ -5,12 +5,12 @@
 var THREE = { REVISION: '72dev' };
 
 // browserify support
-
-if ( typeof module === 'object' ) {
-
-	module.exports = THREE;
-
+if (typeof define === 'function' && define.amd) {
+    define("three", THREE);
+} else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {
+    module.exports = THREE;
 }
+ 
 
 // polyfills