mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: migration 2
This commit is contained in:
1 parent
e1c8194beb
commit
6285f33989
305 files changed
+414
-414
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { Material, Mesh, Object3D, Vector3 } from 'three';
|
||||
|
||||
export function discardClippingPlane(object: Object3D, point: Vector3) {
|
||||
if (
|
||||
object instanceof Mesh &&
|
||||
object.material instanceof Material &&
|
||||
object.material.clippingPlanes !== null
|
||||
) {
|
||||
return object.material.clippingPlanes.every(
|
||||
(plane) => plane.distanceToPoint(point) < 0,
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in new issue
Block a user