TurtleCollisions is a simple collision handling implementation designed specifically for the Code.org AppLab which currently lacks an easy to understand solution for handling collisions. The purpose of this library is not reinvent the wheel; neither is it to provide a set of detailed and complex tools suited for almost any task. Rather than considering this a finished product, I encourage you to instead consider it a template for students to build upon and customize for their unique usage case. Please note that this library is written entirely in native Javascript and can theoretically be used outside of the AppLab environment for other Javascript based projects.
As a result of keeping things simple, using this library is as simple as copying and pasting it into your AppLab code. Just remember to read the documentation below for information on how to use the built-in functions as they come "out of the box".
Method | Description |
---|---|
isCollision |
Returns true if the specified collision collides with another already existing collision. |
newObject |
Create new collision object. |