| Package | away3d.materials |
| Class | public class GlassMaterial |
| Inheritance | GlassMaterial away3d.materials.SinglePassShaderMaterial |
| Property | Defined By | ||
|---|---|---|---|
| dispersionB : Number
The scale of dispersion for the blue channel. | GlassMaterial | ||
| dispersionG : Number
The scale of dispersion for the green channel. | GlassMaterial | ||
| dispersionR : Number
The scale of dispersion for the red channel. | GlassMaterial | ||
| envMapAlpha : Number
The opacity of the environment map, ie: how reflective the surface is. | GlassMaterial | ||
| exponent : Number
The exponent of the calculated fresnel term. | GlassMaterial | ||
| glassColor : uint | GlassMaterial | ||
| innerRefraction : Number
The refractive index of the inner medium (ie the material itself)
| GlassMaterial | ||
| outerRefraction : Number
The refractive index of the outer medium (where the view ray starts)
| GlassMaterial | ||
| Method | Defined By | ||
|---|---|---|---|
GlassMaterial(normalMap:BitmapData, envMap:BitmapData, targetModel:Mesh, chromaticDispersion:Boolean = false, init:Object = null)
Creates a new GlassMaterial object. | GlassMaterial | ||
| Method | Defined By | ||
|---|---|---|---|
[override] | GlassMaterial | ||
| dispersionB | property |
dispersionB:NumberThe scale of dispersion for the blue channel. For best results, use value close to but lower than 1.
public function get dispersionB():Number public function set dispersionB(value:Number):void| dispersionG | property |
dispersionG:NumberThe scale of dispersion for the green channel. For best results, use value close to but lower than 1.
public function get dispersionG():Number public function set dispersionG(value:Number):void| dispersionR | property |
dispersionR:NumberThe scale of dispersion for the red channel. For best results, use value close to but lower than 1.
public function get dispersionR():Number public function set dispersionR(value:Number):void| envMapAlpha | property |
envMapAlpha:NumberThe opacity of the environment map, ie: how reflective the surface is. 1 is a perfect mirror.
public function get envMapAlpha():Number public function set envMapAlpha(value:Number):void| exponent | property |
exponent:NumberThe exponent of the calculated fresnel term. Lower values will only show reflections at steeper view angles.
public function get exponent():Number public function set exponent(value:Number):void| glassColor | property |
glassColor:uint public function get glassColor():uint public function set glassColor(value:uint):void| innerRefraction | property |
innerRefraction:NumberThe refractive index of the inner medium (ie the material itself)
public function get innerRefraction():Number public function set innerRefraction(value:Number):void| outerRefraction | property |
outerRefraction:NumberThe refractive index of the outer medium (where the view ray starts)
public function get outerRefraction():Number public function set outerRefraction(value:Number):void| GlassMaterial | () | Constructor |
public function GlassMaterial(normalMap:BitmapData, envMap:BitmapData, targetModel:Mesh, chromaticDispersion:Boolean = false, init:Object = null)Creates a new GlassMaterial object.
ParametersnormalMap:BitmapData — An object-space normal map
| |
envMap:BitmapData — The spherical environment map used for reflections
| |
targetModel:Mesh — The target mesh for which this shader is applied
| |
chromaticDispersion:Boolean (default = false) — An initialisation object
| |
init:Object (default = null) |
| updatePixelShader | () | method |
override protected function updatePixelShader(source:Object3D, view:View3D):voidParameters
source:Object3D | |
view:View3D |