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

    Interface ValueGenerator

    startGen/genValue follow the per-particle slot pattern documented in GeneratorMemory.ts: spawn calls startGen(memory) once (claim a slot or no-op), then genValue(memory) per frame.

    interface ValueGenerator {
        type: "value";
        clone(): ValueGenerator;
        genValue(memory: GeneratorMemory): number;
        refreshTable?(): void;
        reroll?(memory: GeneratorMemory): void;
        startGen(memory: GeneratorMemory): void;
        toJSON(): ValueGeneratorJSON;
    }

    Implemented by

    Index
    type: "value"

    'value': the number does not change with time.

    • A copy with the same settings.

      Returns ValueGenerator

    • The number, from what memory holds.

      Parameters

      Returns number

    • See FunctionValueGenerator.refreshTable.

      Returns void

    • Rolls again what ValueGenerator.startGen rolled into memory, so later reads give a new random number: what a behavior that picks a new value every step (Unity's Randomize of Force over Lifetime) calls before reading. Only generators that roll implement it.

      Parameters

      Returns void