Mesh disapear when camera close

I load a gltf scene to three.js, but when i move the camera near to the object,some meshes are disappear. Left is the object when the camera takes a distance, right is when i move the camera closer


my source code for gltf loader

function LoadModel( scene ) {
var loader = new THREE.GLTFLoader(); 
  function (gltf) {

    var hemispheric = new THREE.HemisphereLight(0xffffff, 0x222222, 1.2);

my repo

Mess around with the clipping distance or try using an orthographic camera.

camera = new THREE.PerspectiveCamera(75, ratio, 0.1, 10000);

play around with that 0.1 and try adjusting the FOV(75)


You also might want to check if scene.frustumCulled = false does solve the issue. Or even:

scene.traverse( function( object ) {

    object.frustumCulled = false;

} );

Any chance some of your materials are (very slightly) transparent? This can have side effects like you describe; try this to rule that out:

scene.traverse((node) => {
  if (node.isMesh) node.material.transparent = false;

Thank you, it works

Created an account just to say thank you.


Is there a way to fix this by editing the gltf file? I’m trying to use the files for AR in the Android Scene Viewer where I don’t have any control of the code.