title: How do I import code from THREE.js examples?
body: <p>I am currently building a React application that utilizes <code>THREE.js</code>.</p>
  
  <p>I want to import some code from <code>THREE.js</code> library, which is not part of the official distribution. Under the official repo for <code>THREE.js</code>, there are some modules under the examples folder, which the official doc for <code>THREE.js</code> makes use of to showcase examples.</p>
  
  <p>How can I make use of these modules and use them in my own code?</p>
  
  <p>In my app, I wanted to use the <code>THREE.STLExporter</code> module.
  (<a href="https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/STLExporter.js" rel="nofollow noreferrer">https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/STLExporter.js</a>)</p>
  
  <p>Because I already installed <code>three</code> as a dependency for my app, I first tried simply doing <code>import * as THREE from 'three'</code>, which did not seem to do the trick.</p>
  
  <p>Then I tried to access the <code>examples</code> folder directly and grab the module manually by doing `require('three/examples/js/exporters/STLExporter'), but this did not work either.</p>
  
  <p>I have checked the source code for the official docs and noticed that the examples directly include the necessary modules in  tags, but I don't want to do that because I am building a React app. I want to be able to include modules either via NPM or storing the code for the module within my app.</p>
  
  <p>Please help out a noob here. Thank you!</p>