Explorar el Código

Merge pull request #6931 from missingdays/dev

RequireJs native support
Mr.doob hace 10 años
padre
commit
c34d58e510
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. 5 5
      src/Three.js

+ 5 - 5
src/Three.js

@@ -5,12 +5,12 @@
 var THREE = { REVISION: '72dev' };
 var THREE = { REVISION: '72dev' };
 
 
 // browserify support
 // 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
 // polyfills
 
 

粤ICP备19079148号