Constructor
new Box2dTileLayer(pos, size, tileInfoopt, renderOrderopt, useWebGLopt)
Create a tile layer object
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pos | Vector2 | World space position | ||
size | Vector2 | World space size | ||
tileInfo | TileInfo | <optional> | Tile info for layer | |
renderOrder | number | <optional> | 0 | Objects are sorted by renderOrder |
useWebGL | boolean | <optional> | true | Should this layer use WebGL for rendering |
- Source
Extends
- TileLayer
Members
box2dObject
Properties| Type | Description |
|---|---|
| Box2dStaticObject | The box2d object |
- Source
Methods
buildCollision(frictionopt, restitutionopt)
Create box2d collision fixtures for solid tiles
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
friction | number | <optional> | 0.2 | |
restitution | number | <optional> | 0 |
- Source