RoVector3
This package is a JS implementation of Roblox's Vector3 Class.
Install
npm install rovector3 --save
Usage
Once you've installed the package you can simply add it to your code:
const CFrame = ;
The great part about this package is that it functions similarly to Roblox's. However, since JS does not support operator overloading there are methods built into Vector3s as substitutes.
Addition
const Vector3 = ; let a = Vector3;let b = a;
Subtraction
const Vector3 = ; let a = Vector3;let b = a;
Multiplication
const Vector3 = ; let a = Vector3;let b = a;
Division
const Vector3 = ; let a = Vector3;let b = a;
Dot Product
const Vector3 = ; let a = Vector3;let b = a;
Cross Product
const Vector3 = ; let a = Vector3;let b = a;
Interpolation
const Vector3 = ; let a = Vector3;let b = a;
Unit
const Vector3 = ; let a = Vector3;