| Package | org.ffilmation.engine.core |
| Class | public class fMaterialTypes |
| Constant | Defined by | ||
|---|---|---|---|
| CLIP : String = "clip" [static]
Creates a material from a MovieClip or image exported in any SWF you import into the scene. | fMaterialTypes | ||
| DOOR : String = "door" [static]
Creates a door in any wall. | fMaterialTypes | ||
| FENCE : String = "fence" [static]
Creates a Fence material. | fMaterialTypes | ||
| PERLIN : String = "perlin" [static]
Creates a material by stacking several layers of "tile" materials, using a perlin noise funcion as alpha mask for each layer. Perlin materials are procedural materials formed by a base material and unlimited layers of other materials, each one rendered from a perlin noise definition. The perlin noise for each layer is used as the alpha-mask for that layer. Both the base material and the layer materials must be "tile" materials and their definitions must be included for the perlin material to work. With perlin materials, you can create more natural-looking environments without extra effort | fMaterialTypes | ||
| PROCEDURAL : String = "procedural" [static]
Creates a material using a custom class. | fMaterialTypes | ||
| TILE : String = "tile" [static]
Creates a material by "Tiling" an image in the imported libraries. | fMaterialTypes | ||
| WINDOW : String = "window" [static]
Adds windows to any wall. | fMaterialTypes | ||
| CLIP | constant |
public static const CLIP:String = "clip"
Creates a material from a MovieClip or image exported in any SWF you import into the scene. The clip/image is scaled to fit the requested dimensions. If you want it to tile, use the fTileMaterial instead.
If you use a movieClip, place your "hole" definition clips only in the first frame. After reading the holes the class will gotoAndStop(2) the clip. In frame 2 you should have what you want to be visible as well as clips for doors and windows. See examples and tutorials for further info on holes, doors and windows
<materialDefinition name="Ground" type="clip">
<diffuse>Ground</diffuse>
<bump>Ground_bump</bump>
</materialDefinition>
| DOOR | constant |
public static const DOOR:String = "door"
Creates a door in any wall. The Door material allows users to build doors fast.
<materialDefinition name="MNIP_VillageMaterials_Door13" type="door">
<base>FFMaterials_woods2_Wood2_13</base>
<frame>FFMaterials_woods2_Wood2_11</frame>
<door>FFMaterials_woods2_Wood2_14</door>
<position>0</position>
<width>90</width>
<height>150</height>
<framesize>10</framesize>
</materialDefinition>
| FENCE | constant |
public static const FENCE:String = "fence"
Creates a Fence material. Keep in mind that holes have an impact in performace of the collision an light algorythms and therefore, this material has to be used with moderation.
<materialDefinition name="MNIP_VillageMaterials_Fence" type="fence">
<base>FFMaterials_woods1_Wood1_9</base>
<width>20</width>
<gap>10</gap>
<irregular>20</irregular>
</materialDefinition>
| PERLIN | constant |
public static const PERLIN:String = "perlin"
Creates a material by stacking several layers of "tile" materials, using a perlin noise funcion as alpha mask for each layer.
Perlin materials are procedural materials formed by a base material and unlimited layers of other materials, each one rendered from a perlin noise definition.
The perlin noise for each layer is used as the alpha-mask for that layer.
Both the base material and the layer materials must be "tile" materials and their definitions must be included for the perlin material to work.
With perlin materials, you can create more natural-looking environments without extra effort
<noiseDefinition name="Ground_noise_2">
<seed>0</seed>
<baseX>200</baseX>
<baseY>200</baseY>
<octaves>2</octaves>
<fractal>true</fractal>
</noiseDefinition>
<materialDefinition name="MNIP_VillageMaterials_Ground" type="perlin">
<base>FFMaterials_ground_Ground1</base>
<layer>
<noise>Ground_noise_2</noise>
<material>FFMaterials_ground_Ground7</material>
</layer>
</materialDefinition>
| PROCEDURAL | constant |
public static const PROCEDURAL:String = "procedural"
Creates a material using a custom class. The class must implement the fEngineMaterial interface
See also
<materialDefinition name="Ground" type="procedural">
<classname>com.domain.game.materials.myMaterial</classname>
</materialDefinition>
| TILE | constant |
public static const TILE:String = "tile"
Creates a material by "Tiling" an image in the imported libraries.
<materialDefinition name="Ground" type="tile">
<diffuse>Ground</diffuse>
<bump>Ground_bump</bump>
</materialDefinition>
| WINDOW | constant |
public static const WINDOW:String = "window"
Adds windows to any wall. This is a fast way of creating nicer buildings with little effort. Keep in mind that holes have an impact in performace of the collision an light algorythms and therefore, this material has to be used with moderation.
<materialDefinition name="MNIP_VillageMaterials_Windows13" type="window">
<base>FFMaterials_woods2_Wood2_13</base>
<frame>FFMaterials_woods2_Wood2_11</frame>
<position>0</position>
<width>60</width>
<height>90</height>
<framesize>5</framesize>
<separation>80</separation>
<geometry>2x2</geometry>
</materialDefinition>