fragment-tools 0.1.13 → 0.1.15

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 (184) hide show
  1. package/.prettierignore +1 -2
  2. package/.prettierrc +23 -7
  3. package/README.md +28 -9
  4. package/bin/index.js +70 -10
  5. package/package.json +14 -6
  6. package/src/cli/build.js +125 -0
  7. package/src/cli/create.js +238 -0
  8. package/src/cli/createConfig.js +82 -0
  9. package/src/cli/createFragmentFile.js +70 -0
  10. package/src/cli/getEntries.js +85 -0
  11. package/src/cli/log.js +36 -24
  12. package/src/cli/plugins/check-dependencies.js +88 -42
  13. package/src/cli/plugins/hot-shader-replacement.js +408 -0
  14. package/src/cli/plugins/hot-sketch-reload.js +21 -25
  15. package/src/cli/plugins/save.js +101 -0
  16. package/src/cli/preview.js +55 -0
  17. package/src/cli/prompts.js +260 -0
  18. package/src/cli/run.js +131 -0
  19. package/src/cli/templates/blank/index.js +33 -0
  20. package/src/cli/templates/blank/meta.json +4 -0
  21. package/src/cli/templates/default/index.js +39 -0
  22. package/src/cli/templates/default/meta.json +5 -0
  23. package/src/cli/templates/fragment-gl/index.js +37 -0
  24. package/src/cli/templates/fragment-gl/meta.json +4 -0
  25. package/src/cli/templates/p5/index.js +32 -0
  26. package/src/cli/templates/p5/meta.json +5 -0
  27. package/src/cli/templates/p5-webgl/fragment.fs +14 -0
  28. package/src/cli/templates/p5-webgl/index.js +67 -0
  29. package/src/cli/templates/p5-webgl/meta.json +5 -0
  30. package/src/cli/templates/three-fragment/fragment.fs +10 -0
  31. package/src/cli/templates/three-fragment/index.js +95 -0
  32. package/src/cli/templates/three-fragment/meta.json +5 -0
  33. package/src/cli/templates/three-orthographic/index.js +55 -0
  34. package/src/cli/templates/three-orthographic/meta.json +5 -0
  35. package/src/cli/templates/three-perspective/index.js +52 -0
  36. package/src/cli/templates/three-perspective/meta.json +5 -0
  37. package/src/cli/utils.js +70 -0
  38. package/src/cli/ws.js +87 -78
  39. package/src/client/app/App.svelte +3 -3
  40. package/src/client/app/client.js +55 -39
  41. package/src/client/app/components/IconCross.svelte +18 -18
  42. package/src/client/app/components/Init.svelte +40 -8
  43. package/src/client/app/components/KeyBinding.svelte +22 -22
  44. package/src/client/app/helpers.js +42 -0
  45. package/src/client/app/hooks.js +20 -0
  46. package/src/client/app/inputs/Input.js +9 -9
  47. package/src/client/app/inputs/Keyboard.js +13 -15
  48. package/src/client/app/inputs/MIDI.js +14 -15
  49. package/src/client/app/inputs/Mouse.js +1 -1
  50. package/src/client/app/inputs/Webcam.js +89 -88
  51. package/src/client/app/lib/canvas-recorder/CanvasRecorder.js +41 -21
  52. package/src/client/app/lib/canvas-recorder/FrameRecorder.js +7 -6
  53. package/src/client/app/lib/canvas-recorder/H264Recorder.js +45 -0
  54. package/src/client/app/lib/canvas-recorder/MP4Recorder.js +7 -9
  55. package/src/client/app/lib/canvas-recorder/WebMRecorder.js +3 -4
  56. package/src/client/app/lib/canvas-recorder/mp4.js +1649 -15
  57. package/src/client/app/lib/canvas-recorder/utils.js +33 -17
  58. package/src/client/app/lib/gl/Geometry.js +11 -8
  59. package/src/client/app/lib/gl/Program.js +38 -19
  60. package/src/client/app/lib/gl/Renderer.js +163 -156
  61. package/src/client/app/lib/gl/Texture.js +113 -85
  62. package/src/client/app/lib/gl/index.js +12 -12
  63. package/src/client/app/lib/gl/utils.js +1 -3
  64. package/src/client/app/lib/helpers/frameDebounce.js +30 -30
  65. package/src/client/app/lib/loader/index.js +10 -10
  66. package/src/client/app/lib/loader/loadImage.js +15 -15
  67. package/src/client/app/lib/loader/loadScript.js +1 -1
  68. package/src/client/app/lib/paper-sizes.js +75 -76
  69. package/src/client/app/lib/presets.js +25 -5
  70. package/src/client/app/lib/tempo/Analyser.js +18 -17
  71. package/src/client/app/lib/tempo/Range.js +15 -12
  72. package/src/client/app/lib/tempo/index.js +34 -27
  73. package/src/client/app/modules/AudioAnalyser/Range.svelte +69 -72
  74. package/src/client/app/modules/AudioAnalyser/Spectrum.svelte +20 -19
  75. package/src/client/app/modules/AudioAnalyser.svelte +52 -35
  76. package/src/client/app/modules/Console/ConsoleLine.svelte +193 -172
  77. package/src/client/app/modules/Console.svelte +76 -74
  78. package/src/client/app/modules/Exports.svelte +62 -43
  79. package/src/client/app/modules/MidiPanel.svelte +100 -101
  80. package/src/client/app/modules/Monitor.svelte +57 -57
  81. package/src/client/app/modules/Params.svelte +128 -103
  82. package/src/client/app/renderers/2DRenderer.js +3 -3
  83. package/src/client/app/renderers/FragmentRenderer.js +30 -23
  84. package/src/client/app/renderers/P5GLRenderer.js +144 -0
  85. package/src/client/app/renderers/P5Renderer.js +10 -7
  86. package/src/client/app/renderers/THREERenderer.js +136 -94
  87. package/src/client/app/stores/audioAnalysis.js +3 -4
  88. package/src/client/app/stores/console.js +9 -10
  89. package/src/client/app/stores/errors.js +1 -1
  90. package/src/client/app/stores/exports.js +36 -20
  91. package/src/client/app/stores/index.js +2 -2
  92. package/src/client/app/stores/layout.js +143 -138
  93. package/src/client/app/stores/multisampling.js +4 -4
  94. package/src/client/app/stores/props.js +76 -13
  95. package/src/client/app/stores/renderers.js +26 -15
  96. package/src/client/app/stores/rendering.js +108 -89
  97. package/src/client/app/stores/sketches.js +7 -9
  98. package/src/client/app/stores/time.js +18 -18
  99. package/src/client/app/stores/utils.js +95 -38
  100. package/src/client/app/transitions/fade.js +3 -3
  101. package/src/client/app/transitions/index.js +6 -7
  102. package/src/client/app/transitions/splitX.js +2 -2
  103. package/src/client/app/transitions/splitY.js +2 -2
  104. package/src/client/app/triggers/Keyboard.js +88 -79
  105. package/src/client/app/triggers/MIDI.js +110 -84
  106. package/src/client/app/triggers/Mouse.js +73 -65
  107. package/src/client/app/triggers/Trigger.js +59 -58
  108. package/src/client/app/triggers/index.js +7 -7
  109. package/src/client/app/triggers/shared.js +5 -5
  110. package/src/client/app/ui/Build.svelte +70 -71
  111. package/src/client/app/ui/ErrorOverlay.svelte +118 -104
  112. package/src/client/app/ui/Field.svelte +393 -258
  113. package/src/client/app/ui/FieldGroup.svelte +106 -94
  114. package/src/client/app/ui/FieldSection.svelte +127 -116
  115. package/src/client/app/ui/FieldSpace.svelte +29 -30
  116. package/src/client/app/ui/FieldTrigger.svelte +256 -244
  117. package/src/client/app/ui/FieldTriggers.svelte +46 -46
  118. package/src/client/app/ui/FloatingParams.svelte +29 -30
  119. package/src/client/app/ui/Layout.svelte +31 -32
  120. package/src/client/app/ui/LayoutColumn.svelte +4 -4
  121. package/src/client/app/ui/LayoutComponent.svelte +239 -225
  122. package/src/client/app/ui/LayoutResizer.svelte +195 -176
  123. package/src/client/app/ui/LayoutRoot.svelte +6 -6
  124. package/src/client/app/ui/LayoutRow.svelte +4 -4
  125. package/src/client/app/ui/LayoutToolbar.svelte +191 -194
  126. package/src/client/app/ui/Module.svelte +134 -135
  127. package/src/client/app/ui/ModuleHeaderAction.svelte +81 -78
  128. package/src/client/app/ui/ModuleHeaderButton.svelte +12 -12
  129. package/src/client/app/ui/ModuleHeaderSelect.svelte +47 -37
  130. package/src/client/app/ui/ModuleRenderer.svelte +26 -27
  131. package/src/client/app/ui/OutputRenderer.svelte +112 -105
  132. package/src/client/app/ui/ParamsMultisampling.svelte +96 -95
  133. package/src/client/app/ui/ParamsOutput.svelte +130 -113
  134. package/src/client/app/ui/Preview.svelte +7 -8
  135. package/src/client/app/ui/SelectChevrons.svelte +27 -15
  136. package/src/client/app/ui/SketchRenderer.svelte +780 -667
  137. package/src/client/app/ui/SketchSelect.svelte +50 -44
  138. package/src/client/app/ui/fields/ButtonInput.svelte +61 -48
  139. package/src/client/app/ui/fields/CheckboxInput.svelte +67 -61
  140. package/src/client/app/ui/fields/ColorInput.svelte +294 -238
  141. package/src/client/app/ui/fields/FieldInputRow.svelte +8 -8
  142. package/src/client/app/ui/fields/ImageInput.svelte +123 -121
  143. package/src/client/app/ui/fields/Input.svelte +100 -111
  144. package/src/client/app/ui/fields/IntervalInput.svelte +268 -0
  145. package/src/client/app/ui/fields/ListInput.svelte +96 -96
  146. package/src/client/app/ui/fields/NumberInput.svelte +120 -116
  147. package/src/client/app/ui/fields/ProgressInput.svelte +99 -73
  148. package/src/client/app/ui/fields/Select.svelte +137 -124
  149. package/src/client/app/ui/fields/TextInput.svelte +10 -11
  150. package/src/client/app/ui/fields/VectorInput.svelte +86 -82
  151. package/src/client/app/utils/canvas.utils.js +189 -208
  152. package/src/client/app/utils/color.utils.js +138 -101
  153. package/src/client/app/utils/fields.utils.js +131 -0
  154. package/src/client/app/utils/file.utils.js +209 -37
  155. package/src/client/app/utils/glsl.utils.js +2 -2
  156. package/src/client/app/utils/glslErrors.js +49 -31
  157. package/src/client/app/utils/index.js +32 -29
  158. package/src/client/app/utils/math.utils.js +14 -10
  159. package/src/client/index.html +16 -16
  160. package/src/client/main.js +4 -4
  161. package/src/client/public/css/global.css +26 -16
  162. package/src/cli/db.js +0 -17
  163. package/src/cli/index.js +0 -198
  164. package/src/cli/plugins/db.js +0 -12
  165. package/src/cli/plugins/hot-shader-reload.js +0 -86
  166. package/src/cli/plugins/screenshot.js +0 -46
  167. package/src/cli/server.js +0 -153
  168. package/src/cli/templates/2d.js +0 -15
  169. package/src/cli/templates/blank.js +0 -13
  170. package/src/cli/templates/fragment.js +0 -18
  171. package/src/cli/templates/index.js +0 -27
  172. package/src/cli/templates/p5.js +0 -13
  173. package/src/cli/templates/three-fragment.js +0 -53
  174. package/src/cli/templates/three-orthographic.js +0 -23
  175. package/src/cli/templates/three-perspective.js +0 -20
  176. package/src/client/app/lib/canvas-recorder/FFMPEGRecorder.js +0 -56
  177. package/src/client/app/utils/props.utils.js +0 -51
  178. package/src/client/public/fonts/Inter-Bold.woff2 +0 -0
  179. package/src/client/public/fonts/Inter-Italic.woff2 +0 -0
  180. package/src/client/public/fonts/Inter-Regular.woff2 +0 -0
  181. package/src/client/public/fonts/Inter-SemiBold.woff2 +0 -0
  182. package/src/client/public/js/ffmpeg.min.js +0 -2
  183. package/src/client/public/js/ffmpeg.min.js.map +0 -1
  184. /package/src/cli/templates/{fragment.fs → fragment-gl/fragment.fs} +0 -0
@@ -1,23 +1,27 @@
1
1
  <script>
2
- import { onDestroy, onMount } from "svelte";
3
- import { fragment, Texture } from "../lib/gl";
4
- import { transitions } from "../transitions/index.js";
5
- import { rendering, monitors } from "../stores/rendering.js";
6
- import { multisampling, threshold, transition } from "../stores/multisampling.js";
7
-
8
- export let paused = false;
9
-
10
- let _raf;
11
- let canvas;
12
- let output;
13
- let _mounted;
14
- let uniforms = {
15
- threshold: { value: 0, type: "float" },
16
- uSampler0: { value: null, type: "sampler2D" },
17
- uSampler1: { value: null, type: "sampler2D" },
18
- }
19
-
20
- let defaultFragmentShader = /* glsl */`
2
+ import { onDestroy, onMount } from 'svelte';
3
+ import { fragment, Texture } from '../lib/gl';
4
+ import { transitions } from '../transitions/index.js';
5
+ import { rendering, monitors } from '../stores/rendering.js';
6
+ import {
7
+ multisampling,
8
+ threshold,
9
+ transition,
10
+ } from '../stores/multisampling.js';
11
+
12
+ export let paused = false;
13
+
14
+ let _raf;
15
+ let canvas;
16
+ let output;
17
+ let _mounted;
18
+ let uniforms = {
19
+ threshold: { value: 0, type: 'float' },
20
+ uSampler0: { value: null, type: 'sampler2D' },
21
+ uSampler1: { value: null, type: 'sampler2D' },
22
+ };
23
+
24
+ let defaultFragmentShader = /* glsl */ `
21
25
  precision highp float;
22
26
 
23
27
  uniform float threshold;
@@ -36,114 +40,117 @@ void main() {
36
40
  }
37
41
  `;
38
42
 
39
- $: t = transitions[$transition];
40
- $: fragmentShader = t ? t.fragmentShader : defaultFragmentShader;
41
- $: {
42
- if (output) {
43
- output.fragmentShader = fragmentShader;
44
- }
45
- }
43
+ $: t = transitions[$transition];
44
+ $: fragmentShader = t ? t.fragmentShader : defaultFragmentShader;
45
+ $: {
46
+ if (output) {
47
+ output.fragmentShader = fragmentShader;
48
+ }
49
+ }
46
50
 
47
- onMount(() => {
48
- output = fragment({
49
- canvas,
50
- shader: fragmentShader,
51
- uniforms,
52
- });
51
+ onMount(() => {
52
+ output = fragment({
53
+ canvas,
54
+ shader: fragmentShader,
55
+ uniforms,
56
+ });
53
57
 
54
- uniforms.uSampler0.value = new Texture(output.gl);
55
- uniforms.uSampler1.value = new Texture(output.gl);
58
+ uniforms.uSampler0.value = new Texture(output.gl);
59
+ uniforms.uSampler1.value = new Texture(output.gl);
56
60
 
57
- assignTextures();
58
- resize();
59
- render();
61
+ assignTextures();
62
+ resize();
63
+ render();
60
64
 
61
- rendering.subscribe(() => {
62
- resize();
63
- });
65
+ rendering.subscribe(() => {
66
+ resize();
67
+ });
64
68
 
65
- _mounted = true;
66
- });
69
+ _mounted = true;
70
+ });
67
71
 
68
- onDestroy(() => {
69
- cancelAnimationFrame(_raf);
72
+ onDestroy(() => {
73
+ cancelAnimationFrame(_raf);
70
74
 
71
- output.destroy();
72
- output = null;
73
- });
75
+ output.destroy();
76
+ output = null;
77
+ });
74
78
 
75
- function assignTextures([monitorID0, monitorID1] = $multisampling) {
76
- if (!output) return;
79
+ function assignTextures([monitorID0, monitorID1] = $multisampling) {
80
+ if (!output) return;
77
81
 
78
- if (monitorID0 >= 0) {
79
- uniforms.uSampler0.value.image = $monitors.find((monitor) => monitor.id === monitorID0).canvas;
80
- }
82
+ if (monitorID0 >= 0) {
83
+ uniforms.uSampler0.value.image = $monitors.find(
84
+ (monitor) => monitor.id === monitorID0,
85
+ ).canvas;
86
+ }
81
87
 
82
- if (monitorID1 >= 0) {
83
- uniforms.uSampler1.value.image = $monitors.find((monitor) => monitor.id === monitorID1).canvas;
84
- }
85
- }
88
+ if (monitorID1 >= 0) {
89
+ uniforms.uSampler1.value.image = $monitors.find(
90
+ (monitor) => monitor.id === monitorID1,
91
+ ).canvas;
92
+ }
93
+ }
86
94
 
87
- multisampling.subscribe(assignTextures);
95
+ multisampling.subscribe(assignTextures);
88
96
 
89
- function render() {
90
- uniforms.threshold.value = $threshold;
97
+ function render() {
98
+ uniforms.threshold.value = $threshold;
91
99
 
92
- if (!paused) {
93
- uniforms.uSampler0.value.needsUpdate = true;
94
- uniforms.uSampler1.value.needsUpdate = true;
100
+ if (!paused) {
101
+ uniforms.uSampler0.value.needsUpdate = true;
102
+ uniforms.uSampler1.value.needsUpdate = true;
95
103
 
96
- output.render();
97
- }
104
+ output.render();
105
+ }
98
106
 
99
- _raf = requestAnimationFrame(render);
100
- }
101
-
102
- function resize() {
103
- if (!output) return;
107
+ _raf = requestAnimationFrame(render);
108
+ }
104
109
 
105
- const { width, height, pixelRatio } = $rendering;
110
+ function resize() {
111
+ if (!output) return;
106
112
 
107
- output.resize({
108
- width,
109
- height,
110
- pixelRatio,
111
- })
112
- }
113
+ const { width, height, pixelRatio } = $rendering;
113
114
 
115
+ output.resize({
116
+ width,
117
+ height,
118
+ pixelRatio,
119
+ });
120
+ }
114
121
  </script>
115
122
 
116
123
  <div class="output-renderer">
117
- <div class="canvas-container" style="max-width: {$rendering.width}px;">
118
- <canvas bind:this={canvas}></canvas>
119
- </div>
124
+ <div class="canvas-container" style="max-width: {$rendering.width}px;">
125
+ <canvas bind:this={canvas}></canvas>
126
+ </div>
120
127
  </div>
121
128
 
122
129
  <style>
123
- .output-renderer {
124
- position: relative;
125
- display: flex;
126
- width: 100%;
127
- height: 100%;
128
- justify-content: center;
129
-
130
- background-color: var(--background-color, var(--color-lightblack));
131
- }
132
-
133
- .output-renderer :global(canvas) {
134
- max-width: 100%;
135
- max-height: 100%;
136
- background: black;
137
-
138
- width: auto !important;
139
- height: auto !important;
140
- }
141
-
142
- .canvas-container {
143
- position: relative;
144
- display: flex;
145
- align-items: center;
146
- height: 100%;
147
- max-height: 100%;
148
- }
130
+ .output-renderer {
131
+ position: relative;
132
+ display: flex;
133
+ width: 100%;
134
+ height: 100%;
135
+ justify-content: center;
136
+
137
+ background-color: var(--background-color, var(--color-lightblack));
138
+ }
139
+
140
+ .output-renderer :global(canvas) {
141
+ max-width: 100%;
142
+ max-height: 100%;
143
+ background: black;
144
+
145
+ width: auto !important;
146
+ height: auto !important;
147
+ }
148
+
149
+ .canvas-container {
150
+ position: relative;
151
+ display: flex;
152
+ align-items: center;
153
+ height: 100%;
154
+ max-height: 100%;
155
+ }
149
156
  </style>
@@ -1,109 +1,110 @@
1
1
  <script>
2
- import { multisampling, threshold, transition } from "../stores/multisampling.js";
3
- import { monitors } from "../stores/rendering.js";
4
- import { transitions } from "../transitions/index.js";
5
- import Field from "./Field.svelte";
6
- import FieldGroup from "./FieldGroup.svelte";
2
+ import {
3
+ multisampling,
4
+ threshold,
5
+ transition,
6
+ } from '../stores/multisampling.js';
7
+ import { monitors } from '../stores/rendering.js';
8
+ import { transitions } from '../transitions/index.js';
9
+ import Field from './Field.svelte';
10
+ import FieldGroup from './FieldGroup.svelte';
7
11
 
8
- let monitorDisabled = false;
9
- let sampler0 = -1;
10
- let sampler1 = -1;
12
+ let monitorDisabled = false;
13
+ let sampler0 = -1;
14
+ let sampler1 = -1;
11
15
 
12
- const transitionOptions = Object.keys(transitions).map((key) => {
13
- const transition = transitions[key];
14
- const label = transition.name ? transition.name : key;
15
- return { value: key, label };
16
- });
17
-
18
- if (!$transition) {
19
- $transition = transitionOptions[0].value;
20
- }
16
+ const transitionOptions = Object.keys(transitions).map((key) => {
17
+ const transition = transitions[key];
18
+ const label = transition.name ? transition.name : key;
19
+ return { value: key, label };
20
+ });
21
21
 
22
- $: samplerOptions = $monitors
23
- .map((monitor, index) => ({ label: `monitor ${index+1}`, value: monitor.id })) // set index first so it matches <Monitor>
24
- .filter((option) => {
25
- const monitor = $monitors.find((m) => m.id === option.value);
22
+ if (!$transition) {
23
+ $transition = transitionOptions[0].value;
24
+ }
26
25
 
27
- return monitor.selected !== "output";
28
- });
29
- $: {
30
- monitorDisabled = samplerOptions.length === 0;
26
+ $: samplerOptions = $monitors
27
+ .map((monitor, index) => ({
28
+ label: `monitor ${index + 1}`,
29
+ value: monitor.id,
30
+ })) // set index first so it matches <Monitor>
31
+ .filter((option) => {
32
+ const monitor = $monitors.find((m) => m.id === option.value);
31
33
 
32
- if (samplerOptions.length === 0) {
33
- samplerOptions = [
34
- { label: `No monitor available.`, value: -1 }
35
- ];
36
- sampler0 = samplerOptions[0].value;
37
- sampler1 = samplerOptions[0].value;
38
- } else {
39
- if (sampler0 < 0) {
40
- sampler0 = samplerOptions[0].value;
41
- }
34
+ return monitor.selected !== 'output';
35
+ });
36
+ $: {
37
+ monitorDisabled = samplerOptions.length === 0;
42
38
 
43
- if (sampler1 < 0) {
44
- sampler1 = samplerOptions.length > 1 ? samplerOptions[1].value : -1;
45
- }
46
- }
39
+ if (samplerOptions.length === 0) {
40
+ samplerOptions = [{ label: `No monitor available.`, value: -1 }];
41
+ sampler0 = samplerOptions[0].value;
42
+ sampler1 = samplerOptions[0].value;
43
+ } else {
44
+ if (sampler0 < 0) {
45
+ sampler0 = samplerOptions[0].value;
46
+ }
47
47
 
48
- $multisampling = [sampler0, sampler1];
49
- }
48
+ if (sampler1 < 0) {
49
+ sampler1 =
50
+ samplerOptions.length > 1 ? samplerOptions[1].value : -1;
51
+ }
52
+ }
50
53
 
54
+ $multisampling = [sampler0, sampler1];
55
+ }
51
56
  </script>
57
+
52
58
  <FieldGroup name="monitors">
53
- <Field
54
- key="sampler0"
55
- value={sampler0}
56
- on:change={event => {
57
- sampler0 = Number(event.detail);
58
- }}
59
- params={
60
- {
61
- options: samplerOptions,
62
- disabled: monitorDisabled
63
- }
64
- }
65
- />
66
- <Field
67
- key="sampler1"
68
- value={sampler1}
69
- on:change={event => {
70
- sampler1 = Number(event.detail);
71
- }}
72
- params={
73
- {
74
- options: samplerOptions,
75
- disabled: monitorDisabled
76
- }
77
- }
78
- />
59
+ <Field
60
+ key="sampler0"
61
+ value={sampler0}
62
+ on:change={(event) => {
63
+ sampler0 = Number(event.detail);
64
+ }}
65
+ params={{
66
+ options: samplerOptions,
67
+ }}
68
+ disabled={monitorDisabled}
69
+ />
70
+ <Field
71
+ key="sampler1"
72
+ value={sampler1}
73
+ on:change={(event) => {
74
+ sampler1 = Number(event.detail);
75
+ }}
76
+ params={{
77
+ options: samplerOptions,
78
+ }}
79
+ disabled={monitorDisabled}
80
+ />
79
81
  </FieldGroup>
80
82
  <FieldGroup name="transition">
81
- <Field
82
- key="type"
83
- value={$transition}
84
- on:change={(event) => {
85
- $transition = event.detail;
86
- }}
87
- params={{
88
- options: transitionOptions,
89
- }}
90
- />
91
- <Field
92
- key="threshold"
93
- value={$threshold}
94
- on:change={(event) => $threshold = event.detail }
95
- params={{
96
- step: 0.01,
97
- min: 0,
98
- max: 1,
99
- }}
100
- />
101
- <Field
102
- key="switch"
103
- value={() => $threshold = 1 - Math.round($threshold)}
104
- params={{
105
- label: `switch ${Math.round($threshold) > 0 ? `<` : `>`}`
106
- }}
107
- />
108
-
83
+ <Field
84
+ key="type"
85
+ value={$transition}
86
+ on:change={(event) => {
87
+ $transition = event.detail;
88
+ }}
89
+ params={{
90
+ options: transitionOptions,
91
+ }}
92
+ />
93
+ <Field
94
+ key="threshold"
95
+ value={$threshold}
96
+ on:change={(event) => ($threshold = event.detail)}
97
+ params={{
98
+ step: 0.01,
99
+ min: 0,
100
+ max: 1,
101
+ }}
102
+ />
103
+ <Field
104
+ key="switch"
105
+ value={() => ($threshold = 1 - Math.round($threshold))}
106
+ params={{
107
+ label: `switch ${Math.round($threshold) > 0 ? `<` : `>`}`,
108
+ }}
109
+ />
109
110
  </FieldGroup>