module:extras/createfloor
### module:extras/createfloor()
The extras/createfloor.js
module.
To import all symbols in this module, either of the following can be used:
import * from "extras/createfloor.js"; // -- or -- import * as CustomModuleName from "extras/createfloor.js";
Methods
- createFloor
Generates a mesh buffer of a tiled floor.
### (static) module:extras/createfloor.createFloor(xStart, yStart, width, height, tileSize, [z])
Generates a mesh buffer of a tiled floor. Texture coordinates of each tile will range from [0,1] across the width and height of that tile. Thus, any texture used to render the mesh buffer should entirely be of a square tile.
Parameters
xStart
(Type: number)
X coordinate of the start of the floor.yStart
(Type: number)
Y coordinate of the start of the floor.width
(Type: number)
Total width of the floor.height
(Type: number)
Total height of the floor.tileSize
(Type: number)
Width and height of each floor tile.z
(Type: number) (optional)
Z coordinate where the floor will be placed. If null, undefined, or omitted, the default is 0.
Return Value
The resulting mesh buffer. (Type: MeshBuffer)