dacha
    Preparing search index...

    Class Mesh

    Draws an image with your own shader. material sets the shader.

    Shaders

    Hierarchy (View Summary)

    Index
    actor?: Actor

    The actor that has this component. It is undefined until the component is added to an actor.

    blending: "normal" | "addition" | "subtract" | "multiply"

    Blending mode for rendering

    color: string

    Color tint applied to the mesh

    currentFrame: number = 0

    Current frame to render

    disabled: boolean

    Whether the mesh is disabled and should not render

    flipX: boolean

    Whether to flip the mesh horizontally

    flipY: boolean

    Whether to flip the mesh vertically

    height: number

    Height of the mesh in pixels

    material?: MaterialConfig

    Material describes a shader and its options applied to a texture (optional).

    opacity: number

    Opacity from 0 (transparent) to 1 (opaque)

    slice: number

    Number of frames in the sprite sheet

    sortingLayer: string

    Sorting layer name for rendering order

    sortOffset: Point

    Center point for sorting calculations

    src: string

    Path to the texture image file

    width: number

    Width of the mesh in pixels

    • Returns the component of the same class on the parent actor.

      Returns Component<object> | undefined

      The component, or undefined if the actor has no parent actor or the parent has no such component.