Source: extern/hud.js

  1. import register from "../util/register.js";
  2. import m_hud_fact from "../intern/hud.js";
  3. import m_print_fact from "../intern/print.js";
  4. /**
  5. * Head-up display functions.
  6. * To work properly requires initialization of the separate canvas element.
  7. * @see module:main.init
  8. * @module hud
  9. */
  10. function HUD(ns, exports) {
  11. var m_hud = m_hud_fact(ns);
  12. var m_print = m_print_fact(ns);
  13. /**
  14. * Draw the mixer strip.
  15. * Used by mixer addon.
  16. * @method module:hud.draw_mixer_strip
  17. * @deprecated Use {@link module:screen.draw_mixer_strip} instead
  18. */
  19. exports.draw_mixer_strip = function(id, is_active, slot, params, active_param,
  20. mute, solo) {
  21. m_print.error_deprecated("draw_mixer_strip", "screen.draw_mixer_strip");
  22. m_hud.draw_mixer_strip(id, is_active, slot, params, active_param,
  23. mute, solo);
  24. };
  25. /**
  26. * Plot the array.
  27. * @method module:hud.plot_array
  28. * @param {string} header Plot header
  29. * @param {number} slot Slot number
  30. * @param {Float32Array} arr Array
  31. * @param {number} arg_min Minimum plot argument value
  32. * @param {number} arg_max Maximum plot argument value
  33. * @param {number} val_min Minimum plot value
  34. * @param {number} val_max Maximum plot value
  35. * @deprecated Use {@link module:screen.plot_array} instead
  36. */
  37. exports.plot_array = function(header, slot, arr, arg_min, arg_max, val_min,
  38. val_max) {
  39. m_print.error_deprecated("plot_array", "screen.plot_array");
  40. m_hud.plot_array(header, slot, arr, arg_min, arg_max, val_min, val_max);
  41. };
  42. }
  43. var hud_factory = register("hud", HUD);
  44. export default hud_factory;