Class

VXL

VXL()

Class to manipulate .VXL files.
Constructor

# new VXL()

View Source vxl/VXL.js, line 29

Members

Uint32Array

# blocks

1D Array with all block infos compacted into Uint32.

View Source vxl/VXL.js, line 47

Buffer

# data

Decompressed map chunks.

View Source vxl/VXL.js, line 41

Decompressor

# decompressor

Decompressor class.

View Source vxl/VXL.js, line 35

Methods

# addBlock(Block)

Add a block to the map.
Parameters:
Name Type Description
Block BlockInfo to be added to the map

View Source vxl/VXL.js, line 143

# addBlockLine(Position1, Position2, Color)

Add a block line to the map.
Parameters:
Name Type Description
Position1 Position Position of the start block
Position2 Position Position of the end block
Color BlockColor The block color

View Source vxl/VXL.js, line 166

# canBlockAction(X, Y, Z) → {boolean}

Check if its possible to use Ace of Spades actions... Basically checks if the action will be inside the map limits.
Parameters:
Name Type Description
X number X Coordinate
Y number Y Coordinate
Z number Z Coordinate

View Source vxl/VXL.js, line 111

boolean

# getBlock(X, Y, Z) → {BlockInfo}

Get a block from specific coordinates.
Parameters:
Name Type Description
X number X Coordinate
Y number Y Coordinate
Z number Z Coordinate

View Source vxl/VXL.js, line 255

BlockInfo

# getBlockIndex(X, Y, Z)

Get the block index in the 1D array, from 3D coordinate.
Parameters:
Name Type Description
X number X Coordinate
Y number Y Coordinate
Z number Z Coordinate

View Source vxl/VXL.js, line 56

# getTopBlock(X, Y) → {BlockInfo}

Get first block from the sky block to the bottom.
Parameters:
Name Type Description
X number X Coordinate
Y number Y Coordinate

View Source vxl/VXL.js, line 67

Block infos.
BlockInfo

# getTopCoordinate(X, Y) → {number}

Get the coordinate from the first block from the sky to the bottom.
Parameters:
Name Type Description
X number X Coordinate
Y number Y Coordinate

View Source vxl/VXL.js, line 89

Block coordinates.
number

# isSurface(X, Y, Z) → {boolean}

Check if block is visible (a.k.a. a surface) in any of axis.
Parameters:
Name Type Description
X number X Coordinate
Y number Y Coordinate
Z number Z Coordinate

View Source vxl/VXL.js, line 286

boolean

# loadVXL()

Load VXL to the blocks array from data variable.

View Source vxl/VXL.js, line 303

# removeBlock(X, Y, Z)

Remove a block from the map.
Parameters:
Name Type Description
X number X Coordinate
Y number Y Coordinate
Z number Z Coordinate

View Source vxl/VXL.js, line 130

# saveVXL() → {Buffer}

Save a VXL map loaded to a Buffer

View Source vxl/VXL.js, line 370

Buffer