pnext / three-loader

Point cloud loader for ThreeJS, based on the core parts of Potree
Other
194 stars 88 forks source link

Fix: replace incorrect type predicate with common Geometry Node interface #157

Open JordanLane-Veerum opened 2 weeks ago

JordanLane-Veerum commented 2 weeks ago

Hey guys, great work on this repo. I've enjoyed playing around with the example and the codebase.

Recently I encountered an incorrect type-predicate in the isGeometryNode function. When running the priorityQueue loop, an OctreeGeometryNode would be incorrectly asserted as a PointCloudOctreeGeometryNode which could cause subtle typing bugs.

To fix this I created a common interface IPointCloudGeometryNode that extends the IPointCloudTreeNode interface and adds the geometry specific attributes.

three-loader-debug