HaXe Dynamic Textures
From dis-Emi-A
To help in producing improved visuals, the dis-Emi-a haXe Library includes a dynamic texture system. The system is divided into several layers to allow both the quickest use, and fine control when need be.
Contents |
Tile Explorer
Currently there is a simple tile explorer application. It's interface is somewhat clumsy at the moment -- the library does not focus on such applications, though improvements will be made before version 1.0.
Basic help information is: -click "Select" to choose a different tile structure -click "Recreate" to generate a new instance of this tile
Access the TestTile explorer directly [here]
Tile Files
The basic structure of a texture is specified in a tile XML file. See lib/draw/tiles/ for several examples.
These tile files specify the structure of the texture, and the parameters used to control the dynamic aspects of it. One of these XML files can be given to the tile engine to have a tile produced -- optionally the parameters can be overridden.
Tile Use
The resulting tiles are Flash BitmapData objects and can thus be used as a brush.
The TileDesc.brushFromXML is the fastest way to use the engine.
If you are using plain HX then use the "haXe String" button to get a string literal, to create a variable such as:
var tileXML = "...";
If you are using M4 then you can use the direct XML: save it to a file and use the HERE _FILE syntax:
var tileXML = HERE _FILE(MyBackground.tile.xml);
Tutorial
Refer to app-tutorial/tutorial/TilePatten.hx for an example of how to use the tiles.
Access it directly [here]. Click with the mouse to regenerate the texture.
