-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to import module #3
Comments
Hey bud, Was actually trying to work with this extension currently and I hit the same wall as you. The short answer is the existing script is legacy script and not a module - but you can create your own Class and import it that way.
// START OF CLASS class ChromaKeyMaterial extends THREE.ShaderMaterial { constructor(url, keyColor) {
} export { ChromaKeyMaterial }; // END OF CLASS
Hope that helps! |
Hi,
I am using threejs as module.
`
import * as THREE from '../lib/three.module.min.js';
import { DeviceOrientationControls } from '../lib/DeviceOrientationControls.min.js';
import { OrbitControls } from '../lib/OrbitControls.min.js';
`
How can I add js files as modules?
ex: import { Hologram} from '../lib/Hologram.js';
The text was updated successfully, but these errors were encountered: