LdtkAutoLayerRuleDefinition

ceramic.LdtkAutoLayerRuleDefinition (Class)

This complex section isn't meant to be used by game devs according to LDtk documentation, but Ceramic auto-tiling rules can be generated from these so they may still be useful for us if we want to edit a map in game while still fully working auto-layer rules from LDtk. The use of this is opt-in. Default map loading is using already resolved tiles.

Instance Members

ldtk
active: Bool

If false, the rule effect isn't applied, and no tiles are generated.


ldtk
breakOnMatch: Bool

When true, the rule will prevent other rules to be applied in the same cell if it matches (true by default).


ldtk
chance: Float

Chances for this rule to be applied (0 to 1)


ldtk
checker: LdtkCheckerMode

Checker mode


ldtk
flipX: Bool

If true, allow rule to be matched by flipping its pattern horizontally


ldtk
flipY: Bool

If true, allow rule to be matched by flipping its pattern vertically


ldtk
outOfBoundsValue: Int

Default IntGrid value when checking cells outside of level bounds


ldtk
pattern: Array<Int>

Rule pattern (size x size)


ldtk
perlinActive: Bool

If true, enable Perlin filtering to only apply rule on specific random area


ldtk
perlinOctaves: Float

ldtk
perlinScale: Float

ldtk
perlinSeed: Float

ldtk
pivotX: Float

X pivot of a tile stamp (0-1)


ldtk
pivotY: Float

Y pivot of a tile stamp (0-1)


ldtk
size: Int

Pattern width & height. Should only be 1,3,5 or 7.


ldtk
tileIds: Array<Int>

Array of all the tile IDs. They are used randomly or as stamps, based on tileMode value.


ldtk
tileMode: LdtkTileMode

Defines how tileIds array is used


ldtk
uid: Int

Unique Int identifier


ldtk
xModulo: Int

X cell coord modulo


ldtk
xOffset: Int

X cell start offset


ldtk
yModulo: Int

Y cell coord modulo


ldtk
yOffset: Int

Y cell start offset


ldtk
toString(): String
Returns
String

ldtk
new(?json: haxe.DynamicAccess<Dynamic>): Void
Name Type Default
json haxe.DynamicAccess<Dynamic> (optional)