Skip to content

mcbe-toolbox-lc/vecarr

Repository files navigation

@mcbe-toolbox-lc/vecarr

NPM Version GitHub Tag

MCBE's Vector3 type looks like this: {x,y,z}

Popular vector libraries (like glMatrix) use an array type that looks like this: [x,y,z]

Uh oh, type mismatch... 💔

So I created this package, which contains small utilities to convert {x,y,z} to [x,y,z] and vice versa. 👍

I also added a hybrid class that can behave as both {x,y,z} and [x,y,z] with one instance, and it feels so good to use. 😩

Usage

Run the following command in your project directory to install vecarr:

npm install @mcbe-toolbox-lc/vecarr --save-dev

Also, I highly recommend builder as a build tool. 🛠️

About

Utilities for conversion between array-based vectors and object-based vectors.

Topics

Resources

License

Stars

Watchers

Forks