Class: Land

Land

A land in the map

new Land ()

Properties:
Name Type Description
up boolean Indicate if the layer is up or down
texture Array.<number> Texture rect of the land

Methods

read (json)

Read the JSON associated to the land
Name Type Description
json Object Json object describing the land

getIndex ()number

Return the rect index
Returns:
Type Description
number

updateGeometry (geometry, collision, position, width, height, x, y, w, h, count)Object

Update the geometry associated to this land and return the collision result
Name Type Description
geometry THREE.Geometry The geometry asoociated to the autotiles
collision CollisionSquare The collision square
position Array.<number> The json position
width number The texture total width
height number The texture total height
x number The x texture position
y number The y texture position
w number The w texture size
h number The h texture size
count number The faces count
Returns:
Type Description
Object