Packageaway3d.core.filter
Classpublic class FogFilter
ImplementsIPrimitiveFilter

Adds fog layers to a view and provides automatic farfield filtering for primitives outside the furthest fog layers.

Public Properties
 PropertyDefined by
  material : IFogMaterial
Defines the material used by the fog layers.
FogFilter
  materials : Array
Defines an array of materials used by the fog layers (overrides material and subdivisions).
FogFilter
  maxZ : Number
Defines the maximum distance (end distance) of the fog layers.
FogFilter
  minZ : Number
Defines the minimum distance (start distance) of the fog layers.
FogFilter
  subdivisions : Number
Defines the maximum distance (end distance) of the fog layers.
FogFilter
Protected Properties
 PropertyDefined by
  ini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
FogFilter
Public Methods
 MethodDefined by
  
FogFilter
(init:Object = null)
Creates a new FogFilter object.
FogFilter
  
filter(primitives:Array, scene:Scene3D, camera:Camera3D, clip:Clipping):Array
Applies the filter to the primitive array.
FogFilter
  
toString():String
Used to trace the values of a filter.
FogFilter
  
updateMaterialColor(color:uint):void
Allows color change at runtime of the filter
FogFilter
Property detail
iniproperty
protected var ini:Init

Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.

materialproperty 
material:IFogMaterial  [read-write]

Defines the material used by the fog layers.

Implementation
    public function get material():IFogMaterial
    public function set material(value:IFogMaterial):void
materialsproperty 
materials:Array  [read-write]

Defines an array of materials used by the fog layers (overrides material and subdivisions).

Implementation
    public function get materials():Array
    public function set materials(value:Array):void
maxZproperty 
maxZ:Number  [read-write]

Defines the maximum distance (end distance) of the fog layers.

Implementation
    public function get maxZ():Number
    public function set maxZ(value:Number):void
minZproperty 
minZ:Number  [read-write]

Defines the minimum distance (start distance) of the fog layers.

Implementation
    public function get minZ():Number
    public function set minZ(value:Number):void
subdivisionsproperty 
subdivisions:Number  [read-write]

Defines the maximum distance (end distance) of the fog layers.

Implementation
    public function get subdivisions():Number
    public function set subdivisions(value:Number):void
Constructor detail
FogFilter()constructor
public function FogFilter(init:Object = null)Parameters
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
Init Parameters
 material:Material
 minZ:Number (default = 1000, min:0)
 maxZ:Number (default = 5000, min:0)
 subdivisions:Int (default = 20, min:1, max:50)
 materials:Array
Method detail
filter()method
public function filter(primitives:Array, scene:Scene3D, camera:Camera3D, clip:Clipping):Array

Applies the filter to the primitive array.

Parameters
primitives:Array — The primitives to be filtered.
 
scene:Scene3D — The scene to which the primitives belongs.
 
camera:Camera3D — The camera being used in the renderer for the primitives.
 
clip:Clipping — The clipping object used in the renderer for the primitive's view.

Returns
Array — The filtered array of primitives.
toString()method 
public function toString():String

Used to trace the values of a filter.

Returns
String — A string representation of the filter object.
updateMaterialColor()method 
public function updateMaterialColor(color:uint):void

Allows color change at runtime of the filter

Parameters
color:uint — The new color for the filter
Wiki link
Click to go to the wiki page for 'away3d.core.filter.FogFilter'

Code examples

Comments