Enums.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /************************************************************************
  2. * Enums.js
  3. ************************************************************************
  4. * Copyright (c) 2021 Pedro Tonini Rosenberg Schneider.
  5. *
  6. * This file is part of Pandora.
  7. *
  8. * Pandora is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * Pandora is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with Pandora. If not, see <https://www.gnu.org/licenses/>.
  20. *************************************************************************/
  21. /**
  22. * This {@code Enums} file provides several useful constant enumerators the engine
  23. * uses internaly. Users may find these useful for calling certain functions.
  24. *
  25. * @author Pedro Schneider
  26. */
  27. /**
  28. * Enumerates property types.
  29. */
  30. const PROPERTY_TYPE = {
  31. NUMBER: 1,
  32. VECTOR2: 2,
  33. COLOR: 3,
  34. };
  35. /**
  36. * Enumerates shape types.
  37. */
  38. const SHAPES = {
  39. RECT: 1,
  40. ELLIPSE: 2,
  41. };
  42. /**
  43. * Enumerates transition types.
  44. */
  45. const TRANS_TYPE = {
  46. LINEAR: 1,
  47. QUAD: 2,
  48. CUBIC: 3,
  49. QUART: 4,
  50. QUINT: 5,
  51. SINE: 6,
  52. EXPONENTIAL: 7,
  53. CIRCULAR: 8,
  54. ELASTIC: 9,
  55. BACK: 10,
  56. BOUNCE: 11,
  57. };
  58. /**
  59. * Enumerates easing types.
  60. */
  61. const EASE_TYPE = {
  62. IN: 1,
  63. OUT: 2,
  64. IN_OUT: 3,
  65. };
  66. /**
  67. * Enumerates render modes.
  68. */
  69. const RENDER_MODES = {
  70. P2D: 1,
  71. WEBGL: 2,
  72. };
  73. /**
  74. * Object to hold information about the default styling of UIOBjects.
  75. */
  76. const STYLE = {
  77. DEFAULT_FONT_SIZE: 20,
  78. DEFAULT_STYLE:
  79. {
  80. "font-family": "Lato",
  81. },
  82. }