FatLineMaterial
This material is specifically used to draw line or dash-line which has width more than 1 pixel.
Hierarchy
- SceneClipMaterial
- FatLineMaterial
Properties
is Dynamic Shape
Mark this shape of this material is largely affect by shader. Hint the engine that pick, culling is disabled
Inherited from SceneClipMaterial.isDynamicShape
is Volume Rendering
Mark this material uses volume like rendering technology. Hint the engine that some effect is disabled
Inherited from SceneClipMaterial.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 SceneClipMaterial.MAX_TEXTURES
name
Optional name of the object (doesn't need to be unique). Default is an empty string.
Inherited from SceneClipMaterial.name
id
Unique number for this material instance.
Inherited from SceneClipMaterial.id
transparentfalse
If use transparent effect, this value must be set to true to enable blending.
Inherited from SceneClipMaterial.transparent
visibletrue
Defines whether this material is visible.
Inherited from SceneClipMaterial.visible
program Id
The id of shader program which this material shader belongs to.
Inherited from SceneClipMaterial.programId
side
Set which side of the object will be seen on screen.
Inherited from SceneClipMaterial.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 SceneClipMaterial.blending
blend SrcSrcAlphaFactor
Blending source. Default is SrcAlphaFactor. See the source factors constants for all possible values.
Inherited from SceneClipMaterial.blendSrc
blend DstOneMinusSrcAlpha
Blending destination. Default is OneMinusSrcAlphaFactor. See the destination factors constants for all possible values.
Inherited from SceneClipMaterial.blendDst
blend EquationAdd
Blending equation to use when applying blending. Default is AddEquation. See the blending equation constants for all possible values.
Inherited from SceneClipMaterial.blendEquation
blend Src Alpha
The transparency of the blendSrc .
Inherited from SceneClipMaterial.blendSrcAlpha
blend Dst Alpha
The transparency of the blendDst .
Inherited from SceneClipMaterial.blendDstAlpha
blend Equation Alpha
The transparency of the blendEquation .
Inherited from SceneClipMaterial.blendEquationAlpha
stencil Writefalse
Whether rendering this material has any effect on the stencil buffer.
Inherited from SceneClipMaterial.stencilWrite
stencil Write Mask0xFF
The bit mask to use when writing to the stencil buffer.
Inherited from SceneClipMaterial.stencilWriteMask
stencil Func Mask0xFF
The bit mask to use when comparing against the stencil buffer.
Inherited from SceneClipMaterial.stencilFuncMask
stencil FuncAlwaysStencilFunc
The stencil comparison function to use.
Inherited from SceneClipMaterial.stencilFunc
stencil Ref0
The value to use when performing stencil comparisons or stencil operations.
Inherited from SceneClipMaterial.stencilRef
stencil FailKeepStencilOp
Which stencil operation to perform when the comparison function returns false.
Inherited from SceneClipMaterial.stencilFail
stencil Z FailKeepStencilOp
Which stencil operation to perform when the comparison function returns true but the depth test fails.
Inherited from SceneClipMaterial.stencilZFail
stencil Z PassKeepStencilOp
Which stencil operation to perform when the comparison function returns true and the depth test passes.
Inherited from SceneClipMaterial.stencilZPass
depth FuncLessEqualDepth
Which depth function to use.
Inherited from SceneClipMaterial.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 SceneClipMaterial.depthTest
depth Writetrue
Whether rendering this material has any effect on the depth buffer.
Inherited from SceneClipMaterial.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 SceneClipMaterial.colorWrite
color Write Masks
Inherited from SceneClipMaterial.colorWriteMasks
polygon Offsetfalse
Whether to use polygon offset.
Inherited from SceneClipMaterial.polygonOffset
polygon Offset Factor0
Sets the polygon offset factor.
Inherited from SceneClipMaterial.polygonOffsetFactor
polygon Offset Units0
Sets the polygon offset units.
Inherited from SceneClipMaterial.polygonOffsetUnits
premultiplied Alphafalse
Whether to premultiply the alpha (transparency) value.
Inherited from SceneClipMaterial.premultipliedAlpha
color Write Mask
Inherited from SceneClipMaterial.colorWriteMask
enable Scene Clipping
Inherited from SceneClipMaterial.enableSceneClipping
fallback
color
enable Dash
dash
fat Line Width
enable View Independent Dash Scale
on Before Render
This method will be used automatically before
- (renderer: Renderer): void
Parameters
- renderer: Renderer
instance of renderer for engine.
Returns void
- renderer: Renderer
Overrides SceneClipMaterial.onBeforeRender
Readonlyuser Data
Inherited from SceneClipMaterial.userData
_ uuid
Inherited from SceneClipMaterial._uuid
uuid
Inherited from SceneClipMaterial.uuid
_ listeners
Inherited from SceneClipMaterial._listeners
Accessors
business Tag
- get businessTag(): string
Returns string
Inherited from SceneClipMaterial.businessTag
- set businessTag(v: string): void
Parameters
- v: string
Returns void
Inherited from SceneClipMaterial.businessTag
Methods
get Components
Returns readonly ShaderComponent[]
Inherited from SceneClipMaterial.getComponents
delete Component
Parameters
- index: number
Returns void
Inherited from SceneClipMaterial.deleteComponent
add Component
Parameters
- c: ShaderComponent
- index: number
Returns void
Inherited from SceneClipMaterial.addComponent
refresh Instance In Building
Parameters
- enable: boolean
Returns void
Inherited from SceneClipMaterial.refreshInstanceInBuilding
set Color Write Masks
Parameters
- r: boolean
- g: boolean
- b: boolean
- a: boolean
Returns void
Inherited from SceneClipMaterial.setColorWriteMasks
notify Material Property Changed
When user change the material property manually, this method need to use to refresh data.
Returns void
Inherited from SceneClipMaterial.notifyMaterialPropertyChanged
get UUID
UUID of this material instance. This gets automatically assigned, so this shouldn't be edited.
Returns string
Inherited from SceneClipMaterial.getUUID
notify Recompile Shader
Reset the key of shader and force engine to compile shader again.
Returns void
Inherited from SceneClipMaterial.notifyRecompileShader
copy Base
Copy basic properties from other material.
Parameters
- other: Material
the source of copied data
Returns void
Inherited from SceneClipMaterial.copyBase
- other: Material
destroy All Resources Owned
Returns void
Inherited from SceneClipMaterial.destroyAllResourcesOwned
free All Gpu Resource Owned
Returns void
Inherited from SceneClipMaterial.freeAllGpuResourceOwned
free GPU
Make engine clear the current material's data in Ubo.
Returns void
Inherited from SceneClipMaterial.freeGPU
class Name
The name of instance's class.
Returns string
Overrides SceneClipMaterial.className
generate Shader Key
Parameters
- r: ShaderComponentRegistry
Returns string
Overrides SceneClipMaterial.generateShaderKey
set Values
Sets the properties with the given values. In extents class, this method need to override in extended material for corresponding parameters.
Parameters
- p: FatLineMaterialParameter
Returns void
Overrides SceneClipMaterial.setValues
update Shape Uniforms
Parameters
- program: WGLProgram
- r: ShaderComponentRegistry
Returns void
Overrides SceneClipMaterial.updateShapeUniforms
compute Shape Key
Parameters
- r: ShaderComponentRegistry
Returns string
Overrides SceneClipMaterial.computeShapeKey
extend Shader Shape
Parameters
- builder: ShaderBuilder
- registry: ShaderComponentRegistry
Returns void
Overrides SceneClipMaterial.extendShaderShape
copy
abstract function to copy a same type material instance
Parameters
- other: FatLineMaterial
Returns this
Overrides SceneClipMaterial.copy
serialize
Store the attributes of this class into string as serializing format.
Parameters
- ctx: Serializer
this parameter has not supported external Serializer yet. It may cause that this method can not be used directly.
Returns void
Overrides SceneClipMaterial.serialize
- ctx: Serializer
deserialize
Parse the data for this class from string according to serializing format.
Parameters
- ctx: Deserializer
this parameter has not supported external Deserializer yet. It may cause that this method can not be used directly.
Returns void
Overrides SceneClipMaterial.deserialize
- ctx: Deserializer
clone
abstract function to clone each instance of the class
Returns FatLineMaterial
Overrides SceneClipMaterial.clone
mark Business Tag
Parameters
- v: string
Returns this
Inherited from SceneClipMaterial.markBusinessTag
is Destroyed
Returns boolean
Inherited from SceneClipMaterial.isDestroyed
destroy
Returns void
Inherited from SceneClipMaterial.destroy
validate
Returns void
Inherited from SceneClipMaterial.validate
on
once
has
off
emit
Active the event and call the registered listener.
Parameters
- type: EventType<never>
Returns void
Inherited from SceneClipMaterial.emit
clear All Listeners
Removes all listeners from listening list.
Returns void
Inherited from SceneClipMaterial.clearAllListeners
This material is specifically used to draw line or dash-line which has width more than 1 pixel.