Package | laya.d3.core.material |
Class | public class WaterMaterial |
Inheritance | WaterMaterial BaseMaterial laya.resource.Resource |
Property | Defined By | ||
---|---|---|---|
alphaTest : Boolean
获取是否透明裁剪。
| BaseMaterial | ||
alphaTestValue : Number
获取透明测试模式裁剪值。
| BaseMaterial | ||
blend : int 透明混合。 | BaseMaterial | ||
blendConstColor : Vector4 混合常量颜色。 | BaseMaterial | ||
blendEquation : int 混合方程。 | BaseMaterial | ||
blendEquationAlpha : int Alpha混合方程。 | BaseMaterial | ||
blendEquationRGB : int RGB混合方程。 | BaseMaterial | ||
cull : int 渲染剔除。 | BaseMaterial | ||
currentTm : Number | WaterMaterial | ||
deepColorTexture : BaseTexture | WaterMaterial | ||
deepScale : Number | WaterMaterial | ||
depthFunc : int 深度测试函数。 | BaseMaterial | ||
depthTest : Boolean 是否深度测试。 | BaseMaterial | ||
depthWrite : Boolean 是否深度写入。 | BaseMaterial | ||
detailTexture : BaseTexture | WaterMaterial | ||
diffuseTexture : BaseTexture
获取漫反射贴图。
| WaterMaterial | ||
dstBlend : int 目标混合参数,在blend为BLEND_ENABLE_ALL时生效。 | BaseMaterial | ||
dstBlendAlpha : int Alpha目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
dstBlendRGB : int RGB目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
foamTexture : BaseTexture | WaterMaterial | ||
geoWaveUVScale : Number | WaterMaterial | ||
normalTexture : BaseTexture
获取法线贴图。
| WaterMaterial | ||
renderMode : int [write-only] | WaterMaterial | ||
renderQueue : int 所属渲染队列. | BaseMaterial | ||
scrsize : Float32Array [write-only] | WaterMaterial | ||
seaColor : Float32Array | WaterMaterial | ||
SHADERDEFINE_CUBE_ENV : int = 0 [static] | WaterMaterial | ||
SHADERDEFINE_HDR_ENV : int = 0 [static] | WaterMaterial | ||
SHADERDEFINE_SHOW_NORMAL : int = 0 [static] | WaterMaterial | ||
SHADERDEFINE_USE_FOAM : int = 0 [static] | WaterMaterial | ||
SHADERDEFINE_USE_REFRACT_TEX : int = 0 [static] | WaterMaterial | ||
SHADERDEFINE_USEVERTEXHEIGHT : int = 0 [static]
如果定义了这个宏,就不再使用深度纹理,可以提高速度,但是建模麻烦一些。
| WaterMaterial | ||
skyTexture : BaseTexture | WaterMaterial | ||
srcBlend : int 源混合参数,在blend为BLEND_ENABLE_ALL时生效。 | BaseMaterial | ||
srcBlendAlpha : int Alpha源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
srcBlendRGB : int RGB源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
underWaterTexture : BaseTexture | WaterMaterial | ||
useFoam : Boolean [write-only] | WaterMaterial | ||
useRefractTexture : Boolean [write-only] | WaterMaterial | ||
useVertexDeep : Boolean | WaterMaterial | ||
vertexDispTexture : BaseTexture
对定点进行变换的纹理。现在不用
| WaterMaterial | ||
waterInfoTexture : BaseTexture | WaterMaterial | ||
waveInfo : Float32Array | WaterMaterial | ||
waveInfoD : Float32Array | WaterMaterial | ||
waveMainDir : Number | WaterMaterial | ||
windDir : Number | WaterMaterial | ||
windSpeed : Number | WaterMaterial |
Method | Defined By | ||
---|---|---|---|
WaterMaterial | |||
_setRenderStateBlendDepth():void
设置渲染相关状态。
| BaseMaterial | ||
_setRenderStateFrontFace(isTarget:Boolean, transform:Transform3D):void
设置渲染相关状态。
| BaseMaterial | ||
_upload():void
上传材质。
| BaseMaterial | ||
clone():*
克隆。
| BaseMaterial | ||
cloneTo(destObject:*):void
克隆。
| BaseMaterial | ||
disableFog():void
禁用雾化。
| WaterMaterial | ||
load(url:String):WaterMaterial [static]
加载标准材质。
| WaterMaterial | ||
onAsynLoaded(url:String, data:*, params:Array):void [override] | WaterMaterial | ||
setShaderName(name:String):void
设置使用Shader名字。
| BaseMaterial |
Constant | Defined By | ||
---|---|---|---|
BLEND_DISABLE : int = 0 [static] 混合枚举_禁用。 | BaseMaterial | ||
BLEND_ENABLE_ALL : int = 1 [static] 混合枚举_启用_RGB和Alpha统一混合。 | BaseMaterial | ||
BLEND_ENABLE_SEPERATE : int = 2 [static] 混合枚举_启用_RGB和Alpha单独混合。 | BaseMaterial | ||
BLENDEQUATION_ADD : int = 0 [static] 混合方程枚举_加法,例:source + destination | BaseMaterial | ||
BLENDEQUATION_REVERSE_SUBTRACT : int = 2 [static] 混合方程枚举_反序减法,例:destination - source | BaseMaterial | ||
BLENDEQUATION_SUBTRACT : int = 1 [static] 混合方程枚举_减法,例:source - destination | BaseMaterial | ||
BLENDPARAM_CONSTANT_ALPHA : int = 0x8003 [static] 混合参数枚举_常量阿尔法,例:RGB(Ac, Ac, Ac),Alpha(Ac)。 | BaseMaterial | ||
BLENDPARAM_CONSTANT_COLOR : int = 0x8001 [static] 混合参数枚举_常量颜色,例:RGB(Rc, Gc, Bc),Alpha(Ac)。 | BaseMaterial | ||
BLENDPARAM_DST_ALPHA : int = 0x0304 [static] 混合参数枚举_目标阿尔法,例:RGB(Ad, Ad, Ad),Alpha(Ad)。 | BaseMaterial | ||
BLENDPARAM_DST_COLOR : int = 0x0306 [static] 混合参数枚举_目标颜色,例:RGB(Rd, Gd, Bd),Alpha(Ad)。 | BaseMaterial | ||
BLENDPARAM_ONE : int = 1 [static] 混合参数枚举_一,例:RGB(1,1,1),Alpha:(1)。 | BaseMaterial | ||
BLENDPARAM_ONE_MINUS_CONSTANT_ALPHA : int = 0x8004 [static] 混合参数枚举_一减常量阿尔法,例:RGB(1-Ac, 1-Ac, 1-Ac),Alpha(1-Ac)。 | BaseMaterial | ||
BLENDPARAM_ONE_MINUS_CONSTANT_COLOR : int = 0x8002 [static] 混合参数枚举_一减常量颜色,例:RGB(1-Rc, 1-Gc, 1-Bc),Alpha(1-Ac)。 | BaseMaterial | ||
BLENDPARAM_ONE_MINUS_DST_ALPHA : int = 0x0305 [static] 混合参数枚举_一减目标阿尔法,例:RGB(1-Ad, 1-Ad, 1-Ad),Alpha(Ad)。 | BaseMaterial | ||
BLENDPARAM_ONE_MINUS_DST_COLOR : int = 0x0307 [static] 混合参数枚举_一减目标颜色,例:RGB(1-Rd, 1-Gd, 1-Bd),Alpha(1-Ad)。 | BaseMaterial | ||
BLENDPARAM_ONE_MINUS_SRC_ALPHA : int = 0x0303 [static] 混合参数枚举_一减源阿尔法,例:RGB(1-As, 1-As, 1-As),Alpha(1-As)。 | BaseMaterial | ||
BLENDPARAM_ONE_MINUS_SRC_COLOR : int = 0x0301 [static] 混合参数枚举_一减源颜色,例:RGB(1-Rs, 1-Gs, 1-Bs),Alpha(1-As)。 | BaseMaterial | ||
BLENDPARAM_SRC_ALPHA : int = 0x0302 [static] 混合参数枚举_源透明,例:RGB(As, As, As),Alpha(1-As)。 | BaseMaterial | ||
BLENDPARAM_SRC_ALPHA_SATURATE : int = 0x0308 [static] 混合参数枚举_阿尔法饱和,例:RGB(min(As, 1 - Ad), min(As, 1 - Ad), min(As, 1 - Ad)),Alpha(1)。 | BaseMaterial | ||
BLENDPARAM_SRC_COLOR : int = 0x0300 [static] 混合参数枚举_源颜色,例:RGB(Rs, Gs, Bs),Alpha(As)。 | BaseMaterial | ||
BLENDPARAM_ZERO : int = 0 [static] 混合参数枚举_零,例:RGB(0,0,0),Alpha:(1)。 | BaseMaterial | ||
CULL_BACK : int = 2 [static] 剔除枚举_剔除背面。 | BaseMaterial | ||
CULL_FRONT : int = 1 [static] 剔除枚举_剔除正面。 | BaseMaterial | ||
CULL_NONE : int = 0 [static] 剔除枚举_不剔除。 | BaseMaterial | ||
CURTM : int = 8 [static] | WaterMaterial | ||
DEEPCOLORTEXTURE : int = 10 [static] | WaterMaterial | ||
defaultMaterial : WaterMaterial [static] 默认材质,禁止修改 | WaterMaterial | ||
DEPTHFUNC_ALWAYS : int = 0x0207 [static] 深度测试函数枚举_总是通过。 | BaseMaterial | ||
DEPTHFUNC_EQUAL : int = 0x0202 [static] 深度测试函数枚举_等于时通过。 | BaseMaterial | ||
DEPTHFUNC_GEQUAL : int = 0x0206 [static] 深度测试函数枚举_大于等于时通过。 | BaseMaterial | ||
DEPTHFUNC_GREATER : int = 0x0204 [static] 深度测试函数枚举_大于时通过。 | BaseMaterial | ||
DEPTHFUNC_LEQUAL : int = 0x0203 [static] 深度测试函数枚举_小于等于时通过。 | BaseMaterial | ||
DEPTHFUNC_LESS : int = 0x0201 [static] 深度测试函数枚举_小于时通过。 | BaseMaterial | ||
DEPTHFUNC_NEVER : int = 0x0200 [static] 深度测试函数枚举_从不通过。 | BaseMaterial | ||
DEPTHFUNC_NOTEQUAL : int = 0x0205 [static] 深度测试函数枚举_不等于时通过。 | BaseMaterial | ||
DETAILTEXTURE : int = 9 [static] | WaterMaterial | ||
DIFFUSETEXTURE : int = 1 [static] | WaterMaterial | ||
FOAMTEXTURE : int = 17 [static] | WaterMaterial | ||
GEOWAVE_UV_SCALE : int = 18 [static] | WaterMaterial | ||
NORMALTEXTURE : int = 2 [static] | WaterMaterial | ||
RENDERMODE_CUTOUT : int = 3 [static] 渲染状态_透明测试。 | WaterMaterial | ||
RENDERMODE_CUTOUTDOUBLEFACE : int = 4 [static] 渲染状态_透明测试_双面。 | WaterMaterial | ||
RENDERMODE_OPAQUE : int = 1 [static] 渲染状态_不透明。 | WaterMaterial | ||
RENDERMODE_OPAQUEDOUBLEFACE : int = 2 [static] 渲染状态_不透明_双面。 | WaterMaterial | ||
RENDERMODE_TRANSPARENT : int = 13 [static] 渲染状态_透明混合。 | WaterMaterial | ||
SCRSIZE : int = 15 [static] | WaterMaterial | ||
SEA_COLOR : int = 19 [static] | WaterMaterial | ||
SKYTEXTURE : int = 11 [static] | WaterMaterial | ||
UNDERWATERTEXTURE : int = 3 [static] | WaterMaterial | ||
UVAGE : int = 7 [static] | WaterMaterial | ||
UVANIAGE : int = 5 [static] | WaterMaterial | ||
UVMATRIX : int = 6 [static] | WaterMaterial | ||
VERTEXDISPTEXTURE : int = 4 [static] | WaterMaterial | ||
WATERINFO : int = 16 [static] | WaterMaterial | ||
WAVEINFO : int = 12 [static] | WaterMaterial | ||
WAVEINFOD : int = 13 [static] | WaterMaterial | ||
WAVEINFODEEPSCALE : int = 20 [static] | WaterMaterial | ||
WAVEMAINDIR : int = 14 [static] | WaterMaterial |
currentTm | property |
currentTm:Number
public function get currentTm():Number
public function set currentTm(value:Number):void
deepColorTexture | property |
deepColorTexture:BaseTexture
public function get deepColorTexture():BaseTexture
public function set deepColorTexture(value:BaseTexture):void
deepScale | property |
deepScale:Number
public function get deepScale():Number
public function set deepScale(value:Number):void
detailTexture | property |
detailTexture:BaseTexture
public function get detailTexture():BaseTexture
public function set detailTexture(value:BaseTexture):void
diffuseTexture | property |
diffuseTexture:BaseTexture
获取漫反射贴图。
public function get diffuseTexture():BaseTexture
public function set diffuseTexture(value:BaseTexture):void
foamTexture | property |
foamTexture:BaseTexture
public function get foamTexture():BaseTexture
public function set foamTexture(value:BaseTexture):void
geoWaveUVScale | property |
geoWaveUVScale:Number
public function get geoWaveUVScale():Number
public function set geoWaveUVScale(value:Number):void
normalTexture | property |
normalTexture:BaseTexture
获取法线贴图。
public function get normalTexture():BaseTexture
public function set normalTexture(value:BaseTexture):void
renderMode | property |
renderMode:int
[write-only] public function set renderMode(value:int):void
scrsize | property |
scrsize:Float32Array
[write-only] public function set scrsize(value:Float32Array):void
seaColor | property |
seaColor:Float32Array
public function get seaColor():Float32Array
public function set seaColor(value:Float32Array):void
SHADERDEFINE_CUBE_ENV | property |
public static var SHADERDEFINE_CUBE_ENV:int = 0
SHADERDEFINE_HDR_ENV | property |
public static var SHADERDEFINE_HDR_ENV:int = 0
SHADERDEFINE_SHOW_NORMAL | property |
public static var SHADERDEFINE_SHOW_NORMAL:int = 0
SHADERDEFINE_USE_FOAM | property |
public static var SHADERDEFINE_USE_FOAM:int = 0
SHADERDEFINE_USE_REFRACT_TEX | property |
public static var SHADERDEFINE_USE_REFRACT_TEX:int = 0
SHADERDEFINE_USEVERTEXHEIGHT | property |
public static var SHADERDEFINE_USEVERTEXHEIGHT:int = 0
如果定义了这个宏,就不再使用深度纹理,可以提高速度,但是建模麻烦一些。
skyTexture | property |
skyTexture:BaseTexture
public function get skyTexture():BaseTexture
public function set skyTexture(value:BaseTexture):void
underWaterTexture | property |
underWaterTexture:BaseTexture
public function get underWaterTexture():BaseTexture
public function set underWaterTexture(value:BaseTexture):void
useFoam | property |
useFoam:Boolean
[write-only] public function set useFoam(value:Boolean):void
useRefractTexture | property |
useRefractTexture:Boolean
[write-only] public function set useRefractTexture(value:Boolean):void
useVertexDeep | property |
useVertexDeep:Boolean
public function get useVertexDeep():Boolean
public function set useVertexDeep(value:Boolean):void
vertexDispTexture | property |
vertexDispTexture:BaseTexture
对定点进行变换的纹理。现在不用
public function get vertexDispTexture():BaseTexture
public function set vertexDispTexture(value:BaseTexture):void
waterInfoTexture | property |
waterInfoTexture:BaseTexture
public function get waterInfoTexture():BaseTexture
public function set waterInfoTexture(value:BaseTexture):void
waveInfo | property |
waveInfo:Float32Array
public function get waveInfo():Float32Array
public function set waveInfo(value:Float32Array):void
waveInfoD | property |
waveInfoD:Float32Array
public function get waveInfoD():Float32Array
public function set waveInfoD(value:Float32Array):void
waveMainDir | property |
waveMainDir:Number
public function get waveMainDir():Number
public function set waveMainDir(value:Number):void
windDir | property |
windDir:Number
public function get windDir():Number
public function set windDir(value:Number):void
windSpeed | property |
windSpeed:Number
public function get windSpeed():Number
public function set windSpeed(value:Number):void
WaterMaterial | () | Constructor |
public function WaterMaterial()
disableFog | () | method |
public function disableFog():void
禁用雾化。
load | () | method |
public static function load(url:String):WaterMaterial
加载标准材质。
Parameters
url:String — 标准材质地址。
|
WaterMaterial |
onAsynLoaded | () | method |
override public function onAsynLoaded(url:String, data:*, params:Array):void
Parameters
url:String | |
data:* | |
params:Array |
CURTM | Constant |
public static const CURTM:int = 8
DEEPCOLORTEXTURE | Constant |
public static const DEEPCOLORTEXTURE:int = 10
defaultMaterial | Constant |
public static const defaultMaterial:WaterMaterial
默认材质,禁止修改
DETAILTEXTURE | Constant |
public static const DETAILTEXTURE:int = 9
DIFFUSETEXTURE | Constant |
public static const DIFFUSETEXTURE:int = 1
FOAMTEXTURE | Constant |
public static const FOAMTEXTURE:int = 17
GEOWAVE_UV_SCALE | Constant |
public static const GEOWAVE_UV_SCALE:int = 18
NORMALTEXTURE | Constant |
public static const NORMALTEXTURE:int = 2
RENDERMODE_CUTOUT | Constant |
public static const RENDERMODE_CUTOUT:int = 3
渲染状态_透明测试。
RENDERMODE_CUTOUTDOUBLEFACE | Constant |
public static const RENDERMODE_CUTOUTDOUBLEFACE:int = 4
渲染状态_透明测试_双面。
RENDERMODE_OPAQUE | Constant |
public static const RENDERMODE_OPAQUE:int = 1
渲染状态_不透明。
RENDERMODE_OPAQUEDOUBLEFACE | Constant |
public static const RENDERMODE_OPAQUEDOUBLEFACE:int = 2
渲染状态_不透明_双面。
RENDERMODE_TRANSPARENT | Constant |
public static const RENDERMODE_TRANSPARENT:int = 13
渲染状态_透明混合。
SCRSIZE | Constant |
public static const SCRSIZE:int = 15
SEA_COLOR | Constant |
public static const SEA_COLOR:int = 19
SKYTEXTURE | Constant |
public static const SKYTEXTURE:int = 11
UNDERWATERTEXTURE | Constant |
public static const UNDERWATERTEXTURE:int = 3
UVAGE | Constant |
public static const UVAGE:int = 7
UVANIAGE | Constant |
public static const UVANIAGE:int = 5
UVMATRIX | Constant |
public static const UVMATRIX:int = 6
VERTEXDISPTEXTURE | Constant |
public static const VERTEXDISPTEXTURE:int = 4
WATERINFO | Constant |
public static const WATERINFO:int = 16
WAVEINFO | Constant |
public static const WAVEINFO:int = 12
WAVEINFOD | Constant |
public static const WAVEINFOD:int = 13
WAVEINFODEEPSCALE | Constant |
public static const WAVEINFODEEPSCALE:int = 20
WAVEMAINDIR | Constant |
public static const WAVEMAINDIR:int = 14