Class: TextureSeveral

TextureSeveral

Several textures in a single file

new TextureSeveral ()

Properties:
Name Type Description
list Array.<Array.<number>> List of each offset point, default is an empty
texture THREE.Material The generated texture, default is null
beginID number The begining texture ID
beginPoint Array.<number> The begining texture point offset
endID number The ending texture ID
endPoint Array.<number> The ending texture point offset array

Methods

setBegin (id, point)

Set the begining texture
Name Type Description
id number The begining texture ID
point Array.<number> The begining texture point offset

setEnd (id, point)

Set the ending texture
Name Type Description
id number The ending texture ID
point Array.<number> The ending texture point offset

isSup (rect, point)boolean

Check which point is on top
Name Type Description
rect Array.<number>
point Array.<number>
Returns:
Type Description
boolean

isInf (rect, point)boolean

Check which point is on bot
Name Type Description
rect Array.<number>
point Array.<number>
Returns:
Type Description
boolean

isInTexture (id, rect)boolean

Check if a couple (id, rect) is inside this texture
Name Type Description
id number
rect Array.<number>
Returns:
Type Description
boolean

addToList (id, point)

Add a couple (id, point) inside the list
Name Type Description
id number
point Array.<number>

getOffset (id, rect)number

Get the offset of couple (id, rect)
Name Type Description
id number
rect Array.<number>
Returns:
Type Description
number