1.0.1 • Published 3 years ago

@rexysaur/3d-space v1.0.1

Weekly downloads
3
License
ISC
Repository
-
Last release
3 years ago

3d-space

3d space is as module used to represent a coordinate field. It can also be used to store data.

Usage

Setup

this module is very simple to setup. all you have to do is create an instance of a field

const Field = require("@rexysaur/3d-space")

const field = new Field(size-of-field)

Put data in certain location

you can put data in a certain field by doing

field.putDataInLocation(x coord, y coord, z coord, data)

// The number of any direction(x, y, z) should always be below the number you specify when making the field

Find what data is in certain location

you can find what data is in a certain location by doing

const data = field.dataInLocation(x  coord, y coord, z coord)

// This function returns the data in that field

Location of certain data

you can find the coordinates of a certain peice of data by doing

const coords = field.locationOfData(data)

// This function returns the coordinates of the data