babylon.quarks - v1.0.0
    Preparing search index...

    Interface FrameOverLifeOptions

    How FrameOverLife plays the sheet, beyond sampling frame over the particle's life. Every field is optional, and leaving them all out keeps the plain life-fraction behaviour.

    interface FrameOverLifeOptions {
        cycles?: number;
        fps?: number;
        frameCount?: number;
        loop?: boolean;
        random?: boolean;
        randomRow?: boolean;
        row?: number;
        rowCount?: number;
        rowLength?: number;
        startFrame?: ValueGenerator;
    }
    Index
    cycles?: number

    Life mode only: how many times frame plays over the particle's life (Unity's "Cycles"). Default 1.

    fps?: number

    Frames per second. Above zero the sheet plays by the particle's age in seconds instead of its life fraction, Unity's "FPS" time mode: frame then gives the first frame of the segment, and the frame advances by one every 1 / fps seconds. Needs frameCount. As in Unity, the frame runs on between whole frames (2.5 halfway from frame 2 to frame 3), so a system with blendTiles fades each frame into the next at any frame rate; without it the tile shown is the whole frame.

    frameCount?: number

    Frames in the segment that plays, from the first frame. In FPS mode the frame wraps (or holds, see loop) at it, counted from frame; in life mode the curve plus a startFrame offset wraps into [0, frameCount), so the curve should start at frame 0. 0, the default, means no segment.

    loop?: boolean

    FPS mode: wrap back to the first frame of the segment (default) or hold its last.

    random?: boolean

    FPS mode: every 1 / fps seconds show a random frame of the segment instead of the next one, each particle its own sequence: the flicker of lightning, sparks or a neon sign. Needs frameCount; loop does not apply. The frames are whole, so blendTiles does not fade between them: the next random frame is not the tile after this one. Default false.

    randomRow?: boolean

    With rowLength: each particle plays a row picked at birth from the rowCount rows instead of row (Unity's Row Mode "Random"): a sheet of several takes of one animation, one per row. Default false.

    row?: number

    With rowLength: the row played, from 0 at the top (Unity's Row Index). Default 0.

    rowCount?: number

    Rows on the sheet, the rows randomRow picks from. Default 1.

    rowLength?: number

    Play one row of a grid sheet instead of the whole sheet (Unity's Texture Sheet Animation with Animation "Single Row"): the frames in a row, the sheet's columns. frame, the cycles, frameCount and startFrame then count frames within the row, and the first frame of the row (row, or a random one with randomRow) is added. 0, the default, plays the whole sheet.

    startFrame?: ValueGenerator

    Per-particle frame offset, sampled once at birth: an IntervalValue(0, n) starts each particle on a random frame (Unity's "Start Frame", which is a fraction of the frames: this is that fraction times frameCount). As in Unity it is added whole and fraction alike: 4.8 shows the frame 4 frames on, blended 0.8 into the next with blendTiles. Default none.