My 3D model completely disappears when the camera gets close.
- When importing my model with GLFT I had a problem where my 3D model ends up disappearing from the scene.
Example: https://viniciusfxavier.github.io/threejs/learning-2/dist/index.html
Source Code: https://github.com/ViniciusFXavier/threejs/blob/14eb9a0ae33b405bea242973bac0b53a90f749b6/learning-2/src/index.ts
const loader = new GLTFLoader().setPath('https://viniciusfxavier.github.io/threejs/learning-2/src/models/');
loader.load('character-dummy.gltf', (gltf) => {
const model = gltf.scene;
scene.add(model);
const helper = new THREE.SkeletonHelper( model );
helper.visible = true;
scene.add(helper);
render();
})
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.set(5, 5, 0);
On scroll IN:
On scroll OUT:
GIF: