Small World Engine API Reference - v0.46.1
    Preparing search index...

    Interface OscillatorOptions

    Configuration options for the OscillatorBehavior.

    interface OscillatorOptions {
        amplitude?: number;
        frequency?: number;
        offset?: number;
        onUpdate: (value: number, deltaTime: number) => void;
        type?: OscillatorType;
    }
    Index

    Properties

    amplitude?: number

    How strong the oscillation is. Defaults to 1.0.

    frequency?: number

    How fast the oscillation is. Defaults to 1.0.

    offset?: number

    The base value offset. Defaults to 0.0.

    onUpdate: (value: number, deltaTime: number) => void

    Callback executed every frame with the new oscillating value. This is where you apply the value to your target (e.g. position, scale, intensity).

    The mathematical function to use. Defaults to SINE.