Tsuser1 / TurtleCollisions

Simple collision library for code.org's AppLab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TurtleCollisions


Introduction

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.

How to use TurtleCollisions

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".

Documentation

Methods for Collision
Method Description
isCollision Returns true if the specified collision collides with another already existing collision.
newObject Create new collision object.

About

Simple collision library for code.org's AppLab