svelte-tweakpane-ui 1.5.11 → 1.5.13
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.
- package/dist/control/Button.svelte +5 -5
- package/dist/control/Button.svelte.d.ts +5 -5
- package/dist/control/ButtonGrid.svelte +5 -5
- package/dist/control/ButtonGrid.svelte.d.ts +32 -34
- package/dist/control/Checkbox.svelte.d.ts +9 -13
- package/dist/control/Color.svelte +3 -4
- package/dist/control/Color.svelte.d.ts +94 -99
- package/dist/control/CubicBezier.svelte +5 -5
- package/dist/control/CubicBezier.svelte.d.ts +43 -47
- package/dist/control/File.svelte +3 -3
- package/dist/control/File.svelte.d.ts +34 -38
- package/dist/control/Image.svelte +3 -3
- package/dist/control/Image.svelte.d.ts +31 -35
- package/dist/control/IntervalSlider.svelte +1 -1
- package/dist/control/IntervalSlider.svelte.d.ts +103 -108
- package/dist/control/List.svelte +5 -5
- package/dist/control/List.svelte.d.ts +24 -28
- package/dist/control/Point.svelte +9 -9
- package/dist/control/Point.svelte.d.ts +142 -147
- package/dist/control/RadioGrid.svelte +3 -4
- package/dist/control/RadioGrid.svelte.d.ts +60 -64
- package/dist/control/Ring.svelte +1 -1
- package/dist/control/Ring.svelte.d.ts +105 -109
- package/dist/control/RotationEuler.svelte +5 -5
- package/dist/control/RotationEuler.svelte.d.ts +110 -115
- package/dist/control/RotationQuaternion.svelte +5 -5
- package/dist/control/RotationQuaternion.svelte.d.ts +108 -113
- package/dist/control/Slider.svelte +1 -1
- package/dist/control/Slider.svelte.d.ts +95 -99
- package/dist/control/Stepper.svelte +1 -1
- package/dist/control/Stepper.svelte.d.ts +95 -99
- package/dist/control/Text.svelte +1 -1
- package/dist/control/Text.svelte.d.ts +25 -29
- package/dist/control/Textarea.svelte +2 -2
- package/dist/control/Textarea.svelte.d.ts +34 -38
- package/dist/control/Wheel.svelte +1 -1
- package/dist/control/Wheel.svelte.d.ts +101 -104
- package/dist/core/Binding.svelte +5 -5
- package/dist/core/Binding.svelte.d.ts +9 -14
- package/dist/core/Blade.svelte +3 -3
- package/dist/core/Blade.svelte.d.ts +5 -7
- package/dist/core/Folder.svelte +4 -4
- package/dist/core/Folder.svelte.d.ts +5 -5
- package/dist/core/Pane.svelte +3 -3
- package/dist/core/Pane.svelte.d.ts +217 -221
- package/dist/core/Separator.svelte +1 -1
- package/dist/core/Separator.svelte.d.ts +0 -2
- package/dist/core/TabGroup.svelte +4 -4
- package/dist/core/TabGroup.svelte.d.ts +3 -3
- package/dist/core/TabPage.svelte +4 -4
- package/dist/core/TabPage.svelte.d.ts +4 -4
- package/dist/extra/AutoObject.svelte +5 -5
- package/dist/extra/AutoObject.svelte.d.ts +4 -5
- package/dist/extra/AutoValue.svelte.d.ts +9 -13
- package/dist/extra/Element.svelte +1 -1
- package/dist/extra/Element.svelte.d.ts +23 -25
- package/dist/internal/ClsPad.svelte +3 -2
- package/dist/internal/GenericBinding.svelte +2 -2
- package/dist/internal/GenericBinding.svelte.d.ts +8 -11
- package/dist/internal/GenericBladeFolding.svelte +1 -1
- package/dist/internal/GenericBladeFolding.svelte.d.ts +25 -27
- package/dist/internal/GenericInput.svelte.d.ts +8 -11
- package/dist/internal/GenericInputFolding.svelte.d.ts +78 -81
- package/dist/internal/GenericMonitor.svelte.d.ts +76 -79
- package/dist/internal/GenericPane.svelte +4 -4
- package/dist/internal/GenericPane.svelte.d.ts +6 -7
- package/dist/internal/GenericSlider.svelte +1 -1
- package/dist/internal/GenericSlider.svelte.d.ts +100 -101
- package/dist/internal/InternalMonitorBoolean.svelte +2 -2
- package/dist/internal/InternalMonitorBoolean.svelte.d.ts +79 -82
- package/dist/internal/InternalMonitorNumber.svelte +3 -3
- package/dist/internal/InternalMonitorNumber.svelte.d.ts +100 -103
- package/dist/internal/InternalMonitorString.svelte +2 -2
- package/dist/internal/InternalMonitorString.svelte.d.ts +84 -87
- package/dist/internal/InternalPaneDraggable.svelte +5 -5
- package/dist/internal/InternalPaneDraggable.svelte.d.ts +86 -88
- package/dist/internal/InternalPaneFixed.svelte.d.ts +26 -27
- package/dist/internal/InternalPaneInline.svelte +1 -1
- package/dist/internal/InternalPaneInline.svelte.d.ts +13 -14
- package/dist/monitor/FpsGraph.svelte +5 -5
- package/dist/monitor/FpsGraph.svelte.d.ts +45 -47
- package/dist/monitor/Monitor.svelte +1 -1
- package/dist/monitor/Monitor.svelte.d.ts +316 -331
- package/dist/monitor/Profiler.svelte +3 -3
- package/dist/monitor/Profiler.svelte.d.ts +51 -59
- package/dist/monitor/WaveformMonitor.svelte +5 -5
- package/dist/monitor/WaveformMonitor.svelte.d.ts +102 -105
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +0 -1
- package/dist/utils.d.ts +5 -5
- package/dist/utils.js +2 -4
- package/license.txt +1 -1
- package/package.json +26 -31
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { ValueChangeEvent } from '../utils.js'
|
|
3
2
|
import type { RingSeries } from '@kitschpatrol/tweakpane-plugin-camerakit/dist/types/util.js'
|
|
3
|
+
import type { ValueChangeEvent } from '../utils.js'
|
|
4
4
|
type RingUnit = {
|
|
5
5
|
/**
|
|
6
6
|
* The value for the unit.
|
|
@@ -28,38 +28,79 @@ type RingUnit = {
|
|
|
28
28
|
export type { RingSeries, RingUnit }
|
|
29
29
|
export type RingChangeEvent = ValueChangeEvent<number>
|
|
30
30
|
declare const __propDef: {
|
|
31
|
-
props:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
31
|
+
props: Omit<
|
|
32
|
+
Omit<
|
|
33
|
+
{
|
|
34
|
+
/**
|
|
35
|
+
* The binding's target object with values to manipulate.
|
|
36
|
+
* @bindable
|
|
37
|
+
*/
|
|
38
|
+
object: import('@tweakpane/core').Bindable & Record<string, number>
|
|
39
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
40
|
+
key: string
|
|
41
|
+
/**
|
|
42
|
+
* Prevent interactivity and gray out the control.
|
|
43
|
+
* @default `false`
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean
|
|
46
|
+
/**
|
|
47
|
+
* Text displayed next to control.
|
|
48
|
+
* @default `undefined`
|
|
49
|
+
*/
|
|
50
|
+
label?: string | undefined
|
|
51
|
+
/**
|
|
52
|
+
* Tweakpane's internal options object.
|
|
53
|
+
*
|
|
54
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
55
|
+
*
|
|
56
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
57
|
+
*
|
|
58
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
59
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
60
|
+
* Tweakpane UI_.
|
|
61
|
+
* @default `undefined`
|
|
62
|
+
*/
|
|
63
|
+
options?: import('tweakpane').NumberInputParams | undefined
|
|
64
|
+
/**
|
|
65
|
+
* Custom color scheme.
|
|
66
|
+
* @default `undefined` \
|
|
67
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
68
|
+
* set with `setGlobalDefaultTheme()`.
|
|
69
|
+
*/
|
|
70
|
+
theme?: import('..').Theme | undefined
|
|
71
|
+
/**
|
|
72
|
+
* Reference to internal Tweakpane
|
|
73
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
74
|
+
* this control.
|
|
75
|
+
*
|
|
76
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
77
|
+
* components wrapping `<Binding>`'s functionality.
|
|
78
|
+
*
|
|
79
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
80
|
+
* @bindable
|
|
81
|
+
* @readonly
|
|
82
|
+
*/
|
|
83
|
+
ref?: import('tweakpane').SliderInputBindingApi | undefined
|
|
84
|
+
/**
|
|
85
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
86
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
87
|
+
*
|
|
88
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
89
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
90
|
+
*
|
|
91
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
92
|
+
* @default `undefined`
|
|
93
|
+
*/
|
|
94
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
95
|
+
},
|
|
96
|
+
'object' | 'key'
|
|
97
|
+
> & {
|
|
56
98
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
60
|
-
* @default `undefined`
|
|
99
|
+
* A `number` value to control.
|
|
100
|
+
* @bindable
|
|
61
101
|
*/
|
|
62
|
-
|
|
102
|
+
value: number
|
|
103
|
+
} & {
|
|
63
104
|
/**
|
|
64
105
|
* A function to customize the point value's string representation (e.g. rounding, etc.).
|
|
65
106
|
* @default `undefined` \
|
|
@@ -72,6 +113,20 @@ declare const __propDef: {
|
|
|
72
113
|
* Or `stepValue` if defined.
|
|
73
114
|
*/
|
|
74
115
|
keyScale?: number
|
|
116
|
+
/**
|
|
117
|
+
* Maximum value.
|
|
118
|
+
*
|
|
119
|
+
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
120
|
+
* @default `undefined`
|
|
121
|
+
*/
|
|
122
|
+
max?: number
|
|
123
|
+
/**
|
|
124
|
+
* Minimum value.
|
|
125
|
+
*
|
|
126
|
+
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
127
|
+
* @default `undefined`
|
|
128
|
+
*/
|
|
129
|
+
min?: number
|
|
75
130
|
/**
|
|
76
131
|
* The unit scale for pointer-based input for all dimensions.
|
|
77
132
|
* @default `undefined` \
|
|
@@ -91,83 +146,25 @@ declare const __propDef: {
|
|
|
91
146
|
* @default `false`
|
|
92
147
|
*/
|
|
93
148
|
wide?: boolean
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* A `number` value to control.
|
|
97
|
-
* @bindable
|
|
98
|
-
*/
|
|
99
|
-
value: number
|
|
100
|
-
} & Omit<
|
|
101
|
-
{
|
|
102
|
-
/**
|
|
103
|
-
* The binding's target object with values to manipulate.
|
|
104
|
-
* @bindable
|
|
105
|
-
*/
|
|
106
|
-
object: import('@tweakpane/core').Bindable & Record<string, number>
|
|
107
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
108
|
-
key: string
|
|
109
|
-
/**
|
|
110
|
-
* Prevent interactivity and gray out the control.
|
|
111
|
-
* @default `false`
|
|
112
|
-
*/
|
|
113
|
-
disabled?: boolean
|
|
114
|
-
/**
|
|
115
|
-
* Text displayed next to control.
|
|
116
|
-
* @default `undefined`
|
|
117
|
-
*/
|
|
118
|
-
label?: string | undefined
|
|
119
|
-
/**
|
|
120
|
-
* Tweakpane's internal options object.
|
|
121
|
-
*
|
|
122
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
123
|
-
*
|
|
124
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
125
|
-
*
|
|
126
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
127
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
128
|
-
* Tweakpane UI_.
|
|
129
|
-
* @default `undefined`
|
|
130
|
-
*/
|
|
131
|
-
options?: import('tweakpane').NumberInputParams | undefined
|
|
132
|
-
/**
|
|
133
|
-
* Custom color scheme.
|
|
134
|
-
*
|
|
135
|
-
* @default `undefined` \
|
|
136
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
137
|
-
* set with `setGlobalDefaultTheme()`.
|
|
138
|
-
*/
|
|
139
|
-
theme?: import('..').Theme | undefined
|
|
140
|
-
/**
|
|
141
|
-
* Reference to internal Tweakpane
|
|
142
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
143
|
-
* this control.
|
|
144
|
-
*
|
|
145
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
146
|
-
* components wrapping `<Binding>`'s functionality.
|
|
147
|
-
*
|
|
148
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
149
|
-
*
|
|
150
|
-
* @bindable
|
|
151
|
-
* @readonly
|
|
152
|
-
*/
|
|
153
|
-
ref?: import('tweakpane').SliderInputBindingApi | undefined
|
|
154
|
-
/**
|
|
155
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
156
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
157
|
-
*
|
|
158
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
159
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
160
|
-
*
|
|
161
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
162
|
-
*
|
|
163
|
-
* @default `undefined`
|
|
164
|
-
*/
|
|
165
|
-
plugin?: import('../utils.js').Plugin | undefined
|
|
166
|
-
},
|
|
167
|
-
'object' | 'key'
|
|
168
|
-
>,
|
|
149
|
+
},
|
|
169
150
|
'ref' | 'options' | 'plugin'
|
|
170
|
-
>
|
|
151
|
+
> & {
|
|
152
|
+
/**
|
|
153
|
+
* A `number` value to control.
|
|
154
|
+
* @bindable
|
|
155
|
+
*/
|
|
156
|
+
value: number
|
|
157
|
+
/**
|
|
158
|
+
* Style variations.
|
|
159
|
+
* @default `0`
|
|
160
|
+
*/
|
|
161
|
+
series?: RingSeries
|
|
162
|
+
/**
|
|
163
|
+
* Density and value mapping of the ring's tick marks.
|
|
164
|
+
* @default `{ ticks: 5, pixels: 40, value: 10 }`
|
|
165
|
+
*/
|
|
166
|
+
unit?: RingUnit
|
|
167
|
+
}
|
|
171
168
|
slots: {}
|
|
172
169
|
events: {
|
|
173
170
|
/**
|
|
@@ -177,10 +174,9 @@ declare const __propDef: {
|
|
|
177
174
|
*
|
|
178
175
|
* The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
|
|
179
176
|
* and changes resulting from programmatic manipulation of the `value` (`external`).
|
|
180
|
-
*
|
|
181
177
|
* @extends ValueChangeEvent
|
|
182
178
|
* @event
|
|
183
|
-
|
|
179
|
+
*/
|
|
184
180
|
change: RingChangeEvent
|
|
185
181
|
}
|
|
186
182
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
5
|
-
import GenericInputFolding from '../internal/GenericInputFolding.svelte'
|
|
6
4
|
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-rotation'
|
|
7
5
|
import { BROWSER } from 'esm-env'
|
|
8
6
|
import { shallowEqual } from 'fast-equals'
|
|
7
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
8
|
+
import GenericInputFolding from '../internal/GenericInputFolding.svelte'
|
|
9
9
|
export let value
|
|
10
10
|
export let order = void 0
|
|
11
11
|
export let unit = void 0
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
$: (value, updateInternalValueFromValue())
|
|
40
40
|
$: (internalValue, updateValueFromInternalValue())
|
|
41
41
|
$: options = {
|
|
42
|
-
x: optionsX,
|
|
43
|
-
y: optionsY,
|
|
44
|
-
z: optionsZ,
|
|
45
42
|
order,
|
|
46
43
|
rotationMode: 'euler',
|
|
47
44
|
unit,
|
|
48
45
|
view: 'rotation',
|
|
46
|
+
x: optionsX,
|
|
47
|
+
y: optionsY,
|
|
48
|
+
z: optionsZ,
|
|
49
49
|
}
|
|
50
50
|
</script>
|
|
51
51
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { Simplify } from '../utils'
|
|
3
|
-
import type { ValueChangeEvent } from '../utils.js'
|
|
4
2
|
import type { EulerOrder } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/EulerOrder.js'
|
|
5
3
|
import type { EulerUnit } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/EulerUnit.js'
|
|
6
4
|
import type { PointDimensionParams } from '@tweakpane/core'
|
|
5
|
+
import type { Simplify, ValueChangeEvent } from '../utils.js'
|
|
7
6
|
export type RotationEulerOptions = Simplify<PointDimensionParams>
|
|
8
7
|
export type RotationEulerOrder = EulerOrder
|
|
9
8
|
export type RotationEulerUnit = EulerUnit
|
|
@@ -17,7 +16,108 @@ export type RotationEulerValue = Simplify<RotationEulerValueObject | RotationEul
|
|
|
17
16
|
export type RotationEulerChangeEvent = ValueChangeEvent<RotationEulerValue>
|
|
18
17
|
import type { RotationInputPluginEulerParams as RotationEulerOptionsInternal } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/RotationInputPluginEulerParams'
|
|
19
18
|
declare const __propDef: {
|
|
20
|
-
props:
|
|
19
|
+
props: Omit<
|
|
20
|
+
Omit<
|
|
21
|
+
{
|
|
22
|
+
/**
|
|
23
|
+
* The binding's target object with values to manipulate.
|
|
24
|
+
* @bindable
|
|
25
|
+
*/
|
|
26
|
+
object: import('@tweakpane/core').Bindable & Record<string, RotationEulerValue>
|
|
27
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
28
|
+
key: string
|
|
29
|
+
/**
|
|
30
|
+
* Prevent interactivity and gray out the control.
|
|
31
|
+
* @default `false`
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean
|
|
34
|
+
/**
|
|
35
|
+
* Text displayed next to control.
|
|
36
|
+
* @default `undefined`
|
|
37
|
+
*/
|
|
38
|
+
label?: string | undefined
|
|
39
|
+
/**
|
|
40
|
+
* Tweakpane's internal options object.
|
|
41
|
+
*
|
|
42
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
43
|
+
*
|
|
44
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
45
|
+
*
|
|
46
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
47
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
48
|
+
* Tweakpane UI_.
|
|
49
|
+
* @default `undefined`
|
|
50
|
+
*/
|
|
51
|
+
options?: RotationEulerOptionsInternal | undefined
|
|
52
|
+
/**
|
|
53
|
+
* Custom color scheme.
|
|
54
|
+
* @default `undefined` \
|
|
55
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
56
|
+
* set with `setGlobalDefaultTheme()`.
|
|
57
|
+
*/
|
|
58
|
+
theme?: import('..').Theme | undefined
|
|
59
|
+
/**
|
|
60
|
+
* Reference to internal Tweakpane
|
|
61
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
62
|
+
* this control.
|
|
63
|
+
*
|
|
64
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
65
|
+
* components wrapping `<Binding>`'s functionality.
|
|
66
|
+
*
|
|
67
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
68
|
+
* @bindable
|
|
69
|
+
* @readonly
|
|
70
|
+
*/
|
|
71
|
+
ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
|
|
72
|
+
/**
|
|
73
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
74
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
75
|
+
*
|
|
76
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
77
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
78
|
+
*
|
|
79
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
80
|
+
* @default `undefined`
|
|
81
|
+
*/
|
|
82
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
83
|
+
},
|
|
84
|
+
'object' | 'key'
|
|
85
|
+
> & {
|
|
86
|
+
/**
|
|
87
|
+
* The rotation value to control.
|
|
88
|
+
*
|
|
89
|
+
* Tuple values are a convenience added by _Svelte Tweakpane UI_, and are not part of the
|
|
90
|
+
* original TweakpaneRotationPlugin API.
|
|
91
|
+
*
|
|
92
|
+
* See the `order` prop to specify the sequence in which rotations are applied.
|
|
93
|
+
* @bindable
|
|
94
|
+
*/
|
|
95
|
+
value: RotationEulerValue
|
|
96
|
+
} & {
|
|
97
|
+
/**
|
|
98
|
+
* DOM class name of the button used to expand and collapse the input's picker.
|
|
99
|
+
* @default `undefined`
|
|
100
|
+
*/
|
|
101
|
+
buttonClass?: string
|
|
102
|
+
/**
|
|
103
|
+
* Expand or collapse the input's picker.
|
|
104
|
+
* @default `false`
|
|
105
|
+
* @bindable
|
|
106
|
+
*/
|
|
107
|
+
expanded?: boolean
|
|
108
|
+
/**
|
|
109
|
+
* The style of value "picker" to use in the input.
|
|
110
|
+
* @default `'popup'`
|
|
111
|
+
*/
|
|
112
|
+
picker?: 'inline' | 'popup'
|
|
113
|
+
/**
|
|
114
|
+
* Allow users to interactively expand / contract the picker.
|
|
115
|
+
* @default `true`
|
|
116
|
+
*/
|
|
117
|
+
userExpandable?: boolean
|
|
118
|
+
},
|
|
119
|
+
'ref' | 'options' | 'plugin' | 'buttonClass'
|
|
120
|
+
> & {
|
|
21
121
|
/**
|
|
22
122
|
* The rotation value to control.
|
|
23
123
|
*
|
|
@@ -26,7 +126,7 @@ declare const __propDef: {
|
|
|
26
126
|
*
|
|
27
127
|
* See the `order` prop to specify the sequence in which rotations are applied.
|
|
28
128
|
* @bindable
|
|
29
|
-
|
|
129
|
+
*/
|
|
30
130
|
value: RotationEulerValue
|
|
31
131
|
/**
|
|
32
132
|
* Input parameters specific to the X dimension.
|
|
@@ -34,7 +134,7 @@ declare const __propDef: {
|
|
|
34
134
|
* Renamed from `x` in the original TweakpaneRotationPlugin API to clarify that it is an
|
|
35
135
|
* object of options, not a value.
|
|
36
136
|
* @default `undefined`
|
|
37
|
-
|
|
137
|
+
*/
|
|
38
138
|
optionsX?: RotationEulerOptions
|
|
39
139
|
/**
|
|
40
140
|
* Input parameters specific to the Y dimension.
|
|
@@ -42,7 +142,7 @@ declare const __propDef: {
|
|
|
42
142
|
* Renamed from `y` in the original TweakpaneRotationPlugin API to clarify that it is an
|
|
43
143
|
* object of options, not a value.
|
|
44
144
|
* @default `undefined`
|
|
45
|
-
|
|
145
|
+
*/
|
|
46
146
|
optionsY?: RotationEulerOptions
|
|
47
147
|
/**
|
|
48
148
|
* Input parameters specific to the Z dimension.
|
|
@@ -50,7 +150,7 @@ declare const __propDef: {
|
|
|
50
150
|
* Renamed from `z` in the original TweakpaneRotationPlugin API to clarify that it is an
|
|
51
151
|
* object of options, not a value.
|
|
52
152
|
* @default `undefined`
|
|
53
|
-
|
|
153
|
+
*/
|
|
54
154
|
optionsZ?: RotationEulerOptions
|
|
55
155
|
/**
|
|
56
156
|
* Order of in which rotations are applied.
|
|
@@ -59,118 +159,14 @@ declare const __propDef: {
|
|
|
59
159
|
* intrinsic rotations, so you have to reverse the order if you want to match Three.js'
|
|
60
160
|
* behavior.
|
|
61
161
|
* @default `'XYZ'`
|
|
62
|
-
|
|
162
|
+
*/
|
|
63
163
|
order?: RotationEulerOrder
|
|
64
164
|
/**
|
|
65
165
|
* Units of rotation.
|
|
66
166
|
* @default `'rad'`
|
|
67
167
|
*/
|
|
68
168
|
unit?: RotationEulerUnit
|
|
69
|
-
}
|
|
70
|
-
{
|
|
71
|
-
/**
|
|
72
|
-
* DOM class name of the button used to expand and collapse the input's picker.
|
|
73
|
-
* @default `undefined`
|
|
74
|
-
*/
|
|
75
|
-
buttonClass?: string
|
|
76
|
-
/**
|
|
77
|
-
* Expand or collapse the input's picker.
|
|
78
|
-
* @default `false`
|
|
79
|
-
* @bindable
|
|
80
|
-
*/
|
|
81
|
-
expanded?: boolean
|
|
82
|
-
/**
|
|
83
|
-
* The style of value "picker" to use in the input.
|
|
84
|
-
* @default `'popup'`
|
|
85
|
-
*/
|
|
86
|
-
picker?: 'inline' | 'popup'
|
|
87
|
-
/**
|
|
88
|
-
* Allow users to interactively expand / contract the picker.
|
|
89
|
-
* @default `true`
|
|
90
|
-
*/
|
|
91
|
-
userExpandable?: boolean
|
|
92
|
-
} & {
|
|
93
|
-
/**
|
|
94
|
-
* The rotation value to control.
|
|
95
|
-
*
|
|
96
|
-
* Tuple values are a convenience added by _Svelte Tweakpane UI_, and are not part of the
|
|
97
|
-
* original TweakpaneRotationPlugin API.
|
|
98
|
-
*
|
|
99
|
-
* See the `order` prop to specify the sequence in which rotations are applied.
|
|
100
|
-
* @bindable
|
|
101
|
-
*/
|
|
102
|
-
value: RotationEulerValue
|
|
103
|
-
} & Omit<
|
|
104
|
-
{
|
|
105
|
-
/**
|
|
106
|
-
* The binding's target object with values to manipulate.
|
|
107
|
-
* @bindable
|
|
108
|
-
*/
|
|
109
|
-
object: import('@tweakpane/core').Bindable & Record<string, RotationEulerValue>
|
|
110
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
111
|
-
key: string
|
|
112
|
-
/**
|
|
113
|
-
* Prevent interactivity and gray out the control.
|
|
114
|
-
* @default `false`
|
|
115
|
-
*/
|
|
116
|
-
disabled?: boolean
|
|
117
|
-
/**
|
|
118
|
-
* Text displayed next to control.
|
|
119
|
-
* @default `undefined`
|
|
120
|
-
*/
|
|
121
|
-
label?: string | undefined
|
|
122
|
-
/**
|
|
123
|
-
* Tweakpane's internal options object.
|
|
124
|
-
*
|
|
125
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
126
|
-
*
|
|
127
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
128
|
-
*
|
|
129
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
130
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
131
|
-
* Tweakpane UI_.
|
|
132
|
-
* @default `undefined`
|
|
133
|
-
*/
|
|
134
|
-
options?: RotationEulerOptionsInternal | undefined
|
|
135
|
-
/**
|
|
136
|
-
* Custom color scheme.
|
|
137
|
-
*
|
|
138
|
-
* @default `undefined` \
|
|
139
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
140
|
-
* set with `setGlobalDefaultTheme()`.
|
|
141
|
-
*/
|
|
142
|
-
theme?: import('..').Theme | undefined
|
|
143
|
-
/**
|
|
144
|
-
* Reference to internal Tweakpane
|
|
145
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
146
|
-
* this control.
|
|
147
|
-
*
|
|
148
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
149
|
-
* components wrapping `<Binding>`'s functionality.
|
|
150
|
-
*
|
|
151
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
152
|
-
*
|
|
153
|
-
* @bindable
|
|
154
|
-
* @readonly
|
|
155
|
-
*/
|
|
156
|
-
ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
|
|
157
|
-
/**
|
|
158
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
159
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
160
|
-
*
|
|
161
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
162
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
163
|
-
*
|
|
164
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
165
|
-
*
|
|
166
|
-
* @default `undefined`
|
|
167
|
-
*/
|
|
168
|
-
plugin?: import('../utils').Plugin | undefined
|
|
169
|
-
},
|
|
170
|
-
'object' | 'key'
|
|
171
|
-
>,
|
|
172
|
-
'ref' | 'options' | 'plugin' | 'buttonClass'
|
|
173
|
-
>
|
|
169
|
+
}
|
|
174
170
|
slots: {}
|
|
175
171
|
events: {
|
|
176
172
|
/**
|
|
@@ -180,10 +176,9 @@ declare const __propDef: {
|
|
|
180
176
|
*
|
|
181
177
|
* The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
|
|
182
178
|
* and changes resulting from programmatic manipulation of the `value` (`external`).
|
|
183
|
-
*
|
|
184
179
|
* @extends ValueChangeEvent
|
|
185
180
|
* @event
|
|
186
|
-
|
|
181
|
+
*/
|
|
187
182
|
change: RotationEulerChangeEvent
|
|
188
183
|
}
|
|
189
184
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
5
|
-
import GenericInputFolding from '../internal/GenericInputFolding.svelte'
|
|
6
4
|
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-rotation'
|
|
7
5
|
import { BROWSER } from 'esm-env'
|
|
8
6
|
import { shallowEqual } from 'fast-equals'
|
|
7
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
8
|
+
import GenericInputFolding from '../internal/GenericInputFolding.svelte'
|
|
9
9
|
export let value
|
|
10
10
|
export let optionsX = void 0
|
|
11
11
|
export let optionsY = void 0
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
$: (value, updateInternalValueFromValue())
|
|
39
39
|
$: (internalValue, updateValueFromInternalValue())
|
|
40
40
|
$: options = {
|
|
41
|
+
rotationMode: 'quaternion',
|
|
42
|
+
view: 'rotation',
|
|
43
|
+
w: optionsW,
|
|
41
44
|
x: optionsX,
|
|
42
45
|
y: optionsY,
|
|
43
46
|
z: optionsZ,
|
|
44
|
-
w: optionsW,
|
|
45
|
-
rotationMode: 'quaternion',
|
|
46
|
-
view: 'rotation',
|
|
47
47
|
}
|
|
48
48
|
</script>
|
|
49
49
|
|