Matt's Heaps Extension Sample Page
This a very simple page demonstrating some extensions to the Heaps game engine written by Matt Chudleigh in the summer of 2020
GLTF Importer
This sample shows a few simple models that were imported from GLTF into Heaps via a new importer. It also demostrates a runtime convex hull generator.
GJK Collision Detection
This sample demonstrates collision detection of convex bodies via a custom implementation of the GJK collision algorithm and EPA for penetration vector calculation.
It is a modified GJK implementation enhanced with the signed volume distance method
based on this paper by Montanari, Petrinic and Barbier.
Notes:
- The Heaps fork with both the GLTF and GJK code is here
- The code is not quite ready for mass consumption but can be cleaned up if there is community interest
- Both demos make use of a custom convex hull generator also written in Haxe based on the Quickhull algorithm
- The rock in the collision demo is a randomly generated convex shape
- The GLTF demo doesn't really show GLTF loading because the actual conversion is done at compile time and converted to HMD, but the models shown were originally imported from GLTF
- The GLTF and GJK implementations are pure Haxe
- These should be cross target safe. Development was done primarily targetting Hashlink and cleanly converted to JS for the demo
- The GJK/EPA collision seems incredibly stable. The calculated value is stable to about 9 significant figures (see the demo to understand)
- I am not a web front-end developer (as you can clearly see)