We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want Clip the model,Here is what I tried
const clipPlanes = [ new THREE.Plane(new THREE.Vector3(1, 0, 0), -50), new THREE.Plane(new THREE.Vector3(-1, 0, 0), -50), new THREE.Plane(new THREE.Vector3(0, 0, -1), -10), new THREE.Plane(new THREE.Vector3(0, 0, 1), -10), ] const animate = () => { deltaTime.value = colck.getDelta() if (tilesRuntime.value) { console.log(tilesRuntime.value) scene.traverse((obj: any) => { if (obj.type == "Mesh") { if (obj.material.length > 1) { obj.material.forEach((element: any) => { element.clippingPlanes = clipPlanes; element.clipIntersection = true; }); } else { obj.material.clippingPlanes = clipPlanes; obj.material.clipIntersection = true; } } }) tilesRuntime.value.update(deltaTime.value, renderer, camera) } renderer.render(scene, camera); requestAnimationFrame(animate); }
I got the effect I wanted, but I put the clip's code in the animate, This may seem like a poor performance. Is there a better way?@wanyanyan @Avnerus
The text was updated successfully, but these errors were encountered:
Hi! Check the contentPostProcess option. It allows you to run a callback after each tile mesh is processed.
contentPostProcess
Even more efficient would be to avoid downloading tiles that are in the clipping range, but that requires hooking into the loaders.gl traversal.
Sorry, something went wrong.
enableClipping
No branches or pull requests
I want Clip the model,Here is what I tried
I got the effect I wanted, but I put the clip's code in the animate, This may seem like a poor performance. Is there a better way?@wanyanyan @Avnerus
The text was updated successfully, but these errors were encountered: