Blockbench Reference Docs
    Preparing search index...

    Type Alias PaintContext

    type PaintContext = {
        color: string;
        ctx: CanvasRenderingContext2D;
        event: PointerEvent;
        opacity: number;
        size: number;
        softness: number;
        texture: Texture;
        x: number;
        y: number;
    }
    Index

    Properties

    color: string

    Brush color, set by the Blockbench color panel

    ctx: CanvasRenderingContext2D

    2D Canvas context of the texture that is being edited

    event: PointerEvent

    Javascript pointer event that the brush stroke originated from

    opacity: number

    Opacity, as set by the Opacity slider

    size: number

    Brush size, as set by the Brush Size slider

    softness: number

    Brush softness, as set by the Brush Softness slider

    texture: Texture

    Blockbench texture that is being edited

    x: number

    X Coordinate of the position of the brush stroke

    y: number

    Y Coordinate of the position of the brush stroke