babylon.quarks-editor 0.17.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +84 -0
  4. package/dist/core/binding.d.ts +43 -0
  5. package/dist/core/binding.js +82 -0
  6. package/dist/core/collision.d.ts +20 -0
  7. package/dist/core/collision.js +39 -0
  8. package/dist/core/colors.d.ts +31 -0
  9. package/dist/core/colors.js +60 -0
  10. package/dist/core/effectTree.d.ts +25 -0
  11. package/dist/core/effectTree.js +115 -0
  12. package/dist/core/groups.d.ts +12 -0
  13. package/dist/core/groups.js +27 -0
  14. package/dist/core/history.d.ts +25 -0
  15. package/dist/core/history.js +69 -0
  16. package/dist/core/loadEffect.d.ts +8 -0
  17. package/dist/core/loadEffect.js +87 -0
  18. package/dist/core/scrub.d.ts +11 -0
  19. package/dist/core/scrub.js +24 -0
  20. package/dist/core/shapes.d.ts +31 -0
  21. package/dist/core/shapes.js +98 -0
  22. package/dist/core/systems.d.ts +25 -0
  23. package/dist/core/systems.js +76 -0
  24. package/dist/core/textureExport.d.ts +9 -0
  25. package/dist/core/textureExport.js +58 -0
  26. package/dist/core/timeline.d.ts +35 -0
  27. package/dist/core/timeline.js +69 -0
  28. package/dist/core/values.d.ts +31 -0
  29. package/dist/core/values.js +81 -0
  30. package/dist/index.d.ts +15 -0
  31. package/dist/index.js +9 -0
  32. package/dist/react/CurveEditor.d.ts +12 -0
  33. package/dist/react/CurveEditor.js +106 -0
  34. package/dist/react/EffectEditor.d.ts +22 -0
  35. package/dist/react/EffectEditor.js +30 -0
  36. package/dist/react/EffectEditorHost.d.ts +42 -0
  37. package/dist/react/EffectEditorHost.js +247 -0
  38. package/dist/react/GradientEditor.d.ts +7 -0
  39. package/dist/react/GradientEditor.js +72 -0
  40. package/dist/react/ModuleSection.d.ts +9 -0
  41. package/dist/react/ModuleSection.js +24 -0
  42. package/dist/react/PromptDialog.d.ts +14 -0
  43. package/dist/react/PromptDialog.js +45 -0
  44. package/dist/react/SubEmittersModule.d.ts +10 -0
  45. package/dist/react/SubEmittersModule.js +39 -0
  46. package/dist/react/TimelinePanel.d.ts +32 -0
  47. package/dist/react/TimelinePanel.js +225 -0
  48. package/dist/react/TimelineTrackRow.d.ts +23 -0
  49. package/dist/react/TimelineTrackRow.js +107 -0
  50. package/dist/react/ValueField.d.ts +13 -0
  51. package/dist/react/ValueField.js +19 -0
  52. package/dist/react/behaviorModules.d.ts +23 -0
  53. package/dist/react/behaviorModules.js +139 -0
  54. package/dist/react/fields.d.ts +24 -0
  55. package/dist/react/fields.js +30 -0
  56. package/dist/react/index.d.ts +20 -0
  57. package/dist/react/index.js +14 -0
  58. package/dist/react/modules.d.ts +35 -0
  59. package/dist/react/modules.js +439 -0
  60. package/dist/react/theme.d.ts +26 -0
  61. package/dist/react/theme.js +78 -0
  62. package/package.json +63 -0
  63. package/src/core/binding.ts +105 -0
  64. package/src/core/collision.ts +40 -0
  65. package/src/core/colors.ts +84 -0
  66. package/src/core/effectTree.ts +143 -0
  67. package/src/core/groups.ts +29 -0
  68. package/src/core/history.ts +77 -0
  69. package/src/core/loadEffect.ts +102 -0
  70. package/src/core/scrub.ts +28 -0
  71. package/src/core/shapes.ts +133 -0
  72. package/src/core/systems.ts +98 -0
  73. package/src/core/textureExport.ts +63 -0
  74. package/src/core/timeline.ts +94 -0
  75. package/src/core/values.ts +113 -0
  76. package/src/index.ts +32 -0
  77. package/src/react/CurveEditor.tsx +168 -0
  78. package/src/react/EffectEditor.tsx +111 -0
  79. package/src/react/EffectEditorHost.tsx +377 -0
  80. package/src/react/GradientEditor.tsx +127 -0
  81. package/src/react/ModuleSection.tsx +54 -0
  82. package/src/react/PromptDialog.tsx +85 -0
  83. package/src/react/SubEmittersModule.tsx +80 -0
  84. package/src/react/TimelinePanel.tsx +354 -0
  85. package/src/react/TimelineTrackRow.tsx +267 -0
  86. package/src/react/ValueField.tsx +60 -0
  87. package/src/react/behaviorModules.tsx +658 -0
  88. package/src/react/fields.tsx +76 -0
  89. package/src/react/index.ts +43 -0
  90. package/src/react/modules.tsx +1034 -0
  91. package/src/react/theme.ts +85 -0
@@ -0,0 +1,85 @@
1
+ import type {CSSProperties} from 'react';
2
+
3
+ export const theme = {
4
+ panelBg: 'linear-gradient(180deg, rgba(12, 18, 38, 0.92), rgba(6, 10, 22, 0.94))',
5
+ sectionBg: 'rgba(10, 16, 34, 0.6)',
6
+ border: '#2a365f',
7
+ borderActive: '#4f6fbe',
8
+ text: '#eef3ff',
9
+ textDim: '#b7c6ea',
10
+ accent: '#9eb9ff',
11
+ inputBg: 'rgba(7, 11, 22, 0.82)',
12
+ curveStroke: '#78a5ff',
13
+ font: 'Inter, Segoe UI, Roboto, sans-serif',
14
+ };
15
+
16
+ export const inputStyle: CSSProperties = {
17
+ background: theme.inputBg,
18
+ border: `1px solid ${theme.border}`,
19
+ borderRadius: 8,
20
+ color: theme.text,
21
+ fontSize: 12.5,
22
+ padding: '5px 8px',
23
+ outline: 'none',
24
+ width: '100%',
25
+ boxSizing: 'border-box',
26
+ fontFamily: theme.font,
27
+ };
28
+
29
+ export const rowStyle: CSSProperties = {
30
+ display: 'grid',
31
+ gridTemplateColumns: '110px 1fr',
32
+ alignItems: 'center',
33
+ gap: 8,
34
+ marginTop: 6,
35
+ };
36
+
37
+ export const labelStyle: CSSProperties = {
38
+ color: theme.textDim,
39
+ fontSize: 12,
40
+ whiteSpace: 'nowrap',
41
+ overflow: 'hidden',
42
+ textOverflow: 'ellipsis',
43
+ };
44
+
45
+ export const buttonStyle: CSSProperties = {
46
+ border: `1px solid #4563ad`,
47
+ background: 'rgba(28, 48, 98, 0.55)',
48
+ color: '#d8e3ff',
49
+ padding: '6px 10px',
50
+ borderRadius: 8,
51
+ fontSize: 12.5,
52
+ cursor: 'pointer',
53
+ fontFamily: theme.font,
54
+ };
55
+
56
+ /**
57
+ * Two hover conventions, applied via className (inline `style` can't express `:hover`):
58
+ * - `qe-hover` — brightens elements that already have a solid inline background/border
59
+ * (buttons, icon buttons, bars, gradient/curve handles, module headers).
60
+ * - `qe-hover-bg` — adds a background tint for elements left transparent by default (timeline
61
+ * rows), since brightening transparent does nothing. Must not be combined with an inline
62
+ * `background` on the same element or the tint would need `!important` to show through.
63
+ */
64
+ export const globalEditorStyles = `
65
+ .qe-hover, .qe-hover-bg {
66
+ transition: filter 0.12s ease, background 0.12s ease;
67
+ }
68
+ .qe-hover:hover:not(:disabled) {
69
+ filter: brightness(1.3);
70
+ }
71
+ .qe-hover:active:not(:disabled) {
72
+ filter: brightness(0.85);
73
+ }
74
+ .qe-hover:disabled {
75
+ opacity: 0.45;
76
+ cursor: default;
77
+ }
78
+ .qe-hover-bg:hover {
79
+ background: rgba(255, 255, 255, 0.07);
80
+ }
81
+ select.qe-hover:hover, input.qe-hover:hover, select.qe-hover:focus, input.qe-hover:focus {
82
+ border-color: ${theme.borderActive};
83
+ filter: none;
84
+ }
85
+ `;