SceneTileModel

Group
player
Methods
16
Fields
None

Getting one

scene:tileAt(…):getSceneTileModel()

Methods

MethodReturnsDescription
getVertexX(){number}Each vertex's x, in local units (the tile's x * 128 plus the vertex's offset into the tile: 0, 32, 64, 96 or 128).
getVertexY(){number}Each vertex's height (the corner heights, or two corners' averaged; more negative is higher).
getVertexZ(){number}Each vertex's z (the scene's y), in local units, as getVertexX.
getFaceX(){number}Each face's first vertex, a 0-based index into the vertex arrays (add 1 to index the Luau tables).
getFaceY(){number}Each face's second vertex (getFaceX).
getFaceZ(){number}Each face's third vertex (getFaceX).
getTriangleColorA(){number}Each face's colour at its first vertex: the underlay's or the overlay's HSL (by the face) with the vertex's lightness in its low 7 bits; 12…
getTriangleColorB(){number}Each face's colour at its second vertex (getTriangleColorA).
getTriangleColorC(){number}Each face's colour at its third vertex (getTriangleColorA).
getTriangleTextureId(){number}?Each face's texture id: the overlay's texture for an overlay face, -1 for an underlay face; nil when the tile has no texture.
getShape()numberThe overlay's shape, 2..12 (shapes 0 and 1 are flat paints, getSceneTilePaint).
getRotation()numberThe overlay's rotation, 0..3 (quarter turns).
getModelUnderlay()numberThe underlay's minimap colour, 24-bit RGB (the palette's, at the client's brightness when the region loaded), 0 when the tile has no underl…
getModelOverlay()numberThe overlay's minimap colour, 24-bit RGB, at least 1 (1 when the overlay has no colour).
isFlat()booleanWhether the tile's four corners are at one height.
equals(any)booleanWhether other equals this SceneTileModel, as == answers it (false for a value of another class).

Returned by

MethodReturnsDescription
Tile.getSceneTileModelSceneTileModel?Its tile model, a SceneTileModel: the floor of a tile whose overlay has a shape (a slope, a corner or an edge piece), with its vertices,…

Method details

getVertexX

getVertexX: (SceneTileModel) -> {number}

Each vertex's x, in local units (the tile's x * 128 plus the vertex's offset into the tile: 0, 32, 64, 96 or 128).

getVertexY

getVertexY: (SceneTileModel) -> {number}

Each vertex's height (the corner heights, or two corners' averaged; more negative is higher).

getFaceX

getFaceX: (SceneTileModel) -> {number}

Each face's first vertex, a 0-based index into the vertex arrays (add 1 to index the Luau tables).

getTriangleColorA

getTriangleColorA: (SceneTileModel) -> {number}

Each face's colour at its first vertex: the underlay's or the overlay's HSL (by the face) with the vertex's lightness in its low 7 bits; 12345678 for a colour the client does not draw.

getTriangleTextureId

getTriangleTextureId: (SceneTileModel) -> {number}?

Each face's texture id: the overlay's texture for an overlay face, -1 for an underlay face; nil when the tile has no texture.

getShape

getShape: (SceneTileModel) -> number

The overlay's shape, 2..12 (shapes 0 and 1 are flat paints, getSceneTilePaint).

getModelUnderlay

getModelUnderlay: (SceneTileModel) -> number

The underlay's minimap colour, 24-bit RGB (the palette's, at the client's brightness when the region loaded), 0 when the tile has no underlay colour.

getModelOverlay

getModelOverlay: (SceneTileModel) -> number

The overlay's minimap colour, 24-bit RGB, at least 1 (1 when the overlay has no colour).

equals

equals: (SceneTileModel, any) -> boolean

Whether other equals this SceneTileModel, as == answers it (false for a value of another class).