MeshPhongMaterial
Core.MeshPhongMaterial exported from @manycore/aholo-viewer.
Hierarchy
- MeshPhongMaterial<SourceTexture>
- MeshPhongMaterial
Properties
is Dynamic Shape
Inherited from BaseMeshPhongMaterial.isDynamicShape
is Volume Rendering
Mark this material uses volume like rendering technology. Hint the engine that some effect is disabled
Inherited from BaseMeshPhongMaterial.isVolumeRendering
Static ReadonlyMAX_ TEXTURES
max texture count, just in case some platform will take use of some channels by default, so set to 6 instead of 8
Inherited from BaseMeshPhongMaterial.MAX_TEXTURES
name
Optional name of the object (doesn't need to be unique). Default is an empty string.
Inherited from BaseMeshPhongMaterial.name
id
Unique number for this material instance.
Inherited from BaseMeshPhongMaterial.id
transparentfalse
If use transparent effect, this value must be set to true to enable blending.
Inherited from BaseMeshPhongMaterial.transparent
visibletrue
Defines whether this material is visible.
Inherited from BaseMeshPhongMaterial.visible
program Id
The id of shader program which this material shader belongs to.
Inherited from BaseMeshPhongMaterial.programId
side
Set which side of the object will be seen on screen.
Inherited from BaseMeshPhongMaterial.side
blendingNormalBlending
Which blending to use when displaying objects with this material. This must be set to CustomBlending to use custom blendSrc , blendDst or blendEquation . See the blending mode constants for all possible values. Default is NormalBlending.
Inherited from BaseMeshPhongMaterial.blending
blend SrcSrcAlphaFactor
Blending source. Default is SrcAlphaFactor. See the source factors constants for all possible values.
Inherited from BaseMeshPhongMaterial.blendSrc
blend DstOneMinusSrcAlpha
Blending destination. Default is OneMinusSrcAlphaFactor. See the destination factors constants for all possible values.
Inherited from BaseMeshPhongMaterial.blendDst
blend EquationAdd
Blending equation to use when applying blending. Default is AddEquation. See the blending equation constants for all possible values.
Inherited from BaseMeshPhongMaterial.blendEquation
blend Src Alpha
The transparency of the blendSrc .
Inherited from BaseMeshPhongMaterial.blendSrcAlpha
blend Dst Alpha
The transparency of the blendDst .
Inherited from BaseMeshPhongMaterial.blendDstAlpha
blend Equation Alpha
The transparency of the blendEquation .
Inherited from BaseMeshPhongMaterial.blendEquationAlpha
stencil Writefalse
Whether rendering this material has any effect on the stencil buffer.
Inherited from BaseMeshPhongMaterial.stencilWrite
stencil Write Mask0xFF
The bit mask to use when writing to the stencil buffer.
Inherited from BaseMeshPhongMaterial.stencilWriteMask
stencil Func Mask0xFF
The bit mask to use when comparing against the stencil buffer.
Inherited from BaseMeshPhongMaterial.stencilFuncMask
stencil FuncAlwaysStencilFunc
The stencil comparison function to use.
Inherited from BaseMeshPhongMaterial.stencilFunc
stencil Ref0
The value to use when performing stencil comparisons or stencil operations.
Inherited from BaseMeshPhongMaterial.stencilRef
stencil FailKeepStencilOp
Which stencil operation to perform when the comparison function returns false.
Inherited from BaseMeshPhongMaterial.stencilFail
stencil Z FailKeepStencilOp
Which stencil operation to perform when the comparison function returns true but the depth test fails.
Inherited from BaseMeshPhongMaterial.stencilZFail
stencil Z PassKeepStencilOp
Which stencil operation to perform when the comparison function returns true and the depth test passes.
Inherited from BaseMeshPhongMaterial.stencilZPass
depth FuncLessEqualDepth
Which depth function to use.
Inherited from BaseMeshPhongMaterial.depthFunc
depth Testtrue
Whether to have depth test enabled when rendering this material. If this is set to false, this object's occluding relationship will depend on Object3D.renderOrder| renderOrder.
Inherited from BaseMeshPhongMaterial.depthTest
depth Writetrue
Whether rendering this material has any effect on the depth buffer.
Inherited from BaseMeshPhongMaterial.depthWrite
color Writetrue
Whether to render the material's color. This can be used in conjunction with a Object3D.renderOrder| renderOrder property to create invisible objects that occlude other objects.
Inherited from BaseMeshPhongMaterial.colorWrite
color Write Masks
Inherited from BaseMeshPhongMaterial.colorWriteMasks
polygon Offsetfalse
Whether to use polygon offset.
Inherited from BaseMeshPhongMaterial.polygonOffset
polygon Offset Factor0
Sets the polygon offset factor.
Inherited from BaseMeshPhongMaterial.polygonOffsetFactor
polygon Offset Units0
Sets the polygon offset units.
Inherited from BaseMeshPhongMaterial.polygonOffsetUnits
premultiplied Alphafalse
Whether to premultiply the alpha (transparency) value.
Inherited from BaseMeshPhongMaterial.premultipliedAlpha
on Before Render
An optionally overriding method for extents to get data from renderer before update uniforms.
- (renderer: Renderer): void
Parameters
- renderer: Renderer
instance of renderer for engine.
Returns void
- renderer: Renderer
Inherited from BaseMeshPhongMaterial.onBeforeRender
color Write Mask
Inherited from BaseMeshPhongMaterial.colorWriteMask
enable Scene Clipping
Inherited from BaseMeshPhongMaterial.enableSceneClipping
pop
Inherited from BaseMeshPhongMaterial.pop
is Lightable Material
Inherited from BaseMeshPhongMaterial.isLightableMaterial
flat Shading Normal
Inherited from BaseMeshPhongMaterial.flatShadingNormal
Readonlyis Support Deferred
Inherited from BaseMeshPhongMaterial.isSupportDeferred
is Mesh Phong Material
Check the type whether it belongs to MeshPhongMaterial. This value should not be changed by user.
Inherited from BaseMeshPhongMaterial.isMeshPhongMaterial
texture
Use texture cover object, if it is given.
Inherited from BaseMeshPhongMaterial.texture
opacity Tex
Apply opacity texture to change the transparency on object's some part. The opacity is decided by the value of texture's red channel.
Inherited from BaseMeshPhongMaterial.opacityTex
_ uv Transform
Pick<
ReadonlyMarked,
| "_readonly_mark"
| "cloneReadonly"
| "clone"
| "equals"
| "getSerializeData"
| "getNumberCount"
| "toArray"
| "elements"
| "applyToBufferAttribute"
| "determinant"
| "transposeIntoArray"
| "applyToArray"
| "applyInverse"
| "decompose",
>,
>
Change the uv data by this matrix.
Inherited from BaseMeshPhongMaterial._uvTransform
Readonlyuser Data
Inherited from BaseMeshPhongMaterial.userData
_ uuid
Inherited from BaseMeshPhongMaterial._uuid
uuid
Inherited from BaseMeshPhongMaterial.uuid
_ listeners
Inherited from BaseMeshPhongMaterial._listeners
Accessors
color
Returns ReadonlyColor
Inherited from BaseMeshPhongMaterial.color
specular
Returns ReadonlyColor
Inherited from BaseMeshPhongMaterial.specular
opacity
- get opacity(): number
Returns number
Inherited from BaseMeshPhongMaterial.opacity
- set opacity(v: number): void
Parameters
- v: number
Returns void
Inherited from BaseMeshPhongMaterial.opacity
shininess
- get shininess(): number
Returns number
Inherited from BaseMeshPhongMaterial.shininess
- set shininess(v: number): void
Parameters
- v: number
Returns void
Inherited from BaseMeshPhongMaterial.shininess
specular Strength
- get specularStrength(): number
Returns number
Inherited from BaseMeshPhongMaterial.specularStrength
- set specularStrength(v: number): void
Parameters
- v: number
Returns void
Inherited from BaseMeshPhongMaterial.specularStrength
uv Transform
Returns ReadonlyMatrix3
Inherited from BaseMeshPhongMaterial.uvTransform
business Tag
- get businessTag(): string
Returns string
Inherited from BaseMeshPhongMaterial.businessTag
- set businessTag(v: string): void
Parameters
- v: string
Returns void
Inherited from BaseMeshPhongMaterial.businessTag
Methods
get Components
Returns readonly ShaderComponent[]
Inherited from BaseMeshPhongMaterial.getComponents
delete Component
Parameters
- index: number
Returns void
Inherited from BaseMeshPhongMaterial.deleteComponent
add Component
Parameters
- c: ShaderComponent
- index: number
Returns void
Inherited from BaseMeshPhongMaterial.addComponent
refresh Instance In Building
Parameters
- enable: boolean
Returns void
Inherited from BaseMeshPhongMaterial.refreshInstanceInBuilding
set Color Write Masks
Parameters
- r: boolean
- g: boolean
- b: boolean
- a: boolean
Returns void
Inherited from BaseMeshPhongMaterial.setColorWriteMasks
notify Material Property Changed
When user change the material property manually, this method need to use to refresh data.
Returns void
Inherited from BaseMeshPhongMaterial.notifyMaterialPropertyChanged
get UUID
UUID of this material instance. This gets automatically assigned, so this shouldn't be edited.
Returns string
Inherited from BaseMeshPhongMaterial.getUUID
notify Recompile Shader
Reset the key of shader and force engine to compile shader again.
Returns void
Inherited from BaseMeshPhongMaterial.notifyRecompileShader
destroy All Resources Owned
Returns void
Inherited from BaseMeshPhongMaterial.destroyAllResourcesOwned
free All Gpu Resource Owned
Returns void
Inherited from BaseMeshPhongMaterial.freeAllGpuResourceOwned
update Shape Uniforms
Parameters
- p: WGLProgram
- r: ShaderComponentRegistry
Returns void
Inherited from BaseMeshPhongMaterial.updateShapeUniforms
compute Shape Key
Parameters
- r: ShaderComponentRegistry
Returns string
Inherited from BaseMeshPhongMaterial.computeShapeKey
copy Base
Copy basic properties from other material.
Parameters
- other: ScenePopLODMaterial
the source of copied data
Returns this
Inherited from BaseMeshPhongMaterial.copyBase
- other: ScenePopLODMaterial
free GPU
Returns void
Inherited from BaseMeshPhongMaterial.freeGPU
extend Shader Shape
Parameters
- b: ShaderBuilder
- r: ShaderComponentRegistry
Returns void
Inherited from BaseMeshPhongMaterial.extendShaderShape
get Light System
Parameters
- registry: ShaderComponentRegistry
Returns LightShaderComponent
Inherited from BaseMeshPhongMaterial.getLightSystem
Staticconstruct Material From G Buffer For Light
Returns string
Inherited from BaseMeshPhongMaterial.constructMaterialFromGBufferForLight
Staticextend Deferred Light
Parameters
- builder: ShaderBuilder
Returns void
Inherited from BaseMeshPhongMaterial.extendDeferredLight
extend Encode Deferred
Parameters
- builder: ShaderBuilder
Returns void
Inherited from BaseMeshPhongMaterial.extendEncodeDeferred
update Deferred Uniform
Parameters
- p: WGLProgram
Returns void
Inherited from BaseMeshPhongMaterial.updateDeferredUniform
class Name
The name of instance's class.
Returns string
Inherited from BaseMeshPhongMaterial.className
set Values
Change the corresponding attribute according to the values of given MeshPhongMaterialParameters| parameters.
Parameters
- values: MeshPhongMaterialParameters<Texture2D>
a object of specified type contains parameters.
Returns void
Inherited from BaseMeshPhongMaterial.setValues
- values: MeshPhongMaterialParameters<Texture2D>
traverse UBO
Execute the given method for every ubo.
Parameters
- visitor: (ubo: UniformBlockObject) => void
Returns void
Inherited from BaseMeshPhongMaterial.traverseUBO
copy
Copy the data to this instance from other instance.
Parameters
- other: MeshPhongMaterial<SourceTexture>
the source of copied data
Returns this
Inherited from BaseMeshPhongMaterial.copy
- other: MeshPhongMaterial<SourceTexture>
clone
Return a cloned instance of this class.
Returns MeshPhongMaterial<SourceTexture>
Inherited from BaseMeshPhongMaterial.clone
serialize
Store the attributes of this class into string as serializing format.
Parameters
- ctx: Serializer
an instance used to store the data of scene objects.
Returns void
Inherited from BaseMeshPhongMaterial.serialize
- ctx: Serializer
deserialize
Parse the data for this class from string according to serializing format.
Parameters
- ctx: Deserializer
an instance give the method to take the data for attribute.
Returns void
Inherited from BaseMeshPhongMaterial.deserialize
- ctx: Deserializer
mark Business Tag
Parameters
- v: string
Returns this
Inherited from BaseMeshPhongMaterial.markBusinessTag
is Destroyed
Returns boolean
Inherited from BaseMeshPhongMaterial.isDestroyed
destroy
Returns void
Inherited from BaseMeshPhongMaterial.destroy
validate
Returns void
Inherited from BaseMeshPhongMaterial.validate
on
once
has
off
emit
Active the event and call the registered listener.
Parameters
- type: EventType<never>
Returns void
Inherited from BaseMeshPhongMaterial.emit
clear All Listeners
Removes all listeners from listening list.
Returns void
Inherited from BaseMeshPhongMaterial.clearAllListeners
Mark this shape of this material is largely affect by shader. Hint the engine that pick, culling is disabled