SpriteMaterial
Core.SpriteMaterial exported from @manycore/aholo-viewer.
Hierarchy
- SpriteMaterial<SourceTexture>
- SpriteMaterial
Properties
is Dynamic Shape
Inherited from BaseSpriteMaterial.isDynamicShape
is Volume Rendering
Mark this material uses volume like rendering technology. Hint the engine that some effect is disabled
Inherited from BaseSpriteMaterial.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 BaseSpriteMaterial.MAX_TEXTURES
name
Optional name of the object (doesn't need to be unique). Default is an empty string.
Inherited from BaseSpriteMaterial.name
id
Unique number for this material instance.
Inherited from BaseSpriteMaterial.id
transparentfalse
If use transparent effect, this value must be set to true to enable blending.
Inherited from BaseSpriteMaterial.transparent
visibletrue
Defines whether this material is visible.
Inherited from BaseSpriteMaterial.visible
program Id
The id of shader program which this material shader belongs to.
Inherited from BaseSpriteMaterial.programId
side
Set which side of the object will be seen on screen.
Inherited from BaseSpriteMaterial.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 BaseSpriteMaterial.blending
blend SrcSrcAlphaFactor
Blending source. Default is SrcAlphaFactor. See the source factors constants for all possible values.
Inherited from BaseSpriteMaterial.blendSrc
blend DstOneMinusSrcAlpha
Blending destination. Default is OneMinusSrcAlphaFactor. See the destination factors constants for all possible values.
Inherited from BaseSpriteMaterial.blendDst
blend EquationAdd
Blending equation to use when applying blending. Default is AddEquation. See the blending equation constants for all possible values.
Inherited from BaseSpriteMaterial.blendEquation
blend Src Alpha
The transparency of the blendSrc .
Inherited from BaseSpriteMaterial.blendSrcAlpha
blend Dst Alpha
The transparency of the blendDst .
Inherited from BaseSpriteMaterial.blendDstAlpha
blend Equation Alpha
The transparency of the blendEquation .
Inherited from BaseSpriteMaterial.blendEquationAlpha
stencil Writefalse
Whether rendering this material has any effect on the stencil buffer.
Inherited from BaseSpriteMaterial.stencilWrite
stencil Write Mask0xFF
The bit mask to use when writing to the stencil buffer.
Inherited from BaseSpriteMaterial.stencilWriteMask
stencil Func Mask0xFF
The bit mask to use when comparing against the stencil buffer.
Inherited from BaseSpriteMaterial.stencilFuncMask
stencil FuncAlwaysStencilFunc
The stencil comparison function to use.
Inherited from BaseSpriteMaterial.stencilFunc
stencil Ref0
The value to use when performing stencil comparisons or stencil operations.
Inherited from BaseSpriteMaterial.stencilRef
stencil FailKeepStencilOp
Which stencil operation to perform when the comparison function returns false.
Inherited from BaseSpriteMaterial.stencilFail
stencil Z FailKeepStencilOp
Which stencil operation to perform when the comparison function returns true but the depth test fails.
Inherited from BaseSpriteMaterial.stencilZFail
stencil Z PassKeepStencilOp
Which stencil operation to perform when the comparison function returns true and the depth test passes.
Inherited from BaseSpriteMaterial.stencilZPass
depth FuncLessEqualDepth
Which depth function to use.
Inherited from BaseSpriteMaterial.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 BaseSpriteMaterial.depthTest
depth Writetrue
Whether rendering this material has any effect on the depth buffer.
Inherited from BaseSpriteMaterial.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 BaseSpriteMaterial.colorWrite
color Write Masks
Inherited from BaseSpriteMaterial.colorWriteMasks
polygon Offsetfalse
Whether to use polygon offset.
Inherited from BaseSpriteMaterial.polygonOffset
polygon Offset Factor0
Sets the polygon offset factor.
Inherited from BaseSpriteMaterial.polygonOffsetFactor
polygon Offset Units0
Sets the polygon offset units.
Inherited from BaseSpriteMaterial.polygonOffsetUnits
premultiplied Alphafalse
Whether to premultiply the alpha (transparency) value.
Inherited from BaseSpriteMaterial.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 BaseSpriteMaterial.onBeforeRender
color Write Mask
Inherited from BaseSpriteMaterial.colorWriteMask
size Attenuationfalse
Whether the size of the sprite is attenuated by the camera depth. (Perspective camera only.)
Inherited from BaseSpriteMaterial.sizeAttenuation
rotation0
The rotation of the sprite in radians.
Inherited from BaseSpriteMaterial.rotation
color
Pick<
ReadonlyMarked,
| "_readonly_mark"
| "cloneReadonly"
| "clone"
| "g"
| "r"
| "b"
| "isColor"
| "equals"
| "getHex"
| "getSerializeData",
>,
>
Color of the material, by default set to white (0xffffff). The value of color multiply with the color of texture| texture.
Inherited from BaseSpriteMaterial.color
texturenull
A picture for sprite.
Inherited from BaseSpriteMaterial.texture
opacitynull
The Transparency of object.
Inherited from BaseSpriteMaterial.opacity
Readonlyuser Data
Inherited from BaseSpriteMaterial.userData
_ uuid
Inherited from BaseSpriteMaterial._uuid
uuid
Inherited from BaseSpriteMaterial.uuid
_ listeners
Inherited from BaseSpriteMaterial._listeners
Accessors
business Tag
- get businessTag(): string
Returns string
Inherited from BaseSpriteMaterial.businessTag
- set businessTag(v: string): void
Parameters
- v: string
Returns void
Inherited from BaseSpriteMaterial.businessTag
Methods
get Components
Returns readonly ShaderComponent[]
Inherited from BaseSpriteMaterial.getComponents
delete Component
Parameters
- index: number
Returns void
Inherited from BaseSpriteMaterial.deleteComponent
add Component
Parameters
- c: ShaderComponent
- index: number
Returns void
Inherited from BaseSpriteMaterial.addComponent
refresh Instance In Building
Parameters
- enable: boolean
Returns void
Inherited from BaseSpriteMaterial.refreshInstanceInBuilding
set Color Write Masks
Parameters
- r: boolean
- g: boolean
- b: boolean
- a: boolean
Returns void
Inherited from BaseSpriteMaterial.setColorWriteMasks
notify Material Property Changed
When user change the material property manually, this method need to use to refresh data.
Returns void
Inherited from BaseSpriteMaterial.notifyMaterialPropertyChanged
get UUID
UUID of this material instance. This gets automatically assigned, so this shouldn't be edited.
Returns string
Inherited from BaseSpriteMaterial.getUUID
notify Recompile Shader
Reset the key of shader and force engine to compile shader again.
Returns void
Inherited from BaseSpriteMaterial.notifyRecompileShader
copy Base
Copy basic properties from other material.
Parameters
- other: Material
the source of copied data
Returns void
Inherited from BaseSpriteMaterial.copyBase
- other: Material
free GPU
Make engine clear the current material's data in Ubo.
Returns void
Inherited from BaseSpriteMaterial.freeGPU
destroy All Resources Owned
Returns void
Inherited from BaseSpriteMaterial.destroyAllResourcesOwned
free All Gpu Resource Owned
Returns void
Inherited from BaseSpriteMaterial.freeAllGpuResourceOwned
class Name
The name of instance's class.
Returns string
Inherited from BaseSpriteMaterial.className
set Values
Change the corresponding attribute according to the values of given SpriteMaterialParameters| parameters.
Parameters
- p: SpriteMaterialParameters<SourceTexture>
a object of specified type contains parameters.
Returns void
Inherited from BaseSpriteMaterial.setValues
- p: SpriteMaterialParameters<SourceTexture>
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 BaseSpriteMaterial.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 BaseSpriteMaterial.deserialize
- ctx: Deserializer
copy
Copy the data to this instance from other instance.
Parameters
- other: SpriteMaterial<SourceTexture>
the source of copied data
Returns this
Inherited from BaseSpriteMaterial.copy
- other: SpriteMaterial<SourceTexture>
clone
Return a cloned instance of this class.
Returns SpriteMaterial<SourceTexture>
Inherited from BaseSpriteMaterial.clone
mark Business Tag
Parameters
- v: string
Returns this
Inherited from BaseSpriteMaterial.markBusinessTag
is Destroyed
Returns boolean
Inherited from BaseSpriteMaterial.isDestroyed
destroy
Returns void
Inherited from BaseSpriteMaterial.destroy
validate
Returns void
Inherited from BaseSpriteMaterial.validate
on
once
has
off
emit
Active the event and call the registered listener.
Parameters
- type: EventType<never>
Returns void
Inherited from BaseSpriteMaterial.emit
clear All Listeners
Removes all listeners from listening list.
Returns void
Inherited from BaseSpriteMaterial.clearAllListeners
Mark this shape of this material is largely affect by shader. Hint the engine that pick, culling is disabled