Package | laya.d3.core.material |
Class | public class StandardMaterial |
Inheritance | StandardMaterial BaseMaterial laya.resource.Resource |
Property | Defined By | ||
---|---|---|---|
albedo : Vector4
设置反射率。
| StandardMaterial | ||
alphaTest : Boolean
获取是否透明裁剪。
| BaseMaterial | ||
alphaTestValue : Number
获取透明测试模式裁剪值。
| BaseMaterial | ||
ambientColor : Vector3
设置环境光颜色。
| StandardMaterial | ||
ambientTexture : BaseTexture
获取环境贴图。
| StandardMaterial | ||
blend : int 透明混合。 | BaseMaterial | ||
blendConstColor : Vector4 混合常量颜色。 | BaseMaterial | ||
blendEquation : int 混合方程。 | BaseMaterial | ||
blendEquationAlpha : int Alpha混合方程。 | BaseMaterial | ||
blendEquationRGB : int RGB混合方程。 | BaseMaterial | ||
cull : int 渲染剔除。 | BaseMaterial | ||
depthFunc : int 深度测试函数。 | BaseMaterial | ||
depthTest : Boolean 是否深度测试。 | BaseMaterial | ||
depthWrite : Boolean 是否深度写入。 | BaseMaterial | ||
diffuseColor : Vector3
设置漫反射光颜色。
| StandardMaterial | ||
diffuseTexture : BaseTexture
获取漫反射贴图。
| StandardMaterial | ||
dstBlend : int 目标混合参数,在blend为BLEND_ENABLE_ALL时生效。 | BaseMaterial | ||
dstBlendAlpha : int Alpha目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
dstBlendRGB : int RGB目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
emissiveTexture : BaseTexture
获取放射贴图。
| StandardMaterial | ||
normalTexture : BaseTexture
获取法线贴图。
| StandardMaterial | ||
reflectColor : Vector3
设置反射颜色。
| StandardMaterial | ||
reflectTexture : BaseTexture
获取反射贴图。
| StandardMaterial | ||
renderMode : int [write-only]
设置渲染模式。
| StandardMaterial | ||
renderQueue : int 所属渲染队列. | BaseMaterial | ||
SHADERDEFINE_AMBIENTMAP : int [static] | StandardMaterial | ||
SHADERDEFINE_DIFFUSEMAP : int [static] | StandardMaterial | ||
SHADERDEFINE_EMISSIVEMAP : int [static] | StandardMaterial | ||
SHADERDEFINE_NORMALMAP : int [static] | StandardMaterial | ||
SHADERDEFINE_REFLECTMAP : int [static] | StandardMaterial | ||
SHADERDEFINE_SPECULARMAP : int [static] | StandardMaterial | ||
SHADERDEFINE_TILINGOFFSET : int [static] | StandardMaterial | ||
SHADERDEFINE_UVTRANSFORM : int [static] | StandardMaterial | ||
specularColor : Vector4
设置高光颜色。
| StandardMaterial | ||
specularTexture : BaseTexture
获取高光贴图。
| StandardMaterial | ||
srcBlend : int 源混合参数,在blend为BLEND_ENABLE_ALL时生效。 | BaseMaterial | ||
srcBlendAlpha : int Alpha源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
srcBlendRGB : int RGB源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。 | BaseMaterial | ||
tilingOffset : Vector4
获取纹理平铺和偏移。
| StandardMaterial | ||
transformUV : TransformUV
获取UV变换。
| StandardMaterial |
Method | Defined By | ||
---|---|---|---|
StandardMaterial | |||
_setRenderStateBlendDepth():void
设置渲染相关状态。
| BaseMaterial | ||
_setRenderStateFrontFace(isTarget:Boolean, transform:Transform3D):void
设置渲染相关状态。
| BaseMaterial | ||
_upload():void
上传材质。
| BaseMaterial | ||
clone():*
克隆。
| BaseMaterial | ||
cloneTo(destObject:*):void [override]
克隆。
| StandardMaterial | ||
disableFog():void
禁用雾化。
| StandardMaterial | ||
disableLight():void
禁用灯光。
| StandardMaterial | ||
load(url:String):StandardMaterial [static]
加载标准材质。
| StandardMaterial | ||
onAsynLoaded(url:String, data:*, params:Array):void [override]
private
| StandardMaterial | ||
setShaderName(name:String):void
设置使用Shader名字。
| BaseMaterial |
Constant | Defined By | ||
---|---|---|---|
ALBEDO : int = 7 [static] | StandardMaterial | ||
AMBIENTTEXTURE : int = 5 [static] | StandardMaterial | ||
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 | ||
defaultMaterial : StandardMaterial [static] 默认材质,禁止修改 | StandardMaterial | ||
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 | ||
DIFFUSETEXTURE : int = 1 [static] | StandardMaterial | ||
EMISSIVETEXTURE : int = 4 [static] | StandardMaterial | ||
MATERIALAMBIENT : int = 9 [static] | StandardMaterial | ||
MATERIALDIFFUSE : int = 10 [static] | StandardMaterial | ||
MATERIALREFLECT : int = 12 [static] | StandardMaterial | ||
MATERIALSPECULAR : int = 11 [static] | StandardMaterial | ||
NORMALTEXTURE : int = 2 [static] | StandardMaterial | ||
REFLECTTEXTURE : int = 6 [static] | StandardMaterial | ||
RENDERMODE_ADDTIVE : int = 15 [static] 渲染状态_加色法混合。 | StandardMaterial | ||
RENDERMODE_ADDTIVEDOUBLEFACE : int = 16 [static] 渲染状态_加色法混合_双面。 | StandardMaterial | ||
RENDERMODE_CUTOUT : int = 3 [static] 渲染状态_透明测试。 | StandardMaterial | ||
RENDERMODE_CUTOUTDOUBLEFACE : int = 4 [static] 渲染状态_透明测试_双面。 | StandardMaterial | ||
RENDERMODE_DEPTHREAD_ADDTIVE : int = 7 [static] 渲染状态_只读深度_加色法混合。 | StandardMaterial | ||
RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE : int = 8 [static] 渲染状态_只读深度_加色法混合_双面。 | StandardMaterial | ||
RENDERMODE_DEPTHREAD_TRANSPARENT : int = 5 [static] 渲染状态_只读深度_透明混合。 | StandardMaterial | ||
RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE : int = 6 [static] 渲染状态_只读深度_透明混合_双面。 | StandardMaterial | ||
RENDERMODE_NONDEPTH_ADDTIVE : int = 11 [static] 渲染状态_无深度_加色法混合。 | StandardMaterial | ||
RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE : int = 12 [static] 渲染状态_无深度_加色法混合_双面。 | StandardMaterial | ||
RENDERMODE_NONDEPTH_TRANSPARENT : int = 9 [static] 渲染状态_无深度_透明混合。 | StandardMaterial | ||
RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE : int = 10 [static] 渲染状态_无深度_透明混合_双面。 | StandardMaterial | ||
RENDERMODE_OPAQUE : int = 1 [static] 渲染状态_不透明。 | StandardMaterial | ||
RENDERMODE_OPAQUEDOUBLEFACE : int = 2 [static] 渲染状态_不透明_双面。 | StandardMaterial | ||
RENDERMODE_TRANSPARENT : int = 13 [static] 渲染状态_透明混合。 | StandardMaterial | ||
RENDERMODE_TRANSPARENTDOUBLEFACE : int = 14 [static] 渲染状态_透明混合_双面。 | StandardMaterial | ||
SPECULARTEXTURE : int = 3 [static] | StandardMaterial | ||
TILINGOFFSET : int = 15 [static] | StandardMaterial | ||
UVAGE : int = 14 [static] | StandardMaterial | ||
UVANIAGE : int = 8 [static] | StandardMaterial | ||
UVMATRIX : int = 13 [static] | StandardMaterial |
albedo | property |
albedo:Vector4
设置反射率。
public function get albedo():Vector4
public function set albedo(value:Vector4):void
ambientColor | property |
ambientColor:Vector3
设置环境光颜色。
public function get ambientColor():Vector3
public function set ambientColor(value:Vector3):void
ambientTexture | property |
ambientTexture:BaseTexture
获取环境贴图。
public function get ambientTexture():BaseTexture
public function set ambientTexture(value:BaseTexture):void
diffuseColor | property |
diffuseColor:Vector3
设置漫反射光颜色。
public function get diffuseColor():Vector3
public function set diffuseColor(value:Vector3):void
diffuseTexture | property |
diffuseTexture:BaseTexture
获取漫反射贴图。
public function get diffuseTexture():BaseTexture
public function set diffuseTexture(value:BaseTexture):void
emissiveTexture | property |
emissiveTexture:BaseTexture
获取放射贴图。
public function get emissiveTexture():BaseTexture
public function set emissiveTexture(value:BaseTexture):void
normalTexture | property |
normalTexture:BaseTexture
获取法线贴图。
public function get normalTexture():BaseTexture
public function set normalTexture(value:BaseTexture):void
reflectColor | property |
reflectColor:Vector3
设置反射颜色。
public function get reflectColor():Vector3
public function set reflectColor(value:Vector3):void
reflectTexture | property |
reflectTexture:BaseTexture
获取反射贴图。
public function get reflectTexture():BaseTexture
public function set reflectTexture(value:BaseTexture):void
renderMode | property |
renderMode:int
[write-only] 设置渲染模式。
public function set renderMode(value:int):void
SHADERDEFINE_AMBIENTMAP | property |
public static var SHADERDEFINE_AMBIENTMAP:int
SHADERDEFINE_DIFFUSEMAP | property |
public static var SHADERDEFINE_DIFFUSEMAP:int
SHADERDEFINE_EMISSIVEMAP | property |
public static var SHADERDEFINE_EMISSIVEMAP:int
SHADERDEFINE_NORMALMAP | property |
public static var SHADERDEFINE_NORMALMAP:int
SHADERDEFINE_REFLECTMAP | property |
public static var SHADERDEFINE_REFLECTMAP:int
SHADERDEFINE_SPECULARMAP | property |
public static var SHADERDEFINE_SPECULARMAP:int
SHADERDEFINE_TILINGOFFSET | property |
public static var SHADERDEFINE_TILINGOFFSET:int
SHADERDEFINE_UVTRANSFORM | property |
public static var SHADERDEFINE_UVTRANSFORM:int
specularColor | property |
specularColor:Vector4
设置高光颜色。
public function get specularColor():Vector4
public function set specularColor(value:Vector4):void
specularTexture | property |
specularTexture:BaseTexture
获取高光贴图。
public function get specularTexture():BaseTexture
public function set specularTexture(value:BaseTexture):void
tilingOffset | property |
tilingOffset:Vector4
获取纹理平铺和偏移。
public function get tilingOffset():Vector4
public function set tilingOffset(value:Vector4):void
transformUV | property |
transformUV:TransformUV
获取UV变换。
public function get transformUV():TransformUV
public function set transformUV(value:TransformUV):void
StandardMaterial | () | Constructor |
public function StandardMaterial()
cloneTo | () | method |
override public function cloneTo(destObject:*):void
克隆。
Parameters
destObject:* — 克隆源。
|
disableFog | () | method |
public function disableFog():void
禁用雾化。
disableLight | () | method |
public function disableLight():void
禁用灯光。
load | () | method |
public static function load(url:String):StandardMaterial
加载标准材质。
Parameters
url:String — 标准材质地址。
|
StandardMaterial |
onAsynLoaded | () | method |
override public function onAsynLoaded(url:String, data:*, params:Array):void
private
Parameters
url:String | |
data:* | |
params:Array |
ALBEDO | Constant |
public static const ALBEDO:int = 7
AMBIENTTEXTURE | Constant |
public static const AMBIENTTEXTURE:int = 5
defaultMaterial | Constant |
public static const defaultMaterial:StandardMaterial
默认材质,禁止修改
DIFFUSETEXTURE | Constant |
public static const DIFFUSETEXTURE:int = 1
EMISSIVETEXTURE | Constant |
public static const EMISSIVETEXTURE:int = 4
MATERIALAMBIENT | Constant |
public static const MATERIALAMBIENT:int = 9
MATERIALDIFFUSE | Constant |
public static const MATERIALDIFFUSE:int = 10
MATERIALREFLECT | Constant |
public static const MATERIALREFLECT:int = 12
MATERIALSPECULAR | Constant |
public static const MATERIALSPECULAR:int = 11
NORMALTEXTURE | Constant |
public static const NORMALTEXTURE:int = 2
REFLECTTEXTURE | Constant |
public static const REFLECTTEXTURE:int = 6
RENDERMODE_ADDTIVE | Constant |
public static const RENDERMODE_ADDTIVE:int = 15
渲染状态_加色法混合。
RENDERMODE_ADDTIVEDOUBLEFACE | Constant |
public static const RENDERMODE_ADDTIVEDOUBLEFACE:int = 16
渲染状态_加色法混合_双面。
RENDERMODE_CUTOUT | Constant |
public static const RENDERMODE_CUTOUT:int = 3
渲染状态_透明测试。
RENDERMODE_CUTOUTDOUBLEFACE | Constant |
public static const RENDERMODE_CUTOUTDOUBLEFACE:int = 4
渲染状态_透明测试_双面。
RENDERMODE_DEPTHREAD_ADDTIVE | Constant |
public static const RENDERMODE_DEPTHREAD_ADDTIVE:int = 7
渲染状态_只读深度_加色法混合。
RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE | Constant |
public static const RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE:int = 8
渲染状态_只读深度_加色法混合_双面。
RENDERMODE_DEPTHREAD_TRANSPARENT | Constant |
public static const RENDERMODE_DEPTHREAD_TRANSPARENT:int = 5
渲染状态_只读深度_透明混合。
RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE | Constant |
public static const RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE:int = 6
渲染状态_只读深度_透明混合_双面。
RENDERMODE_NONDEPTH_ADDTIVE | Constant |
public static const RENDERMODE_NONDEPTH_ADDTIVE:int = 11
渲染状态_无深度_加色法混合。
RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE | Constant |
public static const RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE:int = 12
渲染状态_无深度_加色法混合_双面。
RENDERMODE_NONDEPTH_TRANSPARENT | Constant |
public static const RENDERMODE_NONDEPTH_TRANSPARENT:int = 9
渲染状态_无深度_透明混合。
RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE | Constant |
public static const RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE:int = 10
渲染状态_无深度_透明混合_双面。
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
渲染状态_透明混合。
RENDERMODE_TRANSPARENTDOUBLEFACE | Constant |
public static const RENDERMODE_TRANSPARENTDOUBLEFACE:int = 14
渲染状态_透明混合_双面。
SPECULARTEXTURE | Constant |
public static const SPECULARTEXTURE:int = 3
TILINGOFFSET | Constant |
public static const TILINGOFFSET:int = 15
UVAGE | Constant |
public static const UVAGE:int = 14
UVANIAGE | Constant |
public static const UVANIAGE:int = 8
UVMATRIX | Constant |
public static const UVMATRIX:int = 13