nytimes / three-loader-3dtiles

This is a Three.js loader module for handling OGC 3D Tiles, created by Cesium. It currently supports the two main formats, Batched 3D Model (b3dm) - based on glTF Point cloud.
Other
475 stars 64 forks source link

draw distance options? #179

Open kfarr opened 2 months ago

kfarr commented 2 months ago

Is there a way to set draw distance limits?

kfarr commented 1 month ago

I wonder if it could be a hack to adjust the PerspectiveFrustum.far value. Right now it is set directly from camera.far:

         const loadersFrustum = new PerspectiveFrustum({
          fov: (camera.fov / 180) * Math.PI,
          aspectRatio: camera.aspect,
          near: camera.near,
          far: camera.far,
        });

(source https://github.com/nytimes/three-loader-3dtiles/blob/ee3931657f84d6012006c710cc815bdf4a68d2e5/src/index.ts#L377)

Maybe instead we can set this value to 1/4 of camera far, an arbitrary value, or a parameter passed to the a-frame component

Avnerus commented 1 month ago

Hi, I think this would work, but what I would really like to have is an option for a user hook function in here. Then we can also add real-time occlusion tests.