@quenty/geometryutils

6.2.0 • Public • Published

GeometryUtils

Utility functions involving 3D and 2D geometry

Installation

npm install @quenty/geometryutils --save

Usage

Usage is designed to be simple.

SwingTwistUTils

SwingTwistUtils.swingTwist(cf, direction)

SwingTwistUtils.twistAngle(cf, direction)

SurfaceUtils API

SurfaceUtils.getSurfaceCFrame(part, lnormal)

PlaneUtils API

PlaneUtils.rayIntersection(origin, normal, rayOrigin, unitRayDirection)

SphereUtils API

SphereUtils.intersectsRay(sphereCenter, sphereRadius, rayOrigin, rayDirection)

CircleUtils API

CircleUtils.updatePositionToSmallestDistOnCircle(position, target, circumference)

OrthogonalUtils API

OrthogonalUtils.decomposeCFrameToVectors(cframe)

OrthogonalUtils.getClosestVector(options, unitVector)

OrthogonalUtils.snapCFrameTo(cframe, snapToCFrame)

CFrameMirror API

API surface to mirror CFrames

CFrameMirror.new()

CFrameMirror:SetCFrame(reflectOver)

CFrameMirror:Reflect(cframe)

CFrameMirror:ReflectVector(vector)

CFrameMirror:ReflectPoint(point)

CFrameMirror:ReflectRay(ray)

Line API

Line.Intersect(a, r, b, s)

Package Sidebar

Install

npm i @quenty/geometryutils

Weekly Downloads

248

Version

6.2.0

License

MIT

Unpacked Size

25.5 kB

Total Files

15

Last publish

Collaborators

  • quenty