|
@@ -180,6 +180,27 @@ function glconstants() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+function addons() {
|
|
|
+
|
|
|
+ return {
|
|
|
+
|
|
|
+ transform( code, id ) {
|
|
|
+
|
|
|
+ if ( /\/examples\/jsm\//.test( id ) === false ) return;
|
|
|
+
|
|
|
+ code = code.replace( 'build/three.module.js', 'src/Three.js' );
|
|
|
+
|
|
|
+ return {
|
|
|
+ code: code,
|
|
|
+ map: null
|
|
|
+ };
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
function glsl() {
|
|
|
|
|
|
return {
|
|
@@ -306,6 +327,7 @@ export default [
|
|
|
{
|
|
|
input: 'src/Three.js',
|
|
|
plugins: [
|
|
|
+ addons(),
|
|
|
glconstants(),
|
|
|
glsl(),
|
|
|
babel( {
|
|
@@ -329,6 +351,7 @@ export default [
|
|
|
{
|
|
|
input: 'src/Three.js',
|
|
|
plugins: [
|
|
|
+ addons(),
|
|
|
glconstants(),
|
|
|
glsl(),
|
|
|
babel( {
|
|
@@ -351,6 +374,7 @@ export default [
|
|
|
{
|
|
|
input: 'src/Three.js',
|
|
|
plugins: [
|
|
|
+ addons(),
|
|
|
glconstants(),
|
|
|
glsl(),
|
|
|
header()
|