Constructor
new SimpleIsoPoint(x, y, z, spacing)
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
z |
Number | |
spacing |
Number | Default is 45 |
Members
constructor
spacing
x
y
z
Methods
isoIntoMp(mp, isop)
Convert the SimpleIsoPoint into a existing MoverPoint. If you don't pass another SimpleIsoPoint, this instance will be used.
Name | Type | Description |
---|---|---|
mp |
MoverPoint | The MoverPoint to convert the iso cords into. |
isop |
SimpleIsoPoint | The SimpleIsoPoint to convert into the MoverPoint, in not given the instance will be used. |
mpIntoIso(mp, isop)
Converts a MoverPoint into a SimpleIsoPoint
Name | Type | Description |
---|---|---|
mp |
MoverPoint | The MoverPoint to convert into the SimpleIsoPoint |
isop |
SimpleIsoPoint | The SimpleIsoPoint to use, if not given the instance will be used. |
rawToIso(x, y, returnX, returnY) → {Number}
Returns either the x or y iso point from a given 2d point.
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
returnX |
Boolean | |
returnY |
Boolean |
- Type
- Number
rawToIsoWithSpacing(x, y, returnX, returnY, spacing) → {Number}
Returns either the x or y iso point with spacing, given a 2d point.
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
returnX |
Boolean | |
returnY |
Boolean | |
spacing |
Number |
- Type
- Number
rawToScreen(x, y, returnX, returnY) → {Number}
Returns either the x or y screen point from a given 2d point.
Why only either x or y? To increase performance, in the cases where we only need the x or y, returning a whole Point Object would be wasteful. If we need both we just call the method twice, but only Numbers are ever returned.
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
returnX |
Boolean | |
returnY |
Boolean |
- Type
- Number
rawToScreenWithSpacing(x, y, z, returnX, returnY, spacing) → {Number}
Returns either the x or y screen point with spacing, given a 2d point and z index.
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
z |
Number | |
returnX |
Boolean | |
returnY |
Boolean | |
spacing |
Number |
- Type
- Number