Lume
    Preparing search index...

    Type Alias GraphicTransforms

    The GraphicTransforms object stores a collection of configuration options that can used on any Graphic. Coliqually, this is referred to as a Graphic's config.

    When creating a config object, only the options that you need to update should be included.

    The majority of base configiuration options come from transformations that can be applied to p5 during the drawing of an image, such as translate(), rotate(), and scale().

    type GraphicTransforms = {
        offset?: { x: number; y: number };
        rotation?: number;
        scale?: number;
    }
    Index

    Properties

    offset?: { x: number; y: number }

    Sets the position of the graphic.

    By default, CanvasDrawer graphics are drawn anchored to the center of the canvas, one of the sides, or one of the four corners, with the majority anchored to the center. As the name implies, the offset property does not define an absolute position for the CanvasDrawer graphic, but instead shifts it by a given amount from its default position.

    rotation?: number

    Rotates the graphic by an amount.

    Rotations are set in degrees.

    scale?: number

    Sets the scale of the graphic.

    @seep5.js docs - scale()