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 | ||
---|---|---|---|
GlassMaterial |
dispersionB | property |
dispersionB:Number
[read-write]The scale of dispersion for the blue channel. For best results, use value close to but lower than 1.
Implementation public function get dispersionB():Number
public function set dispersionB(value:Number):void
dispersionG | property |
dispersionG:Number
[read-write]The scale of dispersion for the green channel. For best results, use value close to but lower than 1.
Implementation public function get dispersionG():Number
public function set dispersionG(value:Number):void
dispersionR | property |
dispersionR:Number
[read-write]The scale of dispersion for the red channel. For best results, use value close to but lower than 1.
Implementation public function get dispersionR():Number
public function set dispersionR(value:Number):void
envMapAlpha | property |
envMapAlpha:Number
[read-write]The opacity of the environment map, ie: how reflective the surface is. 1 is a perfect mirror.
Implementation public function get envMapAlpha():Number
public function set envMapAlpha(value:Number):void
exponent | property |
exponent:Number
[read-write]The exponent of the calculated fresnel term. Lower values will only show reflections at steeper view angles.
Implementation public function get exponent():Number
public function set exponent(value:Number):void
glassColor | property |
glassColor:uint
[read-write]Implementation
public function get glassColor():uint
public function set glassColor(value:uint):void
innerRefraction | property |
innerRefraction:Number
[read-write]The refractive index of the inner medium (ie the material itself)
Implementation public function get innerRefraction():Number
public function set innerRefraction(value:Number):void
outerRefraction | property |
outerRefraction:Number
[read-write]The refractive index of the outer medium (where the view ray starts)
Implementation 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)
Parameters
normalMap: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 )
|
envMapAlpha:Number (default = 1) | |
outerRefraction:Number (default = 1.0008) | |
innerRefraction:Number (default = 1.330) | |
dispersionR:Number (default = 1) | |
dispersionG:Number (default = .95) | |
dispersionB:Number (default = .9) | |
exponent:Number (default = 5) | |
glassColor:Int (default = 0xffffff) |
updatePixelShader | () | method |
protected override function updatePixelShader(source:Object3D, view:View3D):void
Parameters
source:Object3D |
|
view:View3D |