Appearance
RoyInterface / Exports / resource/material/materialfixed/RoyMaterialStandard / RoyMaterialStandard
Class: RoyMaterialStandard
resource/material/materialfixed/RoyMaterialStandard.RoyMaterialStandard
Hierarchy
↳
RoyMaterialStandard
Table of contents
Constructors
Properties
- sMatDefPBR
- m_impl
- m_name
- m_templateName
- sMatHandleID
- m_handleID
- m_materialType
- m_relObjectMap
- m_blendMode
- m_cullFaceMode
- m_depthWriteEnabled
- m_depthTestEnabled
- m_a3dRenderPriority
- m_doubleSided
- m_colorWrite
- m_clipFillEnabled
- m_stencilState
- m_polygonOffset
- m_instanceEnabled
- m_batchCount
- m_lightEnabled
- m_forceDRMode
- m_uniformMap
- m_textureMap
- m_clippingPlaneInfo
- m_clippingPlanes
- m_clipIntersection
- m_matExecutionDirtyFrameId
- m_executionList
- m_transDataInfo
- m_canTransfer
- m_enabledDirtyNotify
- CLASS_NAME
- sTypeClass
- m_linearColor
Accessors
- impl
- name
- templateName
- handleID
- materialType
- relObjectMap
- matDirtyFrameId
- blendMode
- shadingMode
- cullFaceMode
- depthWriteEnabled
- depthTestEnabled
- a3dRenderPriority
- doubleSided
- colorWrite
- clipFillEnabled
- stencilState
- polygonOffset
- instanceEnabled
- batchCount
- lightEnabled
- forceDRMode
- uniformMap
- textureMap
- clippingPlaneNum
- clippingPlanes
- clipIntersection
- matExecutionDirtyFrameId
- executionList
- transDataInfo
- canTransfer
- linearColor
Methods
- setExtension
- getExtension
- deleteExtension
- isInUse
- getDefaultRoyStencilState
- declareUniform
- declareTexture
- setUniform
- getUniform
- hasUniform
- setTexture
- getTexture
- getTextureList
- setSampler
- getSampler
- setTextureVisible
- getTextureVisible
- setClippingPlanes
- addExecution
- removeExecution
- setUserData
- getUserData
- deleteUserData
- markTransDataDirty
- markCanTransfer
- addRelObject
- addRefMatImpl
- removeRelObject
- removeRefMatImpl
- canInstance
- canInstanceMaterialState
- canInstanceTex
- markContentDirtyFromMtl
- removeRelObjectFromMap
- collectTransData
- serializeTransData
- deserializeTransData
- registerImplClass
- createInstance
- destroyInstance
- setRGB
- setAlpha
- setCoordArray
- setSpecParam
- setAlphaThreshold
- setPBRMtlInfo
- setToLinearColor
- setDepthTexture
- canInstanceUniform
- canBatchExtent
- clone
- clonePropertiesFrom
Constructors
constructor
• new RoyMaterialStandard(batchCount?
, transDataInfo?
): RoyMaterialStandard
Parameters
Name | Type | Default value |
---|---|---|
batchCount | number | 0 |
transDataInfo? | RoyTransDataInfo | undefined |
Returns
Overrides
Properties
sMatDefPBR
▪ Static
sMatDefPBR: MatDefPBR
Inherited from
m_impl
• Protected
m_impl: RoyMaterialBaseImpl
[]
Inherited from
m_name
• Protected
m_name: string
Inherited from
m_templateName
• Protected
m_templateName: string
Inherited from
RoyMaterialBase.m_templateName
sMatHandleID
▪ Static
sMatHandleID: number
= 0
Inherited from
m_handleID
• Protected
m_handleID: number
= 0
Inherited from
m_materialType
• Protected
m_materialType: RoyMaterialType
= RoyMaterialType.CommonType
Inherited from
RoyMaterialBase.m_materialType
m_relObjectMap
• Protected
m_relObjectMap: Map
<number
, RoyObject3D
>
Inherited from
RoyMaterialBase.m_relObjectMap
m_blendMode
• Protected
m_blendMode: RoyBlendMode
= RoyBlendMode.NORMAL
Inherited from
m_cullFaceMode
• Protected
m_cullFaceMode: CullingMode
= CullingMode.BACK
Inherited from
RoyMaterialBase.m_cullFaceMode
m_depthWriteEnabled
• Protected
m_depthWriteEnabled: boolean
= true
Inherited from
RoyMaterialBase.m_depthWriteEnabled
m_depthTestEnabled
• Protected
m_depthTestEnabled: boolean
= true
Inherited from
RoyMaterialBase.m_depthTestEnabled
m_a3dRenderPriority
• Protected
m_a3dRenderPriority: number
= -1
Inherited from
RoyMaterialBase.m_a3dRenderPriority
m_doubleSided
• Protected
m_doubleSided: boolean
= false
Inherited from
m_colorWrite
• Protected
m_colorWrite: boolean
= true
Inherited from
m_clipFillEnabled
• Protected
m_clipFillEnabled: boolean
= false
Inherited from
RoyMaterialBase.m_clipFillEnabled
m_stencilState
• Protected
m_stencilState: RoyStencilState
Inherited from
RoyMaterialBase.m_stencilState
m_polygonOffset
• Protected
m_polygonOffset: number
[]
Inherited from
RoyMaterialBase.m_polygonOffset
m_instanceEnabled
• Protected
m_instanceEnabled: boolean
= true
Inherited from
RoyMaterialBase.m_instanceEnabled
m_batchCount
• Protected
m_batchCount: number
= 0
Inherited from
m_lightEnabled
• Protected
m_lightEnabled: boolean
= true
Inherited from
RoyMaterialBase.m_lightEnabled
m_forceDRMode
• Protected
m_forceDRMode: MatDRMode
= MatDRMode.DR_DEFAULT
Inherited from
m_uniformMap
• Protected
m_uniformMap: Map
<string
, RoyMatUniformInfo
>
Inherited from
m_textureMap
• Protected
m_textureMap: Map
<string
, RoyMatTexInfo
>
Inherited from
m_clippingPlaneInfo
• Protected
m_clippingPlaneInfo: Plane
[]
Inherited from
RoyMaterialBase.m_clippingPlaneInfo
m_clippingPlanes
• Protected
m_clippingPlanes: Float32Array
Inherited from
RoyMaterialBase.m_clippingPlanes
m_clipIntersection
• Protected
m_clipIntersection: boolean
= false
Inherited from
RoyMaterialBase.m_clipIntersection
m_matExecutionDirtyFrameId
• Protected
m_matExecutionDirtyFrameId: number
= 0
Inherited from
RoyMaterialBase.m_matExecutionDirtyFrameId
m_executionList
• Protected
m_executionList: number
[] = []
Inherited from
RoyMaterialBase.m_executionList
m_transDataInfo
• Protected
m_transDataInfo: RoyTransDataInfo
Inherited from
RoyMaterialBase.m_transDataInfo
m_canTransfer
• Protected
m_canTransfer: boolean
= true
Inherited from
m_enabledDirtyNotify
• Protected
m_enabledDirtyNotify: boolean
= true
Inherited from
RoyMaterialBase.m_enabledDirtyNotify
CLASS_NAME
▪ Static
Readonly
CLASS_NAME: "RoyMaterialStandard"
Overrides
sTypeClass
▪ Static
Protected
sTypeClass: Object
= {}
Index signature
▪ [key: number
]: RoyMaterialBaseImplClass
m_linearColor
• Private
m_linearColor: boolean
= false
Accessors
impl
• get
impl(): RoyMaterialBaseImpl
[]
Returns
Inherited from
RoyMaterialBase.impl
name
• get
name(): string
Returns
string
Inherited from
RoyMaterialBase.name
• set
name(value
): void
Parameters
Name | Type |
---|---|
value | string |
Returns
void
Inherited from
RoyMaterialBase.name
templateName
• get
templateName(): string
Returns
string
Inherited from
RoyMaterialBase.templateName
handleID
• get
handleID(): number
Returns
number
Inherited from
RoyMaterialBase.handleID
materialType
• get
materialType(): RoyMaterialType
Returns
Inherited from
RoyMaterialBase.materialType
relObjectMap
• get
relObjectMap(): Map
<number
, RoyObject3D
>
Returns
Map
<number
, RoyObject3D
>
Inherited from
RoyMaterialBase.relObjectMap
matDirtyFrameId
• get
matDirtyFrameId(): number
Returns
number
Inherited from
RoyMaterialBase.matDirtyFrameId
blendMode
• get
blendMode(): RoyBlendMode
Returns
Inherited from
RoyMaterialBase.blendMode
• set
blendMode(value
): void
Parameters
Name | Type |
---|---|
value | RoyBlendMode |
Returns
void
Inherited from
RoyMaterialBase.blendMode
shadingMode
• get
shadingMode(): RoyShadingMode
Returns
Inherited from
RoyMaterialBase.shadingMode
• set
shadingMode(value
): void
Parameters
Name | Type |
---|---|
value | RoyShadingMode |
Returns
void
Inherited from
RoyMaterialBase.shadingMode
cullFaceMode
• get
cullFaceMode(): CullingMode
Returns
CullingMode
Inherited from
RoyMaterialBase.cullFaceMode
• set
cullFaceMode(value
): void
Parameters
Name | Type |
---|---|
value | CullingMode |
Returns
void
Inherited from
RoyMaterialBase.cullFaceMode
depthWriteEnabled
• get
depthWriteEnabled(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.depthWriteEnabled
• set
depthWriteEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.depthWriteEnabled
depthTestEnabled
• get
depthTestEnabled(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.depthTestEnabled
• set
depthTestEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.depthTestEnabled
a3dRenderPriority
• set
a3dRenderPriority(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
RoyMaterialBase.a3dRenderPriority
doubleSided
• get
doubleSided(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.doubleSided
• set
doubleSided(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.doubleSided
colorWrite
• get
colorWrite(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.colorWrite
• set
colorWrite(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.colorWrite
clipFillEnabled
• get
clipFillEnabled(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.clipFillEnabled
• set
clipFillEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.clipFillEnabled
stencilState
• get
stencilState(): RoyStencilState
Returns
Inherited from
RoyMaterialBase.stencilState
• set
stencilState(value
): void
Parameters
Name | Type |
---|---|
value | RoyStencilState |
Returns
void
Inherited from
RoyMaterialBase.stencilState
polygonOffset
• get
polygonOffset(): number
[]
Returns
number
[]
Inherited from
RoyMaterialBase.polygonOffset
• set
polygonOffset(value
): void
Parameters
Name | Type |
---|---|
value | number [] |
Returns
void
Inherited from
RoyMaterialBase.polygonOffset
instanceEnabled
• get
instanceEnabled(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.instanceEnabled
• set
instanceEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.instanceEnabled
batchCount
• get
batchCount(): number
Returns
number
Inherited from
RoyMaterialBase.batchCount
lightEnabled
• get
lightEnabled(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.lightEnabled
• set
lightEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.lightEnabled
forceDRMode
• get
forceDRMode(): MatDRMode
Returns
MatDRMode
Inherited from
RoyMaterialBase.forceDRMode
• set
forceDRMode(value
): void
Parameters
Name | Type |
---|---|
value | MatDRMode |
Returns
void
Inherited from
RoyMaterialBase.forceDRMode
uniformMap
• get
uniformMap(): Map
<string
, RoyMatUniformInfo
>
Returns
Map
<string
, RoyMatUniformInfo
>
Inherited from
RoyMaterialBase.uniformMap
textureMap
• get
textureMap(): Map
<string
, RoyMatTexInfo
>
Returns
Map
<string
, RoyMatTexInfo
>
Inherited from
RoyMaterialBase.textureMap
clippingPlaneNum
• get
clippingPlaneNum(): number
Returns
number
Inherited from
RoyMaterialBase.clippingPlaneNum
clippingPlanes
• get
clippingPlanes(): Float32Array
Returns
Float32Array
Inherited from
RoyMaterialBase.clippingPlanes
clipIntersection
• get
clipIntersection(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.clipIntersection
matExecutionDirtyFrameId
• get
matExecutionDirtyFrameId(): number
Returns
number
Inherited from
RoyMaterialBase.matExecutionDirtyFrameId
executionList
• get
executionList(): number
[]
Returns
number
[]
Inherited from
RoyMaterialBase.executionList
• set
executionList(value
): void
Parameters
Name | Type |
---|---|
value | number [] |
Returns
void
Inherited from
RoyMaterialBase.executionList
transDataInfo
• get
transDataInfo(): RoyTransDataInfo
Returns
RoyTransDataInfo
Inherited from
RoyMaterialBase.transDataInfo
canTransfer
• get
canTransfer(): boolean
Returns
boolean
Inherited from
RoyMaterialBase.canTransfer
• set
canTransfer(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.canTransfer
linearColor
• get
linearColor(): boolean
Returns
boolean
Methods
setExtension
▸ setExtension(key
, value
): void
Parameters
Name | Type |
---|---|
key | string |
value | unknown |
Returns
void
Inherited from
getExtension
▸ getExtension(key
): unknown
Parameters
Name | Type |
---|---|
key | string |
Returns
unknown
Inherited from
deleteExtension
▸ deleteExtension(key
): void
Parameters
Name | Type |
---|---|
key | string |
Returns
void
Inherited from
RoyMaterialBase.deleteExtension
isInUse
▸ isInUse(): boolean
Returns
boolean
Inherited from
getDefaultRoyStencilState
▸ getDefaultRoyStencilState(): RoyStencilState
Returns
Inherited from
RoyMaterialBase.getDefaultRoyStencilState
declareUniform
▸ declareUniform(name
, type
, defaultVal
, editorInfo?
, size?
, filter?
): void
Parameters
Name | Type |
---|---|
name | string |
type | RoyMatUniformType |
defaultVal | UniformType |
editorInfo | RoyMatEditorInfo |
size? | number |
filter? | number |
Returns
void
Inherited from
RoyMaterialBase.declareUniform
declareTexture
▸ declareTexture(name
, type
, reqTexArray
, reqUv1
, reqIndex
, editorInfo?
, filter?
): void
Parameters
Name | Type |
---|---|
name | string |
type | Texture$Sampler |
reqTexArray | boolean |
reqUv1 | boolean |
reqIndex | boolean |
editorInfo | RoyMatEditorInfo |
filter? | number |
Returns
void
Inherited from
RoyMaterialBase.declareTexture
setUniform
▸ setUniform(name
, value
): void
Parameters
Name | Type |
---|---|
name | string |
value | UniformType |
Returns
void
Inherited from
getUniform
▸ getUniform(name
): UniformType
Parameters
Name | Type |
---|---|
name | string |
Returns
Inherited from
hasUniform
▸ hasUniform(name
): boolean
Parameters
Name | Type |
---|---|
name | string |
Returns
boolean
Inherited from
setTexture
▸ setTexture(name
, texture
, sampler
): void
Parameters
Name | Type |
---|---|
name | string |
texture | RoyTexture |
sampler | RoySamplerInfo |
Returns
void
Inherited from
getTexture
▸ getTexture(name
): RoyTexture
Parameters
Name | Type |
---|---|
name | string |
Returns
Inherited from
getTextureList
▸ getTextureList(): RoyTexture
[]
Returns
Inherited from
RoyMaterialBase.getTextureList
setSampler
▸ setSampler(name
, sampler
): void
Parameters
Name | Type |
---|---|
name | string |
sampler | RoySamplerInfo |
Returns
void
Inherited from
getSampler
▸ getSampler(name
): RoySamplerInfo
Parameters
Name | Type |
---|---|
name | string |
Returns
Inherited from
setTextureVisible
▸ setTextureVisible(name
, value
): void
Parameters
Name | Type |
---|---|
name | string |
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.setTextureVisible
getTextureVisible
▸ getTextureVisible(name
): boolean
Parameters
Name | Type |
---|---|
name | string |
Returns
boolean
Inherited from
RoyMaterialBase.getTextureVisible
setClippingPlanes
▸ setClippingPlanes(value
, intersection
): void
Parameters
Name | Type |
---|---|
value | Plane [] |
intersection | boolean |
Returns
void
Inherited from
RoyMaterialBase.setClippingPlanes
addExecution
▸ addExecution(handleID
): void
Parameters
Name | Type |
---|---|
handleID | number |
Returns
void
Inherited from
removeExecution
▸ removeExecution(handleID
): void
Parameters
Name | Type |
---|---|
handleID | number |
Returns
void
Inherited from
RoyMaterialBase.removeExecution
setUserData
▸ setUserData(key
, value
): void
Parameters
Name | Type |
---|---|
key | string |
value | unknown |
Returns
void
Inherited from
getUserData
▸ getUserData(key
): unknown
Parameters
Name | Type |
---|---|
key | string |
Returns
unknown
Inherited from
deleteUserData
▸ deleteUserData(key
): void
Parameters
Name | Type |
---|---|
key | string |
Returns
void
Inherited from
RoyMaterialBase.deleteUserData
markTransDataDirty
▸ markTransDataDirty(): void
Returns
void
Inherited from
RoyMaterialBase.markTransDataDirty
markCanTransfer
▸ markCanTransfer(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RoyMaterialBase.markCanTransfer
addRelObject
▸ addRelObject(object
): void
Parameters
Name | Type |
---|---|
object | RoyObject3D |
Returns
void
Inherited from
addRefMatImpl
▸ addRefMatImpl(): void
Returns
void
Inherited from
removeRelObject
▸ removeRelObject(object
): void
Parameters
Name | Type |
---|---|
object | RoyObject3D |
Returns
void
Inherited from
RoyMaterialBase.removeRelObject
removeRefMatImpl
▸ removeRefMatImpl(): void
Returns
void
Inherited from
RoyMaterialBase.removeRefMatImpl
canInstance
▸ canInstance(other
, ignoreUVMatrix
, ignoreTex?
): boolean
Parameters
Name | Type | Default value |
---|---|---|
other | RoyMaterialBase | undefined |
ignoreUVMatrix | boolean | undefined |
ignoreTex | boolean | false |
Returns
boolean
Inherited from
canInstanceMaterialState
▸ canInstanceMaterialState(other
): boolean
Parameters
Name | Type |
---|---|
other | RoyMaterialBase |
Returns
boolean
Inherited from
RoyMaterialBase.canInstanceMaterialState
canInstanceTex
▸ canInstanceTex(other
, ignoreTex?
): boolean
Parameters
Name | Type | Default value |
---|---|---|
other | RoyMaterialBase | undefined |
ignoreTex | boolean | false |
Returns
boolean
Inherited from
RoyMaterialBase.canInstanceTex
markContentDirtyFromMtl
▸ markContentDirtyFromMtl(matDirtyType?
): void
Parameters
Name | Type | Default value |
---|---|---|
matDirtyType | RoyMaterialDirtyType | RoyMaterialDirtyType.MDT_COMMON |
Returns
void
Inherited from
RoyMaterialBase.markContentDirtyFromMtl
removeRelObjectFromMap
▸ removeRelObjectFromMap(dataTransfer
): void
Parameters
Name | Type |
---|---|
dataTransfer | RoyDataTransferRecv |
Returns
void
Inherited from
RoyMaterialBase.removeRelObjectFromMap
collectTransData
▸ collectTransData(dataTransfer
): void
Parameters
Name | Type |
---|---|
dataTransfer | RoyDataTransferSend |
Returns
void
Inherited from
RoyMaterialBase.collectTransData
serializeTransData
▸ serializeTransData(dataTransfer
): RoyMaterialData
Parameters
Name | Type |
---|---|
dataTransfer | RoyDataTransferSend |
Returns
RoyMaterialData
Inherited from
RoyMaterialBase.serializeTransData
deserializeTransData
▸ deserializeTransData(dataTransfer
, matData
): void
Parameters
Name | Type |
---|---|
dataTransfer | RoyDataTransferRecv |
matData | RoyMaterialData |
Returns
void
Inherited from
RoyMaterialBase.deserializeTransData
registerImplClass
▸ registerImplClass(type
, classIns
): void
Parameters
Name | Type |
---|---|
type | RendererType |
classIns | RoyMaterialBaseImplClass |
Returns
void
createInstance
▸ createInstance(batchCount?
): RoyMaterialStandard
Parameters
Name | Type | Default value |
---|---|---|
batchCount | number | 0 |
Returns
destroyInstance
▸ destroyInstance(royMat
): boolean
Parameters
Name | Type |
---|---|
royMat | RoyMaterialStandard |
Returns
boolean
setRGB
▸ setRGB(pr
, pg
, pb
): void
Parameters
Name | Type |
---|---|
pr | number |
pg | number |
pb | number |
Returns
void
setAlpha
▸ setAlpha(a
): void
Parameters
Name | Type |
---|---|
a | number |
Returns
void
setCoordArray
▸ setCoordArray(uv0Scale
, uv1Scale
, uvOffset
): void
Parameters
Name | Type |
---|---|
uv0Scale | Float32Array |
uv1Scale | Float32Array |
uvOffset | Float32Array |
Returns
void
setSpecParam
▸ setSpecParam(glossiness
, specularIntensity
): void
Parameters
Name | Type |
---|---|
glossiness | number |
specularIntensity | number |
Returns
void
setAlphaThreshold
▸ setAlphaThreshold(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
setPBRMtlInfo
▸ setPBRMtlInfo(mtlInfo
): void
Parameters
Name | Type |
---|---|
mtlInfo | MatDefPBR |
Returns
void
setToLinearColor
▸ setToLinearColor(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
setDepthTexture
▸ setDepthTexture(depthTexSkybox
, depthSampleMode
): void
Parameters
Name | Type |
---|---|
depthTexSkybox | RoyTexture |
depthSampleMode | number |
Returns
void
canInstanceUniform
▸ canInstanceUniform(other
, ignoreUVMatrix
): boolean
Parameters
Name | Type |
---|---|
other | RoyMaterialBase |
ignoreUVMatrix | boolean |
Returns
boolean
Overrides
RoyMaterialBase.canInstanceUniform
canBatchExtent
▸ canBatchExtent(): boolean
Returns
boolean
Overrides
RoyMaterialBase.canBatchExtent
clone
▸ clone(batchCount
): RoyMaterialBase
Parameters
Name | Type |
---|---|
batchCount | number |
Returns
Overrides
clonePropertiesFrom
▸ clonePropertiesFrom(royMaterial
): void
Parameters
Name | Type |
---|---|
royMaterial | RoyMaterialBase |
Returns
void