![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@thi.ng/geom-isec
Advanced tools
[!IMPORTANT] βΌοΈ Announcing the thi.ng user survey 2024 π
Please participate in the survey here!
(open until end of February)To achieve a better sample size, I'd highly appreciate if you could circulate the link to this survey in your own networks.
[!NOTE] This is one of 189 standalone projects, maintained as part of the @thi.ng/umbrella monorepo and anti-framework.
π Help me to work full-time on these projects by sponsoring me on GitHub. Thank you! β€οΈ
2D/3D shape intersection checks. This is a support package for @thi.ng/geom.
Type | Circle | Line | Poly | Ray | Rect | Tri |
---|---|---|---|---|---|---|
Circle | β | |||||
Line | β | |||||
Point | β | β | β | β | β | |
Ray | β | β | β | β | ||
Rect | β | β |
Type | AABB | Plane | Point | Ray | Sphere |
---|---|---|---|---|---|
AABB | β | β | |||
Plane | β | ||||
Point | β | β | |||
Ray | β | β | β | ||
Sphere | β |
Current implementations partially based on toxiclibs (Java) and Clojure version of thi.ng/geom.
STABLE - used in production
Search or submit any issues for this package
yarn add @thi.ng/geom-isec
ES module import:
<script type="module" src="https://cdn.skypack.dev/@thi.ng/geom-isec"></script>
For Node.js REPL:
const geomIsec = await import("@thi.ng/geom-isec");
Package sizes (brotli'd, pre-treeshake): ESM: 2.83 KB
import * as isec from "@thi.ng/geom-isec";
const res = isec.intersectLineLine([0, 0], [100, 50], [50, 100], [50, -100]);
// { type: 4, isec: [ 50, 25 ], alpha: 0.5, beta: 0.375, det: -20000 }
res.type === isec.IntersectionType.INTERSECT
// true
If this project contributes to an academic publication, please cite it as:
@misc{thing-geom-isec,
title = "@thi.ng/geom-isec",
author = "Karsten Schmidt",
note = "https://thi.ng/geom-isec",
year = 2013
}
Β© 2013 - 2024 Karsten Schmidt // Apache License 2.0
FAQs
2D/3D shape intersection checks
The npm package @thi.ng/geom-isec receives a total of 413 weekly downloads. As such, @thi.ng/geom-isec popularity was classified as not popular.
We found that @thi.ng/geom-isec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenanceβdevelopers should switch to Vite or other modern alternatives.