Here is the model when uploaded
But if i open it on window's 3D viewer its OK, Here is an example
Here is the code
const width = this.mount.clientWidth;
const height = this.mount.clientHeight;
this.mount.style.cursor = "pointer";
var scene = new THREE.Scene();
scene.background = new THREE.Color(0x424242);
const camera = new THREE.PerspectiveCamera(75, width / height, 1, 1000);
camera.position.x = 1;
camera.position.z = 10;
camera.position.y = 5;
camera.lookAt(0, 0, 0);
let renderer = new THREE.WebGLRenderer({
antialias: true,
});
renderer.setClearColor("#263238");
renderer.setSize(width, height);
this.mount.appendChild(renderer.domElement);
var intensity = 1.4;
var rectLight = new THREE.RectAreaLight(0xffffff, intensity, width, height);
rectLight.position.set(1, 1, 10);
rectLight.lookAt(1, 1, 3);
scene.add(rectLight);
const controls = new OrbitControls(camera, renderer.domElement);
controls.enablePan = false;
controls.enableZoom = true;
controls.enableDamping = true;
controls.minPolarAngle = 0.8;
controls.maxPolarAngle = 2.4;
controls.dampingFactor = 0.07;
controls.rotateSpeed = 0.03;
var animate = function() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
};
let loader = new GLTFLoader();
loader.load(
benz,
(gltf) => {
scene.add(gltf.scene);
console.log(gltf.scene);
},
(xhr) => {
console.log(xhr);
},
(error) => {
console.log(error);
}
);
animate();