@quenty/geometryutils

6.7.1 • 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

18

Version

6.7.1

License

MIT

Unpacked Size

26.8 kB

Total Files

15

Last publish

Collaborators

  • quenty