mreinstein / collision-2d Goto Github PK
View Code? Open in Web Editor NEW2d collision routines
License: MIT License
2d collision routines
License: MIT License
there is currently 1 function, ray-plane-distance
, but I have other 2d plane functions sitting around in various places:
signedDistanceTo(plane, point)
isFrontFacingTo(plane, dir)
It would be nice to consolidate these, and expose a 2d plane primitive. Currently leaning torwards:
{
origin (vec2),
normal (vec2),
D: (float),
}
the existing tests are disabled, and there should be more. Some of these tests could be copied from https://github.com/noonat/intersect/tree/master/test
Is there any way to implement cone -> sphere and segment overlap system?
a handy hidden function that is buried in the src/
directory.
cannon.js has a reasonable looking implementation, maybe use this? https://github.com/schteppe/cannon.js/blob/master/src/collision/AABB.js#L288
Provide a function that sweeps an aabb against a line segment.
The collision resolution vector shall move the aabb out of collision
The example animated gifs that appear in the documentation come from a figures.html. It's a very manual process:
This obviously is kinda crappy.
Deno has a fancy new library that is able to render canvas elements on the command line: https://github.com/DjDeveloperr/deno-canvas
This would be pretty awesome, I could potentially script the example canvas .gif creation as a command line build step.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.