And how can I solve this issue?
I am trying to load an image of this
https://clara.io/view/5a3b1964-df03-4695-8464-787472eb023a#
into a Three.js tutorial that I am using to learn the library. But I am at a loss for what is going on. I looked at the documentation and what I have is what is shown. https://threejs.org/docs/index.html?q=loader#api/en/loaders/ObjectLoader.parseImages
I have tried using the <script type="module" src="...."></script>
way, but that seems to cause more problems. Then I start getting 404'd.
I have tried creating an object, since my error was saying that my object was undefined
.
var loader = new THREE.ObjectLoader();
var object = new Object();
object.loader = 'Models/amy.json',
loader.load(
'Models/amy.json',
function( object ) {
scene.add( object );
}
);
and I am still obtaining the same error message as above
This is how I am introducing my scripts, most importantly my ObjectLoader
<script src="js/three.js"></script>
<script src="js/OrbitControls.js"></script>
<script src="js/ObjectLoader.js"></script>
I am also confused as to the "cannot use import statement outside of a module". Does that mean that I should be again defining my <script>
to a module, although it returns a larger amount of errors?