Class Oscillogram

Functions

oscillogram.schema ()
oscillogram.from_options (options)

Tables

oscillogram.instance

Metamethods

oscillogram:__index (index) ⚠️.
oscillogram:__ipairs () ⚠️.
oscillogram:__data ()
oscillogram:__tostring ()

Methods

oscillogram:new (kind, length[, default=range.min[, range=Range:new(0]])
oscillogram:push (point)
oscillogram:push_with_factor (factor)
oscillogram:push_with_random_factor (factor_limit)
oscillogram:shift ()
oscillogram:update (value)


Functions

Methods
oscillogram.schema ()

Returns:

    tab JSON Schema for this class (see the luaserialization library)
oscillogram.from_options (options)

Parameters:

Returns:

    Oscillogram

Tables

oscillogram.instance

Fields:

  • _kind "custom", "linear" or "random"
  • _points {number,...}
  • _default number
  • _range Range

Metamethods

oscillogram:__index (index)
⚠️. It supports direct access to plot points and is used for iterating over them in Lua 5.3+.

Parameters:

  • index number [1, ∞)

Returns:

    Vector2D or nil
oscillogram:__ipairs ()
⚠️. It is used for iterating over plot points in Lua 5.2.

Returns:

  1. iterators.inext iterator function
  2. Oscillogram self
  3. number always zero
oscillogram:__data ()

Returns:

    tab table with instance fields (see the luaserialization library)
oscillogram:__tostring ()

Returns:

    string stringified table with instance fields (see the luaserialization library)

Methods

oscillogram:new (kind, length[, default=range.min[, range=Range:new(0]])

Parameters:

  • kind "custom", "linear" or "random"
  • length number [0, ∞)
  • default number (default range.min)
  • range Range (default Range:new(0)

Returns:

    Oscillogram
oscillogram:push (point)

Parameters:

  • point number
oscillogram:push_with_factor (factor)

Parameters:

  • factor number
oscillogram:push_with_random_factor (factor_limit)

Parameters:

  • factor_limit number
oscillogram:shift ()

Returns:

    number
oscillogram:update (value)

Parameters:

  • value number

Returns:

    number
generated by LDoc 1.5.0 Last updated 2026-09-20 07:37:32