Class Index | File Index

Classes


Class Isometric

Isometric 3d.
Defined in: isometric.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Isometric(tilesize, skew)
Translate between isometric and 2d/screen coordinate systems.
Field Summary
Field Attributes Field Name and Description
 
s2w
Alias for screen_to_world.
 
w2s
Alias for world_to_screen.
Method Summary
Method Attributes Method Name and Description
 
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.
 
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

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Nov 09 2012 21:19:31 GMT+0800 (WST)