JSPM

jt-collision-detection

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q21327F
  • License ISC

Basic collision detection methods based on Jeffrey Thompson's collision detection online series

Package Exports

  • jt-collision-detection
  • jt-collision-detection/build/cjs/index.js
  • jt-collision-detection/build/esm/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jt-collision-detection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JT Collision Detection

Utility functions for detecting collisions between points, lines, circles, rectangles, and polygones

Code Copied (almost verbatim) from Jeffrey Thompsons Collision Detection work.

Installation

Node

install using npm

# npm
npm install jt-collision-detection
# yarn
yarn add jt-collision-detection
#pnpm
yarn add jt-collision-detection

use in file

import * as cd from 'jt-collision-detection'
cd.polyCircle(...)

Browser ESM

Use unpkg.com to import

import * as cd from 'https://unpkg.com/jt-collision-detection'
cd.polyCircle(...)

Browser Global

TBD

Deno

use unpkg.com to import

import * as cd from 'https://unpkg.com/jt-collision-detection'
cd.polyCircle(...)

Documentation

TBD

Project Goals

  1. Should be able to run in every possible context (Currently Tracked):
  • node cjs
  • node esm
  • deno
  • browser window
  • browser esm
  • web workers global
  • web workers esm
  • iife
  1. Browsers should be able to import iife, or esm using https://unpkg.com/ cdn
  2. Types should be well defined
  3. Source maps should be well defined and high quality
  4. Must be able to leverage tree shaking
  5. Lightweight NO DEPENDENCIES