Search
Preparing search index...
The search index is not available
Gridy
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
TriangularGrid
Class TriangularGrid
Hierarchy
TriangularGrid
Implements
IGrid
<
TriangularTile
>
Index
Constructors
constructor
Properties
angle
orientation
radius
scale
scaleY
tile
Types
tiles
to
Point
to
Tile
x
y
shapes
Methods
bounds
center
get
Tile
Type
hexagonal
Shape
position
rhombus
tile
triangle
vertices
Constructors
constructor
new
Triangular
Grid
(
scale
:
Float
, orientation
?:
boolean
, shape
?:
Shape
, x
?:
Integer
, y
?:
Integer
)
:
TriangularGrid
Parameters
scale:
Float
Default value
orientation:
boolean
= false
Default value
shape:
Shape
= Shape.Triangular
Default value
x:
Integer
= 1
Default value
y:
Integer
= 1
Returns
TriangularGrid
Properties
angle
angle
:
Float
= -60
orientation
orientation
:
boolean
radius
radius
:
Float
scale
scale
:
Float
scaleY
scaleY
:
Float
= -1
tile
Types
tile
Types
:
TileType
= TileType.Variable
tiles
tiles
:
TriangularTile
[]
to
Point
to
Point
:
function
Type declaration
(
tile
:
TriangularTile
)
:
Position
Parameters
tile:
TriangularTile
Returns
Position
to
Tile
to
Tile
:
function
Type declaration
(
position
:
Position
)
:
TriangularTile
Parameters
position:
Position
Returns
TriangularTile
x
x
:
Integer
y
y
:
Integer
Static
shapes
shapes
:
Shape
[]
= [Shape.Hexagonal, Shape.Rhombus, Shape.Triangular]
Methods
bounds
bounds
(
)
:
Rectangle
Returns
Rectangle
center
center
(
tile
:
TriangularTile
)
:
Float2
Parameters
tile:
TriangularTile
Returns
Float2
get
Tile
Type
get
Tile
Type
(
tile
:
TriangularTile
)
:
Integer
Parameters
tile:
TriangularTile
Returns
Integer
Private
hexagonal
Shape
hexagonal
Shape
(
size
:
Integer
)
:
TriangularTile
[]
Parameters
size:
Integer
Returns
TriangularTile
[]
position
position
(
p
:
Float2
)
:
TriangularTile
Parameters
p:
Float2
Returns
TriangularTile
Private
rhombus
rhombus
(
)
:
TriangularTile
[]
Returns
TriangularTile
[]
tile
tile
(
x
:
number
, y
:
number
)
:
TriangularTile
Parameters
x:
number
y:
number
Returns
TriangularTile
Private
triangle
triangle
(
)
:
TriangularTile
[]
Returns
TriangularTile
[]
vertices
vertices
(
orientation
?:
undefined
|
true
|
false
, scale
?:
Float
, tileType
?:
Integer
)
:
Float2
[]
Parameters
Optional
orientation:
undefined
|
true
|
false
Optional
scale:
Float
Default value
tileType:
Integer
= 0
Returns
Float2
[]
Globals
Triangular
Grid
constructor
angle
orientation
radius
scale
scaleY
tile
Types
tiles
to
Point
to
Tile
x
y
shapes
bounds
center
get
Tile
Type
hexagonal
Shape
position
rhombus
tile
triangle
vertices