Class Isometric
Isometric 3d.
Defined in: isometric.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Isometric(tilesize, skew)
Translate between isometric and 2d/screen coordinate systems.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Alias for screen_to_world.
|
|
|
Alias for world_to_screen.
|
| Method Attributes | Method Name and Description |
|---|---|
|
screen_to_world(pos)
Translate screen/pixel coordinates into isometric (ground) coordinates.
|
|
|
set_focus(pos)
Focus on a particular tile (use floating point number to focus in between tiles).
|
|
|
Should be an object which publishes .width and .height e.g.
|
|
|
world_to_screen(pos)
Translate isometric world coordinates into screen coordinates.
|
Class Detail
Isometric(tilesize, skew)
Translate between isometric and 2d/screen coordinate systems.
- Parameters:
- tilesize
- is width and height (in 3d pixels) of a single isometric tile. Defaults to 64.
- skew
- is the ratio that the width and height are compressed. 0.5 is the default. 0.75 would be shallower - i.e. more side-on.
Field Detail
s2w
Alias for screen_to_world.
w2s
Alias for world_to_screen.
Method Detail
screen_to_world(pos)
Translate screen/pixel coordinates into isometric (ground) coordinates.
- Parameters:
- pos
set_focus(pos)
Focus on a particular tile (use floating point number to focus in between tiles).
- Parameters:
- pos
set_screen_object(s)
Should be an object which publishes .width and .height e.g. a jsGameSoup object so we can stay in the center of it.
- Parameters:
- s
world_to_screen(pos)
Translate isometric world coordinates into screen coordinates.
- Parameters:
- pos
