From fe6ed49dc8a3b2f7578e3047adb81fce1e0eadc0 Mon Sep 17 00:00:00 2001 From: Evgeny Bovykin Date: Fri, 31 Jul 2015 14:15:36 +0300 Subject: [PATCH] Add native AMD support. Closes #6930 --- src/Three.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Three.js b/src/Three.js index 56c12e352a..091c21e5ab 100644 --- a/src/Three.js +++ b/src/Three.js @@ -5,12 +5,11 @@ 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 -- GitLab