loki-entity-collision-resolution

Entity collision resolution library for lokijs.

Usage no npm install needed!

<script type="module">
  import lokiEntityCollisionResolution from 'https://cdn.skypack.dev/loki-entity-collision-resolution';
</script>

README

loki-entity-collision-resolution

Entity collision resolution library for lokijs.

Usage

This one actually gets a bit of proto documentation.

The other library handles actual collisions. This library handles what happens in response to the two entities' collide events.

For example. Two entities, A and B, collide. Entity A has a plug with an associated property (a string) and a strength (a number). Entity B has a matching socket with the same property name, a threshold, and a callback. When the two collide, the threshold is checked against the strength. If the strength of the plug on A exceeds the threshold of the socket on entity B then the callback on Entity B is invoked.