module WFC

Overview

WFC Crystal module.

The module implements a character-based texture but no regular image textures as of now. You can inherit the abstract Texture class to add support for a texture format.

See the example for simple usage.

Defined in:

wfc.cr

Class Method Summary

Class Method Detail

def self.generate(texture : Texture, target_width : Int = texture.width * 8, target_height : Int = texture.height * 8, tile_width : Int = 3, tile_height : Int = 3, allow_expansion : Bool = true, allow_horizontal_flip : Bool = true, allow_vertical_flip : Bool = true, allow_rotation : Bool = true, maximum_iterations : Int = -1, retry_until_success : Bool = true) : Texture | Nil #

Generates a new texture from a sample texture.


[View source]