Class: SpriteWall

SpriteWall

A sprite in the map

new SpriteWall (json)

Name Type Description
json Object optional Json object describing the wall
Properties:
Name Type Description
id number The picture ID of the sprite
kind SpriteWallKind The kind of wall (border or not)

Extends

Methods

read (json) overrides

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

updateGeometry (geometry, position, width, height, count)Array.<any>

Update the geometry of a group of sprite walls with the same material
Name Type Description
geometry THREE.Geometry The geometry
position Array.<number> The json position
width number The total width of the texture
height number The total height of the texture
count number The faces count
Returns:
Type Description
Array.<any>

scale (vecA, vecB, vecC, vecD, center, position, size, kind) inherited overrides

Scale the vertices correctly
Name Type Description
vecA THREE.Vector3 The A vertex to rotate
vecB THREE.Vector3 The B vertex to rotate
vecC THREE.Vector3 The C vertex to rotate
vecD THREE.Vector3 The D vertex to rotate
center THREE.Vector3 The center to rotate around
position Array.<number> The json position
size THREE.Vector3 The scale size
kind ElementMapKind The element map kind