Layer
public struct Layer : LayerProtocol, MutablePropertied
Layers capture the contents of a Map can be one of four kinds
- Tile A grid of
Tiles - __ Object__ A collection of
Objects - Group A collection of
Layers enabling hierarchy within theMap - Image An image not in a
TileSet
Every layer has a set of common attributes (such as an offest) and can capture user specified properites too.
-
An enumeration for each kind of layer, together with the specifc information about that kind of layer (e.g. the
See moreImageReferencefor an Image LayerDeclaration
Swift
public enum Kind -
A
LayerFilterthat matches against thenameproperty of theLayer. Note that in Tiled layer names are not unique.Declaration
Swift
public static func named(_ name: String) -> LayerFilter -
The name of the layer, or an empty
Stringif non was specifiedDeclaration
Swift
public let name: String -
trueif the layer should be visibleDeclaration
Swift
public let visible: Bool -
A level of transparent the layer (and therefore its contents) should be rendered with
Declaration
Swift
public let opacity: Double -
An offset from the
Layers parent’s originDeclaration
Swift
public let position: Position -
The
Layer.Kindof theLayertogether with the information specific to that kindDeclaration
Swift
public let kind: Kind -
If
trueany editing operations should not be applied to thisLayerDeclaration
Swift
public var locked: Bool -
Any tint that should be applied to the
Layerand its contentsDeclaration
Swift
public var tintColor: Color? -
User specified
Propertiesof the layerDeclaration
Swift
public var properties: Properties
View on GitHub
Layer Structure Reference