i want to use gltf loader. but i get gltf laoder not defined error, want to use orbitcontrols get same error taht they arenot defined.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/controls/OrbitControls.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/loaders/GLTFLoader.js"></script>
this is me trying to import all of them .
function loadGLTF() {
let balloonLoader = new THREE.GLTFLoader();
balloonLoader.load('./model/esa.gltf', (gltf) => {
Mesh = gltf.scene;
Mesh.scale.set(0.2,0.2,0.2);
scene.add(Mesh);
Mesh.position.x = 0;
Mesh.position.y = 10.5;
Mesh.position.z = 17;
});
}
this is how i try to use gltf loader. what is wrong with the code could you tell me?
and even better would be if someone could finally explain how to properly import threejs.