инженер-программист
<script type="module">
import {GLTFLoader} from "./GLTFLoader.js";
let controls;
let scene = new THREE.Scene();
let camera = new THREE.PerspectiveCamera(
75,
window.innerWidth/window.innerHeight,
0.01,
1000
);
let renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild( renderer.domElement );
let loader = new GLTFLoader();
let obj;
loader.load("./head/adamHead.gltf", function (gltf){
obj = gltf.scene;
scene.add(gltf.scene)
});
let light = new THREE.HemisphereLight(0xffffff, 0x000000, 2);
scene.add(light);
scene.background = new THREE.Color(0xffffff);
camera.position.set(0, 0, 5);
function animate(){
requestAnimationFrame(animate);
renderer.render(scene, camera);
}
animate();
controls = new OrbitControls( camera, renderer.domElement );
controls.enableDamping = true;
controls.dampingFactor = 0.25;
controls.enableZoom = true;
controls.autoRotate = true;
</script>