Package | away3d.exporters |
Class | public class Elevation2AS3 |
Inheritance | Elevation2AS3 flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
maxElevation : Number
Locks elevation factor above this level. | Elevation2AS3 | ||
minElevation : Number
Locks elevation factor beneath this level. | Elevation2AS3 |
Method | Defined By | ||
---|---|---|---|
Elevation2AS3(classname:String, packagename:String, exportmap:Boolean = false)
Creates a generate an as3 file of the elevation array. | Elevation2AS3 | ||
addOnExportComplete(listener:Function):void
Default method for adding a complete event listener
The event.data holds the generated string from the wavefront class
| Elevation2AS3 | ||
export(sourceBmd:BitmapData, channel:String = r, subdivisionX:int = 10, subdivisionY:int = 10, factorX:Number = 1, factorY:Number = 1, elevate:Number = .5):void
Generate the string representing the mesh and optionally color information for the reader. | Elevation2AS3 | ||
removeOnExportComplete(listener:Function):void
Default method for removing a complete event listener
| Elevation2AS3 |
maxElevation | property |
maxElevation:Number
Locks elevation factor above this level. Default is 255;
public function get maxElevation():Number
public function set maxElevation(value:Number):void
minElevation | property |
minElevation:Number
Locks elevation factor beneath this level. Default is 0;
public function get minElevation():Number
public function set minElevation(value:Number):void
Elevation2AS3 | () | Constructor |
public function Elevation2AS3(classname:String, packagename:String, exportmap:Boolean = false)
Creates a generate an as3 file of the elevation array.
Parametersclassname:String — String, the name of the class that will be exported.
| |
packagename:String — [optional] String. the name of the package that will be exported.
| |
exportmap:Boolean (default = false ) — [optional] Boolean. Defines if the class should generate an array to pass to the ElevationReader.
|
addOnExportComplete | () | method |
public function addOnExportComplete(listener:Function):void
Default method for adding a complete event listener The event.data holds the generated string from the wavefront class
Parameters
listener:Function — The listener function
|
export | () | method |
public function export(sourceBmd:BitmapData, channel:String = r, subdivisionX:int = 10, subdivisionY:int = 10, factorX:Number = 1, factorY:Number = 1, elevate:Number = .5):void
Generate the string representing the mesh and optionally color information for the reader.
Parameters
sourceBmd:BitmapData — Bitmapdata. The bitmapData to read from.
| |
channel:String (default = r ) — [optional] String. The channel information to read. supported "a", alpha, "r", red, "g", green, "b", blue and "av" (averages and luminance). Default is red channel "r".
| |
subdivisionX:int (default = 10 ) — [optional] int. The subdivision to read the pixels along the x axis. Default is 10.
| |
subdivisionY:int (default = 10 ) — [optional] int. The subdivision to read the pixels along the y axis. Default is 10.
| |
factorX:Number (default = 1 ) — [optional] Number. The scale multiplier along the x axis. Default is 1.
| |
factorY:Number (default = 1 ) — [optional] Number. The scale multiplier along the y axis. Default is 1.
| |
elevate:Number (default = .5 ) — [optional] Number. The scale multiplier along the z axis. Default is .5.
|
removeOnExportComplete | () | method |
public function removeOnExportComplete(listener:Function):void
Default method for removing a complete event listener
Parameters
listener:Function — The listener function
|