Search
Preparing search index...
The search index is not available
Gridy
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
BrickGrid
Class BrickGrid
Hierarchy
HexagonalGrid
BrickGrid
Implements
IGrid
<
HexagonalTile
>
Index
Constructors
constructor
Properties
angle
orientation
radius
scale
scaleY
shape
tile
Types
tiles
to
Point
to
Tile
x
y
shapes
Methods
bounds
center
position
tile
vertices
CUBE_
TO_
EVEN_
Q
CUBE_
TO_
EVEN_
R
CUBE_
TO_
ODD_
Q
CUBE_
TO_
ODD_
R
CUBE_
TO_
TWO_
AXIS
CUBE_
TO_
TWO_
AXIS_
XY
CUBE_
TO_
TWO_
AXIS_
YZ
EVEN_
Q_TO_
CUBE
EVEN_
R_TO_
CUBE
HEXAGONAL_
SHAPE
ODD_
Q_TO_
CUBE
ODD_
R_TO_
CUBE
REGION
TRAPEZOIDAL_
SHAPE
TRIANGULAR_
SHAPE
TWO_
AXIS_
TO_
CUBE
TWO_
AXIS_
TO_
CUBE_
XY
TWO_
AXIS_
TO_
CUBE_
YZ
Constructors
constructor
new
Brick
Grid
(
scale
:
Float
, orientation
?:
boolean
, shape
?:
Shape
, x
?:
Integer
, y
?:
Integer
)
:
BrickGrid
Parameters
scale:
Float
Default value
orientation:
boolean
= false
Default value
shape:
Shape
= Shape.Hexagonal
Default value
x:
Integer
= 1
Optional
y:
Integer
Returns
BrickGrid
Properties
angle
angle
:
Float
= 0
orientation
orientation
:
boolean
radius
radius
:
Float
scale
scale
:
Float
scaleY
scaleY
:
Float
= -1
shape
shape
:
Shape
tile
Types
tile
Types
:
TileType
= TileType.Simple
tiles
tiles
:
HexagonalTile
[]
to
Point
to
Point
:
function
Type declaration
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
to
Tile
to
Tile
:
function
Type declaration
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
x
x
:
Integer
y
y
:
Integer
Static
shapes
shapes
:
Shape
[]
= [Shape.Hexagonal,Shape.Rhombus, Shape.Even, Shape.Odd, Shape.Triangular]
Methods
bounds
bounds
(
)
:
Rectangle
Returns
Rectangle
center
center
(
cube
:
HexagonalTile
)
:
Float2
Parameters
cube:
HexagonalTile
Returns
Float2
position
position
(
p
:
Float2
)
:
HexagonalTile
Parameters
p:
Float2
Returns
HexagonalTile
tile
tile
(
x
:
number
, y
:
number
)
:
HexagonalTile
|
undefined
Parameters
x:
number
y:
number
Returns
HexagonalTile
|
undefined
vertices
vertices
(
orientation
?:
undefined
|
true
|
false
, scale
?:
Float
)
:
Float2
[]
Parameters
Optional
orientation:
undefined
|
true
|
false
Optional
scale:
Float
Returns
Float2
[]
Static
CUBE_
TO_
EVEN_
Q
CUBE_
TO_
EVEN_
Q
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
Static
CUBE_
TO_
EVEN_
R
CUBE_
TO_
EVEN_
R
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
Static
CUBE_
TO_
ODD_
Q
CUBE_
TO_
ODD_
Q
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
Static
CUBE_
TO_
ODD_
R
CUBE_
TO_
ODD_
R
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
Static
CUBE_
TO_
TWO_
AXIS
CUBE_
TO_
TWO_
AXIS
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
Static
CUBE_
TO_
TWO_
AXIS_
XY
CUBE_
TO_
TWO_
AXIS_
XY
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
Static
CUBE_
TO_
TWO_
AXIS_
YZ
CUBE_
TO_
TWO_
AXIS_
YZ
(
tile
:
HexagonalTile
)
:
Position
Parameters
tile:
HexagonalTile
Returns
Position
Static
EVEN_
Q_TO_
CUBE
EVEN_
Q_TO_
CUBE
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Static
EVEN_
R_TO_
CUBE
EVEN_
R_TO_
CUBE
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Static
HEXAGONAL_
SHAPE
HEXAGONAL_
SHAPE
(
size
:
Integer
)
:
HexagonalTile
[]
Parameters
size:
Integer
Returns
HexagonalTile
[]
Static
ODD_
Q_TO_
CUBE
ODD_
Q_TO_
CUBE
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Static
ODD_
R_TO_
CUBE
ODD_
R_TO_
CUBE
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Static
REGION
REGION
(
xmin
:
Integer
, xmax
:
Integer
, ymin
:
Integer
, ymax
:
Integer
, zmin
:
Integer
, zmax
:
Integer
)
:
HexagonalTile
[]
Parameters
xmin:
Integer
xmax:
Integer
ymin:
Integer
ymax:
Integer
zmin:
Integer
zmax:
Integer
Returns
HexagonalTile
[]
Static
TRAPEZOIDAL_
SHAPE
TRAPEZOIDAL_
SHAPE
(
minQ
:
Integer
, maxQ
:
Integer
, minR
:
Integer
, maxR
:
Integer
, toCube
:
function
)
:
HexagonalTile
[]
Parameters
minQ:
Integer
maxQ:
Integer
minR:
Integer
maxR:
Integer
toCube:
function
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Returns
HexagonalTile
[]
Static
TRIANGULAR_
SHAPE
TRIANGULAR_
SHAPE
(
size
:
Integer
)
:
HexagonalTile
[]
Parameters
size:
Integer
Returns
HexagonalTile
[]
Static
TWO_
AXIS_
TO_
CUBE
TWO_
AXIS_
TO_
CUBE
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Static
TWO_
AXIS_
TO_
CUBE_
XY
TWO_
AXIS_
TO_
CUBE_
XY
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Static
TWO_
AXIS_
TO_
CUBE_
YZ
TWO_
AXIS_
TO_
CUBE_
YZ
(
position
:
Position
)
:
HexagonalTile
Parameters
position:
Position
Returns
HexagonalTile
Globals
Brick
Grid
constructor
angle
orientation
radius
scale
scaleY
shape
tile
Types
tiles
to
Point
to
Tile
x
y
shapes
bounds
center
position
tile
vertices
CUBE_
TO_
EVEN_
Q
CUBE_
TO_
EVEN_
R
CUBE_
TO_
ODD_
Q
CUBE_
TO_
ODD_
R
CUBE_
TO_
TWO_
AXIS
CUBE_
TO_
TWO_
AXIS_
XY
CUBE_
TO_
TWO_
AXIS_
YZ
EVEN_
Q_TO_
CUBE
EVEN_
R_TO_
CUBE
HEXAGONAL_
SHAPE
ODD_
Q_TO_
CUBE
ODD_
R_TO_
CUBE
REGION
TRAPEZOIDAL_
SHAPE
TRIANGULAR_
SHAPE
TWO_
AXIS_
TO_
CUBE
TWO_
AXIS_
TO_
CUBE_
XY
TWO_
AXIS_
TO_
CUBE_
YZ