@types/gorilla-engine 1.0.0
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.
- gorilla-engine/LICENSE +21 -0
- gorilla-engine/README.md +16 -0
- gorilla-engine/components/AmpEnv.d.ts +29 -0
- gorilla-engine/components/BarStepEditor.d.ts +28 -0
- gorilla-engine/components/ComboBox.d.ts +65 -0
- gorilla-engine/components/DragContainer.d.ts +19 -0
- gorilla-engine/components/DragTarget.d.ts +12 -0
- gorilla-engine/components/DropZone.d.ts +13 -0
- gorilla-engine/components/Knob.d.ts +13 -0
- gorilla-engine/components/Label.d.ts +14 -0
- gorilla-engine/components/LevelMeter.d.ts +28 -0
- gorilla-engine/components/ListBox.d.ts +17 -0
- gorilla-engine/components/LottieAnimation.d.ts +35 -0
- gorilla-engine/components/MidiKeyboard.d.ts +37 -0
- gorilla-engine/components/Pad.d.ts +17 -0
- gorilla-engine/components/ScrollView.d.ts +12 -0
- gorilla-engine/components/SliceEditor.d.ts +70 -0
- gorilla-engine/components/Slider.d.ts +24 -0
- gorilla-engine/components/StepEditor.d.ts +29 -0
- gorilla-engine/components/TextBox.d.ts +24 -0
- gorilla-engine/components/Toggle.d.ts +30 -0
- gorilla-engine/components/Trigger.d.ts +16 -0
- gorilla-engine/components/Waveform.d.ts +48 -0
- gorilla-engine/index.d.ts +101 -0
- gorilla-engine/interfaces/Background.d.ts +12 -0
- gorilla-engine/interfaces/Bounds.d.ts +11 -0
- gorilla-engine/interfaces/Clickable.d.ts +31 -0
- gorilla-engine/interfaces/Common.d.ts +11 -0
- gorilla-engine/interfaces/Component.d.ts +11 -0
- gorilla-engine/interfaces/Font.d.ts +20 -0
- gorilla-engine/interfaces/KeyboardFocus.d.ts +7 -0
- gorilla-engine/interfaces/Scrollable.d.ts +9 -0
- gorilla-engine/interfaces/Skinnable.d.ts +10 -0
- gorilla-engine/package.json +25 -0
gorilla-engine/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
gorilla-engine/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
> `npm install --save @types/gorilla-engine`
|
|
3
|
+
|
|
4
|
+
# Summary
|
|
5
|
+
This package contains type definitions for Gorilla Engine (https://gorilla-engine.com).
|
|
6
|
+
|
|
7
|
+
# Details
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gorilla-engine.
|
|
9
|
+
|
|
10
|
+
### Additional Details
|
|
11
|
+
* Last updated: Mon, 16 Jan 2023 13:32:40 GMT
|
|
12
|
+
* Dependencies: none
|
|
13
|
+
* Global values: `GorillaEngine`
|
|
14
|
+
|
|
15
|
+
# Credits
|
|
16
|
+
These definitions were written by [Julian Woodward](https://github.com/jhwoodward).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface AmpItem {
|
|
3
|
+
color: string;
|
|
4
|
+
size: number;
|
|
5
|
+
cornerRadius: number;
|
|
6
|
+
value: number;
|
|
7
|
+
'value&': any;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
imagePath: string;
|
|
10
|
+
text: string;
|
|
11
|
+
textColor: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface AmpEnvProps extends Common, Bounds, Background, Font {
|
|
15
|
+
attack: Partial<AmpItem>;
|
|
16
|
+
decay: Partial<AmpItem>;
|
|
17
|
+
sustain: Partial<AmpItem>;
|
|
18
|
+
release: Partial<AmpItem>;
|
|
19
|
+
curve: Partial<{
|
|
20
|
+
color: string;
|
|
21
|
+
thickness: number;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface AmpEnv extends AmpEnvProps {}
|
|
26
|
+
class AmpEnv extends Component {
|
|
27
|
+
constructor(options: Partial<AmpEnvProps>);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface BarStepEditorProps extends Common, Bounds, Background, Clickable {
|
|
3
|
+
value: any;
|
|
4
|
+
divSize: number;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
paramPath: string;
|
|
8
|
+
startIndex: number;
|
|
9
|
+
endIndex: number;
|
|
10
|
+
step: Partial<{
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
cornerRadius: number;
|
|
16
|
+
incrementHeight: number;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
markDefault: boolean;
|
|
19
|
+
onColor: string;
|
|
20
|
+
offColor: string;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class BarStepEditor extends Component {
|
|
25
|
+
constructor(options: Partial<BarStepEditorProps>);
|
|
26
|
+
}
|
|
27
|
+
interface BarStepEditor extends BarStepEditorProps {}
|
|
28
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface ComboBoxPadding {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
right: number;
|
|
6
|
+
bottom: number;
|
|
7
|
+
}
|
|
8
|
+
interface ComboBoxPopupStyles {
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
itemTextColor: string;
|
|
11
|
+
itemSelectedTextColor: string;
|
|
12
|
+
itemSelectedBackgroundColor: string;
|
|
13
|
+
itemHighlightedTextColor: string;
|
|
14
|
+
itemHighlightedBackgroundColor: string;
|
|
15
|
+
checkmarkFloat: 'left' | 'right';
|
|
16
|
+
cornerRadius: number;
|
|
17
|
+
padding: ComboBoxPadding | number;
|
|
18
|
+
checkmarkPadding: ComboBoxPadding;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ComboBoxProps extends Common, Bounds, Background, Clickable, Font {
|
|
22
|
+
value: number;
|
|
23
|
+
/**
|
|
24
|
+
* List of options
|
|
25
|
+
*/
|
|
26
|
+
items: string[];
|
|
27
|
+
/**
|
|
28
|
+
* The character that signifies heirarchy within the items array
|
|
29
|
+
*/
|
|
30
|
+
levelSeperator: string;
|
|
31
|
+
stretchText: boolean;
|
|
32
|
+
scrollWheelEnabled: boolean;
|
|
33
|
+
styleSubmenu: boolean;
|
|
34
|
+
backgroundColorClicked: string;
|
|
35
|
+
backgroundColorHover: string;
|
|
36
|
+
itemReselectedAction: string;
|
|
37
|
+
padding: Partial<ComboBoxPadding> | number;
|
|
38
|
+
images: Partial<{
|
|
39
|
+
arrowIcon: string;
|
|
40
|
+
arrowIconPressed: string;
|
|
41
|
+
popupSubmenuSelectionImage: string;
|
|
42
|
+
popupSubmenuSelectionHighlightedImage: string;
|
|
43
|
+
popupCheckmarkImage: string;
|
|
44
|
+
popupCheckmarkHighlightedImage: string;
|
|
45
|
+
subPopupSubmenuSelectionImage: string;
|
|
46
|
+
subPopupSubmenuSelectionHighlightedImage: string;
|
|
47
|
+
subPopupCheckmarkImage: string;
|
|
48
|
+
subPopupCheckmarkHighlightedImage: string;
|
|
49
|
+
}>;
|
|
50
|
+
popup: Partial<
|
|
51
|
+
ComboBoxPopupStyles & {
|
|
52
|
+
separatorColo?: string;
|
|
53
|
+
separatorHeight: number;
|
|
54
|
+
separatorPadding: number;
|
|
55
|
+
}
|
|
56
|
+
>;
|
|
57
|
+
subPopup: Partial<ComboBoxPopupStyles>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface ComboBox extends ComboBoxProps {}
|
|
61
|
+
class ComboBox extends Component {
|
|
62
|
+
onChange?: (value: number) => void;
|
|
63
|
+
constructor(options: Partial<ComboBoxProps>);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface DragContainerProps extends Common, Bounds, Clickable {
|
|
3
|
+
dragGroup: string;
|
|
4
|
+
dragContent: string;
|
|
5
|
+
externalDragStartAction: string;
|
|
6
|
+
externalDragEndAction: string;
|
|
7
|
+
destinationCanMoveDraggedFiles: boolean;
|
|
8
|
+
externallyDraggedFiles: any;
|
|
9
|
+
onDragging: string;
|
|
10
|
+
onExternalDragStart: string;
|
|
11
|
+
onExternalDragEnd: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface DragContainer extends DragContainerProps {}
|
|
15
|
+
|
|
16
|
+
class DragContainer extends Component {
|
|
17
|
+
constructor(options: Partial<DragContainerProps>);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface DragTargetProps extends Common, Bounds, Clickable {
|
|
3
|
+
dragGroup: string;
|
|
4
|
+
onDrop: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
class DragTarget extends Component {
|
|
8
|
+
constructor(options: Partial<DragTargetProps>);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface DragTarget extends DragTargetProps {}
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface DropZoneProps extends Common, Bounds, Clickable {
|
|
3
|
+
acceptedFileTypes: string[] | string;
|
|
4
|
+
onDraggedFiles: string;
|
|
5
|
+
onDroppedFile: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface DropZone extends DropZoneProps {}
|
|
9
|
+
|
|
10
|
+
class DropZone extends Component {
|
|
11
|
+
constructor(options: Partial<DropZoneProps>);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface KnobProps extends Common, Bounds, Clickable, Background, Skinnable {
|
|
3
|
+
text: string;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
value: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Knob extends KnobProps {}
|
|
10
|
+
class Knob extends Component {
|
|
11
|
+
constructor(options: Partial<KnobProps>);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface LabelProps extends Common, Bounds, Background, Font, Clickable {
|
|
3
|
+
text: string | number;
|
|
4
|
+
format: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Use a Label to...
|
|
9
|
+
*/
|
|
10
|
+
class Label extends Component {
|
|
11
|
+
constructor(options: Partial<LabelProps>);
|
|
12
|
+
}
|
|
13
|
+
interface Label extends LabelProps {}
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface LevelMeterProps extends Common, Bounds, Background, Skinnable {
|
|
3
|
+
peakHold: boolean;
|
|
4
|
+
logScale: boolean;
|
|
5
|
+
fillArea: boolean;
|
|
6
|
+
inverted: boolean;
|
|
7
|
+
stereo: boolean;
|
|
8
|
+
positionIndicator: boolean;
|
|
9
|
+
rampUpFactor: number;
|
|
10
|
+
rampDownFactor: number;
|
|
11
|
+
maxRampDownSpeed: number;
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
levelColor: string;
|
|
15
|
+
peakColor: string;
|
|
16
|
+
indicatorThickness: number;
|
|
17
|
+
visibleSectionStart: number;
|
|
18
|
+
visibleSectionEnd: number;
|
|
19
|
+
direction: string;
|
|
20
|
+
value: any;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface LevelMeter extends LevelMeterProps {}
|
|
24
|
+
|
|
25
|
+
class LevelMeter extends Component {
|
|
26
|
+
constructor(options: Partial<LevelMeterProps>);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface ListBoxProps extends Common, Bounds, Font, Clickable, Background, Scrollable {
|
|
3
|
+
items?: string[];
|
|
4
|
+
horizontalMargin?: number;
|
|
5
|
+
cellColor?: string;
|
|
6
|
+
cellColorSelected?: string;
|
|
7
|
+
textColorSelected?: string;
|
|
8
|
+
rowDoubleClickedAction?: string;
|
|
9
|
+
returnKeyAction?: string;
|
|
10
|
+
rowClickedAction?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface ListBox extends ListBoxProps {}
|
|
14
|
+
class ListBox extends Component {
|
|
15
|
+
constructor(options: Partial<ListBoxProps>);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface LottieAnimationProps extends Common, Bounds {
|
|
3
|
+
filePath: string;
|
|
4
|
+
autoplay: boolean;
|
|
5
|
+
loop: boolean;
|
|
6
|
+
readonly totalFrames?: number;
|
|
7
|
+
readonly duration?: number;
|
|
8
|
+
readonly currentFrame?: number;
|
|
9
|
+
play(): void;
|
|
10
|
+
stop(): void;
|
|
11
|
+
pause(): void;
|
|
12
|
+
setFrame(frame: number): void;
|
|
13
|
+
setFrameFromLinearTransform(value: number, min: number, max: number): void;
|
|
14
|
+
setProperties(
|
|
15
|
+
selector: string,
|
|
16
|
+
settings: {
|
|
17
|
+
fillColor?: [number, number, number]; // Fill bright red
|
|
18
|
+
fillOpacity?: number; // Change fills to 50% opacity
|
|
19
|
+
strokeColor?: [number, number, number]; // Color strokes bright green
|
|
20
|
+
strokeOpacity?: number; // Change strokes to 50% opacity
|
|
21
|
+
strokeWidth?: number; // Change stroke width to 3.5px
|
|
22
|
+
transformAnchor?: [number, number]; // Move the anchor to x = 100, y = 100
|
|
23
|
+
transformPosition?: [number, number]; // Move to x = 200, y = 200
|
|
24
|
+
transformScale?: [number, number]; // Scale to 50% size in x and y axis
|
|
25
|
+
transformRotation?: number; // Rotate by 180°
|
|
26
|
+
transformOpacity?: number; // Change opacity to 50%
|
|
27
|
+
},
|
|
28
|
+
): void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
class LottieAnimation extends Component {
|
|
32
|
+
constructor(options: Partial<LottieAnimationProps>);
|
|
33
|
+
}
|
|
34
|
+
interface LottieAnimation extends LottieAnimationProps {}
|
|
35
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface MidiKeyboardKeys {
|
|
3
|
+
blackColor: string;
|
|
4
|
+
blackHoverColor: string;
|
|
5
|
+
blackPressedColor: string;
|
|
6
|
+
blackOutlineColor: string;
|
|
7
|
+
blackOutlineHoverColor: string;
|
|
8
|
+
blackOutlinePressedColor: string;
|
|
9
|
+
whiteColor: string;
|
|
10
|
+
whiteHoverColor: string;
|
|
11
|
+
whitePressedColor: string;
|
|
12
|
+
whiteOutlineColor: string;
|
|
13
|
+
whiteOutlineHoverColor: string;
|
|
14
|
+
whiteOutlinePressedColor: string;
|
|
15
|
+
whiteHeight: number;
|
|
16
|
+
blackHeight: number;
|
|
17
|
+
whiteWidth: number;
|
|
18
|
+
blackWidth: number;
|
|
19
|
+
width: number;
|
|
20
|
+
spacing: number;
|
|
21
|
+
outlineWidth: number;
|
|
22
|
+
cornerRadius: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface MidiKeyboardProps extends Common, Bounds, Background {
|
|
26
|
+
lowKey: number;
|
|
27
|
+
highKey: number;
|
|
28
|
+
disableNKSColors: boolean;
|
|
29
|
+
keys: Partial<MidiKeyboardKeys>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface MidiKeyboard extends MidiKeyboardProps {}
|
|
33
|
+
|
|
34
|
+
class MidiKeyboard extends Component {
|
|
35
|
+
constructor(props: Partial<MidiKeyboardProps>);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface PadProps extends Common, Bounds, Background, KeyboardFocus {
|
|
3
|
+
midiNote: number;
|
|
4
|
+
velocity: number;
|
|
5
|
+
padState: boolean;
|
|
6
|
+
images: Partial<{
|
|
7
|
+
normal: string;
|
|
8
|
+
hover: string;
|
|
9
|
+
down: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface Pad extends PadProps {}
|
|
14
|
+
class Pad extends Component {
|
|
15
|
+
constructor(options: Partial<PadProps>);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface ScrollViewProps extends Common, Bounds, Scrollable {
|
|
3
|
+
scrollbarThickness: number;
|
|
4
|
+
hideVerticalScrollbar: boolean;
|
|
5
|
+
hideHorizontalScrollbar: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
class ScrollView extends Component {
|
|
9
|
+
constructor(options: Partial<ScrollViewProps>);
|
|
10
|
+
}
|
|
11
|
+
interface ScrollView extends ScrollViewProps {}
|
|
12
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface SliceStyle {
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
color: string;
|
|
7
|
+
image: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Modulation {
|
|
11
|
+
color: string;
|
|
12
|
+
tooltip: string;
|
|
13
|
+
centerLine: any;
|
|
14
|
+
values: any;
|
|
15
|
+
centerValue: number;
|
|
16
|
+
}
|
|
17
|
+
interface GridMeasure {
|
|
18
|
+
fractionOfBar: number;
|
|
19
|
+
showLabels: boolean;
|
|
20
|
+
tickHeight: number;
|
|
21
|
+
font: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface SliceEditorProps extends Common, Bounds, Background, Clickable {
|
|
25
|
+
slices: any;
|
|
26
|
+
audioLengthInSamples: number;
|
|
27
|
+
audioLengthInBeats: number;
|
|
28
|
+
canChangeSlices: boolean;
|
|
29
|
+
canAddSlices: boolean;
|
|
30
|
+
canRemoveSlices: boolean;
|
|
31
|
+
snapSlicesToGrid: boolean;
|
|
32
|
+
zoom: { start: number; end: number };
|
|
33
|
+
addModulation(modulation: Partial<Modulation>): void;
|
|
34
|
+
grid: Partial<{
|
|
35
|
+
position: string;
|
|
36
|
+
height: number;
|
|
37
|
+
minTickSpacing: number;
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
backgroundColor: string;
|
|
40
|
+
backgroundImage: string;
|
|
41
|
+
measures: GridMeasure[];
|
|
42
|
+
addMeasure(measure: GridMeasure): void;
|
|
43
|
+
}>;
|
|
44
|
+
sliceStyles: Partial<{
|
|
45
|
+
normal: Partial<SliceStyle>;
|
|
46
|
+
hover: Partial<SliceStyle>;
|
|
47
|
+
selected: Partial<SliceStyle>;
|
|
48
|
+
}>;
|
|
49
|
+
selectionAreaStyle: Partial<{
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
border: Partial<{
|
|
52
|
+
width: number;
|
|
53
|
+
radius: number;
|
|
54
|
+
color: string;
|
|
55
|
+
}>;
|
|
56
|
+
}>;
|
|
57
|
+
addMarker(marker: any): void;
|
|
58
|
+
addSlice(slice: any): void;
|
|
59
|
+
clearSlices(): void;
|
|
60
|
+
setZoom: (start: number, end: number) => void;
|
|
61
|
+
mappedSampleChanged(): void;
|
|
62
|
+
modulations: Modulation[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface SliceEditor extends SliceEditorProps {}
|
|
66
|
+
|
|
67
|
+
class SliceEditor extends Component {
|
|
68
|
+
constructor(options: Partial<SliceEditorProps>);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface SliderProps extends Common, Bounds, Clickable, Background {
|
|
3
|
+
text: string;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
value: number;
|
|
7
|
+
direction: 'horizontal' | 'vertical';
|
|
8
|
+
animation: LottieAnimation;
|
|
9
|
+
filmstrip: {
|
|
10
|
+
path: string;
|
|
11
|
+
count: number;
|
|
12
|
+
direction: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Use a slider to
|
|
18
|
+
* - enable users to control numeric values by dragging up/down or left/right
|
|
19
|
+
*/
|
|
20
|
+
class Slider extends Component {
|
|
21
|
+
constructor(options: Partial<SliderProps>);
|
|
22
|
+
}
|
|
23
|
+
interface Slider extends SliderProps {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface StepEditorProps extends Common, Background, Bounds, Clickable {
|
|
3
|
+
value: any;
|
|
4
|
+
divSize: number;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
paramPath: string;
|
|
8
|
+
startIndex: number;
|
|
9
|
+
endIndex: number;
|
|
10
|
+
step: Partial<{
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
cornerRadius: number;
|
|
16
|
+
border: number;
|
|
17
|
+
markDefault: boolean;
|
|
18
|
+
incrementHeight: number;
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
onColor: string;
|
|
21
|
+
offColor: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface StepEditor extends StepEditorProps {}
|
|
26
|
+
class StepEditor extends Component {
|
|
27
|
+
constructor(options: Partial<StepEditorProps>);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface TextBoxProps extends Font, Clickable, Bounds, Background {
|
|
3
|
+
text: string;
|
|
4
|
+
palceholder: string;
|
|
5
|
+
unit: string;
|
|
6
|
+
placeHolderColor: string;
|
|
7
|
+
highlightTextColor: string;
|
|
8
|
+
highlightColor: string;
|
|
9
|
+
cartColor: string;
|
|
10
|
+
maxLength: number;
|
|
11
|
+
passwordCharacter: string;
|
|
12
|
+
multiLine: boolean;
|
|
13
|
+
readOnly: boolean;
|
|
14
|
+
acceptedDataType: 'integer' | 'int' | 'float' | 'string';
|
|
15
|
+
minValue: number;
|
|
16
|
+
maxValue: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface TextBox extends TextBoxProps {}
|
|
20
|
+
|
|
21
|
+
class TextBox extends Component {
|
|
22
|
+
constructor(props: Partial<TextBoxProps>);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface ToggleProps extends Common, Bounds {
|
|
3
|
+
text: string;
|
|
4
|
+
onColor: string;
|
|
5
|
+
offColor: string;
|
|
6
|
+
onColorHover: string;
|
|
7
|
+
offColorHover: string;
|
|
8
|
+
textColorOn: string;
|
|
9
|
+
textColorOff: string;
|
|
10
|
+
textColorOnHover: string;
|
|
11
|
+
textColorOffHover: string;
|
|
12
|
+
onImage: string;
|
|
13
|
+
onImagePressed: string;
|
|
14
|
+
onImageHovered: string;
|
|
15
|
+
offImage: string;
|
|
16
|
+
offImagePressed: string;
|
|
17
|
+
offImageHovered: string;
|
|
18
|
+
disabledImage: string;
|
|
19
|
+
radioIndex: number;
|
|
20
|
+
radioValue: number;
|
|
21
|
+
drawTick: boolean;
|
|
22
|
+
fitToText: boolean;
|
|
23
|
+
value: boolean;
|
|
24
|
+
animation: LottieAnimation;
|
|
25
|
+
}
|
|
26
|
+
interface Toggle extends ToggleProps {}
|
|
27
|
+
class Toggle extends Component {
|
|
28
|
+
constructor(options: Partial<ToggleProps>);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface TriggerProps extends Common, Bounds, Font, Clickable, Background, KeyboardFocus {
|
|
3
|
+
text: string;
|
|
4
|
+
images: {
|
|
5
|
+
normal?: string;
|
|
6
|
+
hover?: string;
|
|
7
|
+
down?: string;
|
|
8
|
+
};
|
|
9
|
+
animation: LottieAnimation;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Trigger extends TriggerProps {}
|
|
13
|
+
class Trigger extends Component {
|
|
14
|
+
constructor(options: Partial<TriggerProps>);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface WaveformDragZone {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
x2: number;
|
|
6
|
+
y2: number;
|
|
7
|
+
leftHandleImage: number;
|
|
8
|
+
rightHandleImage: number;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
overlayColor: string;
|
|
11
|
+
leftHandleWidth: number;
|
|
12
|
+
rightHandleWidth: number;
|
|
13
|
+
rightHandleHeight: number;
|
|
14
|
+
canResize: boolean;
|
|
15
|
+
canPan: boolean;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
markers: Partial<{
|
|
18
|
+
leftHandleImage: number;
|
|
19
|
+
rightHandleImage: number;
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
leftHandleWidth: number;
|
|
22
|
+
leftHandleHeight: number;
|
|
23
|
+
rightHandleWidth: number;
|
|
24
|
+
rightHandleHeight: number;
|
|
25
|
+
canResize: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface WaveformProps extends Common, Bounds, Background, Font, Clickable {
|
|
30
|
+
waveformColor: string;
|
|
31
|
+
gradientCenterColor: string;
|
|
32
|
+
gradientEndColor: string;
|
|
33
|
+
horizontalAxisColor: string;
|
|
34
|
+
waveformUnavailableText: string;
|
|
35
|
+
waveWidth: number;
|
|
36
|
+
waveHorizontalSapcing: number;
|
|
37
|
+
verticalPadding: number;
|
|
38
|
+
fitHeight: boolean;
|
|
39
|
+
paintCenterLine: boolean;
|
|
40
|
+
value: number;
|
|
41
|
+
dragzone: Partial<WaveformDragZone>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface Waveform extends WaveformProps {}
|
|
45
|
+
class Waveform extends Component {
|
|
46
|
+
constructor(options: Partial<WaveformProps>);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Type definitions for Gorilla Engine 1.0
|
|
2
|
+
// Project: https://gorilla-engine.com
|
|
3
|
+
// Definitions by: Julian Woodward <https://github.com/jhwoodward>
|
|
4
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
|
|
6
|
+
/// <reference path = "interfaces/Background.d.ts" />
|
|
7
|
+
/// <reference path = "interfaces/Bounds.d.ts" />
|
|
8
|
+
/// <reference path = "interfaces/Clickable.d.ts" />
|
|
9
|
+
/// <reference path = "interfaces/Common.d.ts" />
|
|
10
|
+
/// <reference path = "interfaces/Component.d.ts" />
|
|
11
|
+
/// <reference path = "interfaces/Font.d.ts" />
|
|
12
|
+
/// <reference path = "interfaces/KeyboardFocus.d.ts" />
|
|
13
|
+
/// <reference path = "interfaces/Scrollable.d.ts" />
|
|
14
|
+
/// <reference path = "interfaces/Skinnable.d.ts" />
|
|
15
|
+
|
|
16
|
+
/// <reference path = "components/AmpEnv.d.ts" />
|
|
17
|
+
/// <reference path = "components/BarStepEditor.d.ts" />
|
|
18
|
+
/// <reference path = "components/ComboBox.d.ts" />
|
|
19
|
+
/// <reference path = "components/DragContainer.d.ts" />
|
|
20
|
+
/// <reference path = "components/DragTarget.d.ts" />
|
|
21
|
+
/// <reference path = "components/DropZone.d.ts" />
|
|
22
|
+
/// <reference path = "components/Knob.d.ts" />
|
|
23
|
+
/// <reference path = "components/Label.d.ts" />
|
|
24
|
+
/// <reference path = "components/LevelMeter.d.ts" />
|
|
25
|
+
/// <reference path = "components/ListBox.d.ts" />
|
|
26
|
+
/// <reference path = "components/LottieAnimation.d.ts" />
|
|
27
|
+
/// <reference path = "components/MidiKeyboard.d.ts" />
|
|
28
|
+
/// <reference path = "components/Pad.d.ts" />
|
|
29
|
+
/// <reference path = "components/ScrollView.d.ts" />
|
|
30
|
+
/// <reference path = "components/SliceEditor.d.ts" />
|
|
31
|
+
/// <reference path = "components/Slider.d.ts" />
|
|
32
|
+
/// <reference path = "components/StepEditor.d.ts" />
|
|
33
|
+
/// <reference path = "components/TextBox.d.ts" />
|
|
34
|
+
/// <reference path = "components/Toggle.d.ts" />
|
|
35
|
+
/// <reference path = "components/Trigger.d.ts" />
|
|
36
|
+
/// <reference path = "components/Waveform.d.ts" />
|
|
37
|
+
|
|
38
|
+
declare namespace GorillaEngine {
|
|
39
|
+
/**
|
|
40
|
+
* Instrument parameter session persistence
|
|
41
|
+
*/
|
|
42
|
+
interface InstrumentPropertyPersistence {
|
|
43
|
+
private: boolean;
|
|
44
|
+
showInHost: boolean;
|
|
45
|
+
saveInSession: boolean;
|
|
46
|
+
saveInPreset: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Instrument property
|
|
50
|
+
*/
|
|
51
|
+
interface InstrumentProperty {
|
|
52
|
+
normValue: number;
|
|
53
|
+
value: number;
|
|
54
|
+
normValueAsync: number;
|
|
55
|
+
valueAsync: number;
|
|
56
|
+
defaultValue: number;
|
|
57
|
+
minValue: number;
|
|
58
|
+
maxValue: number;
|
|
59
|
+
resolution: number;
|
|
60
|
+
numSteps: number;
|
|
61
|
+
key: string;
|
|
62
|
+
name: string;
|
|
63
|
+
category: string;
|
|
64
|
+
label: string;
|
|
65
|
+
text: string;
|
|
66
|
+
unit: string;
|
|
67
|
+
steps: string[];
|
|
68
|
+
persistence: InstrumentPropertyPersistence;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Instrument
|
|
73
|
+
*/
|
|
74
|
+
interface Instrument {
|
|
75
|
+
on(propName: string, handler: (normValue: number) => void): void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Blob
|
|
80
|
+
*/
|
|
81
|
+
interface Blob {
|
|
82
|
+
loadInstrument(name: string): Instrument;
|
|
83
|
+
getInstrumentNames(): string[];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function registerUncaughtUIExceptionCallback(handler: (err: Error) => void): void;
|
|
87
|
+
function getResourcePath(): string;
|
|
88
|
+
function getPluginName(): string;
|
|
89
|
+
function getManufacturerName(): string;
|
|
90
|
+
function loadBlob(blobPath: string): Blob;
|
|
91
|
+
function disposeInstrument(instrument: Instrument): void;
|
|
92
|
+
function setActiveInstrument(instrument: Instrument): void;
|
|
93
|
+
function setSessionSaveCallback(callback: any, instance: any): void;
|
|
94
|
+
function setSessionLoadCallback(callback: any, instance: any): void;
|
|
95
|
+
function getBuildInformation(): any;
|
|
96
|
+
|
|
97
|
+
namespace UI {
|
|
98
|
+
function loadUIfromYAML(ymlPath: string): void;
|
|
99
|
+
function getControlById(id: string): Component;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface Clickable {
|
|
3
|
+
interceptsMouseClicks: boolean;
|
|
4
|
+
allowClicksOnChildren: boolean;
|
|
5
|
+
modifiedClickAction: string;
|
|
6
|
+
doubleClickAction: string;
|
|
7
|
+
mouseEnterAction: string;
|
|
8
|
+
mouseExitAction: string;
|
|
9
|
+
clickMask: string;
|
|
10
|
+
mouseCursorType:
|
|
11
|
+
| 'none'
|
|
12
|
+
| 'normal'
|
|
13
|
+
| 'wait'
|
|
14
|
+
| 'IBeam'
|
|
15
|
+
| 'cross hair'
|
|
16
|
+
| 'copying'
|
|
17
|
+
| 'pointing hand'
|
|
18
|
+
| 'dragging hand'
|
|
19
|
+
| 'left right resize'
|
|
20
|
+
| 'up down resize'
|
|
21
|
+
| 'up down left right resize'
|
|
22
|
+
| 'top edge resize'
|
|
23
|
+
| 'bottom edge resize'
|
|
24
|
+
| 'left edge resize'
|
|
25
|
+
| 'right edge resize'
|
|
26
|
+
| 'top left corner resize'
|
|
27
|
+
| 'top right corner resize'
|
|
28
|
+
| 'bottom left corner resize'
|
|
29
|
+
| 'bottom right corner resize';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
abstract class Component {
|
|
3
|
+
id: string;
|
|
4
|
+
children: Component[];
|
|
5
|
+
parent: Component;
|
|
6
|
+
on(event: string, handler: any): void;
|
|
7
|
+
appendChild(child: Component): void;
|
|
8
|
+
removeChild(child: Component): void;
|
|
9
|
+
insertBefore(child: Component, beforeChild: Component): void;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare namespace GorillaEngine.UI {
|
|
2
|
+
interface Font {
|
|
3
|
+
font: string;
|
|
4
|
+
fontSize: number;
|
|
5
|
+
fontKerning: number;
|
|
6
|
+
textColor: string;
|
|
7
|
+
textAlign:
|
|
8
|
+
| 'centered left'
|
|
9
|
+
| 'centered right'
|
|
10
|
+
| 'left'
|
|
11
|
+
| 'right'
|
|
12
|
+
| 'center'
|
|
13
|
+
| 'top left'
|
|
14
|
+
| 'top right'
|
|
15
|
+
| 'top center'
|
|
16
|
+
| 'bottom left'
|
|
17
|
+
| 'bottom right'
|
|
18
|
+
| 'bottom center';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@types/gorilla-engine",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript definitions for Gorilla Engine",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gorilla-engine",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"contributors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Julian Woodward",
|
|
10
|
+
"url": "https://github.com/jhwoodward",
|
|
11
|
+
"githubUsername": "jhwoodward"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"main": "",
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
19
|
+
"directory": "types/gorilla-engine"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {},
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"typesPublisherContentHash": "e54ee785bb3ed2374e79e767dd76f29c6effd5a33a81e05f15ff8b4bef5ce68f",
|
|
24
|
+
"typeScriptVersion": "4.2"
|
|
25
|
+
}
|