@lightningjs/renderer
    Preparing search index...

    Interface INodeAnimateProps<ShNode>

    Properties used to animate() a Node

    interface INodeAnimateProps<ShNode extends CoreShaderNode = CoreShaderNode> {
        alpha: number;
        color: number;
        colorBl: number;
        colorBottom: number;
        colorBr: number;
        colorLeft: number;
        colorRight: number;
        colorTl: number;
        colorTop: number;
        colorTr: number;
        h: number;
        mount: number;
        mountX: number;
        mountY: number;
        pivot: number;
        pivotX: number;
        pivotY: number;
        rotation: number;
        scale: number;
        scaleX: number;
        scaleY: number;
        shaderProps: Partial<ShNode["props"]>;
        srcHeight?: number;
        srcWidth?: number;
        srcX?: number;
        srcY?: number;
        w: number;
        x: number;
        y: number;
        zIndex: number;
    }

    Type Parameters

    Hierarchy

    • Omit<CoreNodeAnimateProps, "shaderProps">
      • INodeAnimateProps
    Index

    Properties

    alpha: number

    The alpha opacity of the Node.

    The alpha value is a number between 0 and 1, where 0 is fully transparent and 1 is fully opaque.

    1

    color: number

    The color of the Node.

    The color value is a number in the format 0xRRGGBBAA, where RR is the red component, GG is the green component, BB is the blue component, and AA is the alpha component.

    Gradient colors may be set by setting the different color sub-properties: colorTop, colorBottom, colorLeft, colorRight, colorTl, colorTr, colorBr, colorBl accordingly.

    0xffffffff (opaque white)

    colorBl: number

    The color of the bottom-left corner of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    colorBottom: number

    The color of the bottom edge of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    colorBr: number

    The color of the bottom-right corner of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    colorLeft: number

    The color of the left edge of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    colorRight: number

    The color of the right edge of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    colorTl: number

    The color of the top-left corner of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    colorTop: number

    The color of the top edge of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    colorTr: number

    The color of the top-right corner of the Node for gradient rendering.

    See color for more information about color values and gradient rendering.

    h: number

    The height of the Node.

    This will be deprecated in favor of w and h properties in the future.

    0

    mount: number

    Combined position of the Node's Mount Point

    The value can be any number between 0.0 and 1.0:

    • 0.0 defines the Mount Point at the top-left corner of the Node.
    • 0.5 defines it at the center of the Node.
    • 1.0 defines it at the bottom-right corner of the node.

    Use the mountX and mountY props seperately for more control of the Mount Point.

    When assigned, the same value is also passed to both the mountX and mountY props.

    0 (top-left)
    
    mountX: number

    X position of the Node's Mount Point

    The value can be any number between 0.0 and 1.0:

    • 0.0 defines the Mount Point's X position as the left-most edge of the Node
    • 0.5 defines it as the horizontal center of the Node
    • 1.0 defines it as the right-most edge of the Node.

    The combination of mountX and mountY define the Mount Point

    0 (left-most edge)
    
    mountY: number

    Y position of the Node's Mount Point

    The value can be any number between 0.0 and 1.0:

    • 0.0 defines the Mount Point's Y position as the top-most edge of the Node
    • 0.5 defines it as the vertical center of the Node
    • 1.0 defines it as the bottom-most edge of the Node.

    The combination of mountX and mountY define the Mount Point

    0 (top-most edge)
    
    pivot: number

    Combined position of the Node's Pivot Point

    The value can be any number between 0.0 and 1.0:

    • 0.0 defines the Pivot Point at the top-left corner of the Node.
    • 0.5 defines it at the center of the Node.
    • 1.0 defines it at the bottom-right corner of the node.

    Use the pivotX and pivotY props seperately for more control of the Pivot Point.

    When assigned, the same value is also passed to both the pivotX and pivotY props.

    0.5 (center)
    
    pivotX: number

    X position of the Node's Pivot Point

    The value can be any number between 0.0 and 1.0:

    • 0.0 defines the Pivot Point's X position as the left-most edge of the Node
    • 0.5 defines it as the horizontal center of the Node
    • 1.0 defines it as the right-most edge of the Node.

    The combination of pivotX and pivotY define the Pivot Point

    0.5 (centered on x-axis)
    
    pivotY: number

    Y position of the Node's Pivot Point

    The value can be any number between 0.0 and 1.0:

    • 0.0 defines the Pivot Point's Y position as the top-most edge of the Node
    • 0.5 defines it as the vertical center of the Node
    • 1.0 defines it as the bottom-most edge of the Node.

    The combination of pivotX and pivotY define the Pivot Point

    0.5 (centered on y-axis)
    
    rotation: number

    Rotation of the Node (in Radians)

    Sets the amount to rotate the Node by around it's Pivot Point (defined by the pivot props). Positive values rotate the Node clockwise, while negative values rotate it counter-clockwise.

    Example values:

    • -Math.PI / 2: 90 degree rotation counter-clockwise
    • 0: No rotation
    • Math.PI / 2: 90 degree rotation clockwise
    • Math.PI: 180 degree rotation clockwise
    • 3 * Math.PI / 2: 270 degree rotation clockwise
    • 2 * Math.PI: 360 rotation clockwise
    scale: number

    Scale to render the Node at

    The scale value multiplies the provided width and height of the Node around the Node's Pivot Point (defined by the pivot props).

    Behind the scenes, setting this property sets both the scaleX and scaleY props to the same value.

    NOTE: When the scaleX and scaleY props are explicitly set to different values, this property returns null. Setting null on this property will have no effect.

    1.0
    
    scaleX: number

    Scale to render the Node at (X-Axis)

    The scaleX value multiplies the provided width of the Node around the Node's Pivot Point (defined by the pivot props).

    1.0
    
    scaleY: number

    Scale to render the Node at (Y-Axis)

    The scaleY value multiplies the provided height of the Node around the Node's Pivot Point (defined by the pivot props).

    1.0
    
    shaderProps: Partial<ShNode["props"]>
    srcHeight?: number

    The height of the rectangle from which the Image Texture will be extracted. This value can be negative. If not provided, the image's source natural height will be used.

    srcWidth?: number

    She width of the rectangle from which the Image Texture will be extracted. This value can be negative. If not provided, the image's source natural width will be used.

    srcX?: number

    The x coordinate of the reference point of the rectangle from which the Texture will be extracted. width and height are provided. And only works when createImageBitmap is available. Only works when createImageBitmap is supported on the browser.

    srcY?: number

    The y coordinate of the reference point of the rectangle from which the Texture will be extracted. Only used when source srcWidth width and srcHeight height are provided. Only works when createImageBitmap is supported on the browser.

    w: number

    The width of the Node.

    This will be deprecated in favor of w and h properties in the future.

    0

    x: number

    The x coordinate of the Node's Mount Point.

    See mountX and mountY for more information about setting the Mount Point.

    0

    y: number

    The y coordinate of the Node's Mount Point.

    See mountX and mountY for more information about setting the Mount Point.

    0

    zIndex: number

    The Node's z-index.

    Max z-index of children under the same parent determines which child is rendered on top. Higher z-index means the Node is rendered on top of children with lower z-index.

    Max value is 1000 and min value is -1000. Values outside of this range will be clamped.