canvasengine 2.0.0-beta.23 → 2.0.0-beta.25
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/DebugRenderer-LPVGoCBJ.js +172 -0
- package/dist/DebugRenderer-LPVGoCBJ.js.map +1 -0
- package/dist/components/Canvas.d.ts +18 -0
- package/dist/components/Canvas.d.ts.map +1 -0
- package/dist/components/Container.d.ts +79 -0
- package/dist/components/Container.d.ts.map +1 -0
- package/dist/components/DOMContainer.d.ts +76 -0
- package/dist/components/DOMContainer.d.ts.map +1 -0
- package/dist/components/DOMElement.d.ts +44 -0
- package/dist/components/DOMElement.d.ts.map +1 -0
- package/dist/components/DisplayObject.d.ts +81 -0
- package/dist/components/DisplayObject.d.ts.map +1 -0
- package/dist/components/Graphic.d.ts +65 -0
- package/dist/components/Graphic.d.ts.map +1 -0
- package/dist/components/Mesh.d.ts +201 -0
- package/dist/components/Mesh.d.ts.map +1 -0
- package/dist/components/NineSliceSprite.d.ts +17 -0
- package/dist/components/NineSliceSprite.d.ts.map +1 -0
- package/dist/components/ParticleEmitter.d.ts +5 -0
- package/dist/components/ParticleEmitter.d.ts.map +1 -0
- package/dist/components/Scene.d.ts +2 -0
- package/dist/components/Scene.d.ts.map +1 -0
- package/dist/components/Sprite.d.ts +173 -0
- package/dist/components/Sprite.d.ts.map +1 -0
- package/dist/components/Text.d.ts +21 -0
- package/dist/components/Text.d.ts.map +1 -0
- package/dist/components/TilingSprite.d.ts +18 -0
- package/dist/components/TilingSprite.d.ts.map +1 -0
- package/dist/components/Video.d.ts +15 -0
- package/dist/components/Video.d.ts.map +1 -0
- package/dist/components/Viewport.d.ts +105 -0
- package/dist/components/Viewport.d.ts.map +1 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/types/DisplayObject.d.ts +106 -0
- package/dist/components/types/DisplayObject.d.ts.map +1 -0
- package/dist/components/types/MouseEvent.d.ts +4 -0
- package/dist/components/types/MouseEvent.d.ts.map +1 -0
- package/dist/components/types/Spritesheet.d.ts +366 -0
- package/dist/components/types/Spritesheet.d.ts.map +1 -0
- package/dist/components/types/index.d.ts +5 -0
- package/dist/components/types/index.d.ts.map +1 -0
- package/dist/directives/Drag.d.ts +70 -0
- package/dist/directives/Drag.d.ts.map +1 -0
- package/dist/directives/KeyboardControls.d.ts +530 -0
- package/dist/directives/KeyboardControls.d.ts.map +1 -0
- package/dist/directives/Scheduler.d.ts +36 -0
- package/dist/directives/Scheduler.d.ts.map +1 -0
- package/dist/directives/Sound.d.ts +26 -0
- package/dist/directives/Sound.d.ts.map +1 -0
- package/dist/directives/Transition.d.ts +11 -0
- package/dist/directives/Transition.d.ts.map +1 -0
- package/dist/directives/ViewportCull.d.ts +12 -0
- package/dist/directives/ViewportCull.d.ts.map +1 -0
- package/dist/directives/ViewportFollow.d.ts +19 -0
- package/dist/directives/ViewportFollow.d.ts.map +1 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/index.d.ts.map +1 -0
- package/dist/engine/animation.d.ts +59 -0
- package/dist/engine/animation.d.ts.map +1 -0
- package/dist/engine/bootstrap.d.ts +16 -0
- package/dist/engine/bootstrap.d.ts.map +1 -0
- package/dist/engine/directive.d.ts +14 -0
- package/dist/engine/directive.d.ts.map +1 -0
- package/dist/engine/reactive.d.ts +68 -0
- package/dist/engine/reactive.d.ts.map +1 -0
- package/dist/engine/signal.d.ts +72 -0
- package/dist/engine/signal.d.ts.map +1 -0
- package/dist/engine/trigger.d.ts +51 -0
- package/dist/engine/trigger.d.ts.map +1 -0
- package/dist/engine/utils.d.ts +90 -0
- package/dist/engine/utils.d.ts.map +1 -0
- package/dist/hooks/addContext.d.ts +2 -0
- package/dist/hooks/addContext.d.ts.map +1 -0
- package/dist/hooks/useProps.d.ts +42 -0
- package/dist/hooks/useProps.d.ts.map +1 -0
- package/dist/hooks/useRef.d.ts +5 -0
- package/dist/hooks/useRef.d.ts.map +1 -0
- package/dist/index-5TTorHyA.js +10931 -0
- package/dist/index-5TTorHyA.js.map +1 -0
- package/dist/index.d.ts +15 -1287
- package/dist/index.d.ts.map +1 -0
- package/dist/index.global.js +29 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +61 -4258
- package/dist/index.js.map +1 -1
- package/dist/utils/Ease.d.ts +17 -0
- package/dist/utils/Ease.d.ts.map +1 -0
- package/dist/utils/RadialGradient.d.ts +58 -0
- package/dist/utils/RadialGradient.d.ts.map +1 -0
- package/dist/utils/functions.d.ts +2 -0
- package/dist/utils/functions.d.ts.map +1 -0
- package/package.json +6 -4
- package/tsconfig.json +17 -0
- package/vite.config.ts +39 -0
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import { Directive } from '../engine/directive';
|
|
2
|
+
import { Element } from '../engine/reactive';
|
|
3
|
+
|
|
4
|
+
export declare enum Input {
|
|
5
|
+
Break = "break",
|
|
6
|
+
Backspace = "backspace",
|
|
7
|
+
Tab = "tab",
|
|
8
|
+
Clear = "clear",
|
|
9
|
+
Enter = "enter",
|
|
10
|
+
Shift = "shift",
|
|
11
|
+
Ctrl = "ctrl",
|
|
12
|
+
Alt = "alt",
|
|
13
|
+
Pause = "pause/break",
|
|
14
|
+
CapsLock = "caps lock",
|
|
15
|
+
Escape = "escape",
|
|
16
|
+
Conversion = "conversion",
|
|
17
|
+
NonConversion = "non-conversion",
|
|
18
|
+
Space = "space",
|
|
19
|
+
PageUp = "page up",
|
|
20
|
+
PageDown = "page down",
|
|
21
|
+
End = "end",
|
|
22
|
+
Home = "home",
|
|
23
|
+
Left = 4,
|
|
24
|
+
Up = 1,
|
|
25
|
+
Right = 2,
|
|
26
|
+
Down = 3,
|
|
27
|
+
Select = "select",
|
|
28
|
+
Print = "print",
|
|
29
|
+
Execute = "execute",
|
|
30
|
+
PrintScreen = "Print Screen",
|
|
31
|
+
Insert = "insert",
|
|
32
|
+
Delete = "delete",
|
|
33
|
+
Zero = "0",
|
|
34
|
+
One = "1",
|
|
35
|
+
Two = "2",
|
|
36
|
+
Three = "3",
|
|
37
|
+
Four = "4",
|
|
38
|
+
Five = "5",
|
|
39
|
+
Six = "6",
|
|
40
|
+
Seven = "7",
|
|
41
|
+
Height = "8",
|
|
42
|
+
Nine = "9",
|
|
43
|
+
Equal = "=",
|
|
44
|
+
Semicolon = "semicolon (firefox), equals",
|
|
45
|
+
LessThan = "<",
|
|
46
|
+
Equals = "equals (firefox)",
|
|
47
|
+
Beta = "\u00DF",
|
|
48
|
+
At = "@",
|
|
49
|
+
A = "a",
|
|
50
|
+
B = "b",
|
|
51
|
+
C = "c",
|
|
52
|
+
D = "d",
|
|
53
|
+
E = "e",
|
|
54
|
+
F = "f",
|
|
55
|
+
G = "g",
|
|
56
|
+
H = "h",
|
|
57
|
+
I = "i",
|
|
58
|
+
J = "j",
|
|
59
|
+
K = "k",
|
|
60
|
+
L = "l",
|
|
61
|
+
M = "m",
|
|
62
|
+
N = "n",
|
|
63
|
+
O = "o",
|
|
64
|
+
P = "p",
|
|
65
|
+
Q = "q",
|
|
66
|
+
R = "r",
|
|
67
|
+
S = "s",
|
|
68
|
+
T = "t",
|
|
69
|
+
U = "u",
|
|
70
|
+
V = "v",
|
|
71
|
+
W = "w",
|
|
72
|
+
X = "x",
|
|
73
|
+
Y = "y",
|
|
74
|
+
Z = "z",
|
|
75
|
+
SearchKey = "Windows Key / Left \u2318 / Chromebook Search key",
|
|
76
|
+
NumPad0 = "numpad 0",
|
|
77
|
+
NumPad1 = "numpad 1",
|
|
78
|
+
NumPad2 = "numpad 2",
|
|
79
|
+
NumPad3 = "numpad 3",
|
|
80
|
+
NumPad4 = "numpad 4",
|
|
81
|
+
NumPad5 = "numpad 5",
|
|
82
|
+
NumPad6 = "numpad 6",
|
|
83
|
+
NumPad7 = "numpad 7",
|
|
84
|
+
NumPad8 = "numpad 8",
|
|
85
|
+
NumPad9 = "numpad 9",
|
|
86
|
+
Multiply = "multiply",
|
|
87
|
+
Add = "add",
|
|
88
|
+
Subtract = "subtract",
|
|
89
|
+
DecimalPoint = "decimal point",
|
|
90
|
+
Divide = "divide",
|
|
91
|
+
F1 = "f1",
|
|
92
|
+
F2 = "f2",
|
|
93
|
+
F3 = "f3",
|
|
94
|
+
F4 = "f4",
|
|
95
|
+
F5 = "f5",
|
|
96
|
+
F6 = "f6",
|
|
97
|
+
F7 = "f7",
|
|
98
|
+
F8 = "f8",
|
|
99
|
+
F9 = "f9",
|
|
100
|
+
F10 = "f10",
|
|
101
|
+
F11 = "f11",
|
|
102
|
+
F12 = "f12",
|
|
103
|
+
F13 = "f13",
|
|
104
|
+
F14 = "f14",
|
|
105
|
+
F15 = "f15",
|
|
106
|
+
F16 = "f16",
|
|
107
|
+
F17 = "f17",
|
|
108
|
+
F18 = "f18",
|
|
109
|
+
F19 = "f19",
|
|
110
|
+
F20 = "f20",
|
|
111
|
+
F21 = "f21",
|
|
112
|
+
F22 = "f22",
|
|
113
|
+
F23 = "f23",
|
|
114
|
+
F24 = "f24",
|
|
115
|
+
NumLock = "num lock",
|
|
116
|
+
ScrollLock = "scroll lock",
|
|
117
|
+
CircumflexAccent = "^",
|
|
118
|
+
ExclamationMark = "!",
|
|
119
|
+
Hash = "#",
|
|
120
|
+
Dollar = "$",
|
|
121
|
+
AccentU = "\u00F9",
|
|
122
|
+
PageBackward = "page backward",
|
|
123
|
+
PageForWard = "page forward",
|
|
124
|
+
Star = "*",
|
|
125
|
+
DecreaseVolume = "decrease volume level",
|
|
126
|
+
IncreaseVolume = "increase volume level",
|
|
127
|
+
Next = "next",
|
|
128
|
+
Previous = "previous",
|
|
129
|
+
Stop = "stop",
|
|
130
|
+
PlayPause = "play/pause",
|
|
131
|
+
Email = "e-mail",
|
|
132
|
+
SemiColon = "semi-colon / \u00F1",
|
|
133
|
+
EqualSign = "equal sign",
|
|
134
|
+
Comma = "comma",
|
|
135
|
+
Dash = "dash",
|
|
136
|
+
FowardSlach = "forward slash / \u00E7",
|
|
137
|
+
GraveAccent = "grave accent / \u00F1 / \u00E6",
|
|
138
|
+
OpenBracket = "open bracket",
|
|
139
|
+
BackSlach = "back slash",
|
|
140
|
+
CloseBracket = "close bracket / \u00E5",
|
|
141
|
+
SingleQuote = "single quote / \u00F8",
|
|
142
|
+
BackQuote = "`",
|
|
143
|
+
Altgr = "altgr"
|
|
144
|
+
}
|
|
145
|
+
export interface ControlOptions {
|
|
146
|
+
repeat?: boolean;
|
|
147
|
+
bind: string | string[];
|
|
148
|
+
keyUp?: Function;
|
|
149
|
+
keyDown?: Function;
|
|
150
|
+
delay?: number | {
|
|
151
|
+
duration: number;
|
|
152
|
+
otherControls?: (string)[];
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export interface Controls {
|
|
156
|
+
[controlName: string]: ControlOptions;
|
|
157
|
+
}
|
|
158
|
+
type BoundKey = {
|
|
159
|
+
actionName: string;
|
|
160
|
+
options: ControlOptions;
|
|
161
|
+
parameters?: any;
|
|
162
|
+
};
|
|
163
|
+
export declare class KeyboardControls extends Directive {
|
|
164
|
+
private keyState;
|
|
165
|
+
private boundKeys;
|
|
166
|
+
private stop;
|
|
167
|
+
private lastKeyPressed;
|
|
168
|
+
private _controlsOptions;
|
|
169
|
+
private interval;
|
|
170
|
+
private serverFps;
|
|
171
|
+
private directionState;
|
|
172
|
+
onInit(element: Element): void;
|
|
173
|
+
onMount(element: Element): void;
|
|
174
|
+
onUpdate(props: any): void;
|
|
175
|
+
onDestroy(): void;
|
|
176
|
+
/** @internal */
|
|
177
|
+
preStep(): void;
|
|
178
|
+
private applyInput;
|
|
179
|
+
private setupListeners;
|
|
180
|
+
private bindKey;
|
|
181
|
+
private applyKeyDown;
|
|
182
|
+
private applyKeyUp;
|
|
183
|
+
private applyKeyPress;
|
|
184
|
+
private onKeyChange;
|
|
185
|
+
private updateDirectionState;
|
|
186
|
+
private getDirection;
|
|
187
|
+
/**
|
|
188
|
+
* From the name of the entry, we retrieve the control information
|
|
189
|
+
*
|
|
190
|
+
* ```ts
|
|
191
|
+
* import { Input, inject, KeyboardControls } from '@rpgjs/client'
|
|
192
|
+
*
|
|
193
|
+
* const controls = inject(KeyboardControls)
|
|
194
|
+
* controls.getControl(Input.Enter)
|
|
195
|
+
|
|
196
|
+
* if (control) {
|
|
197
|
+
* console.log(control.actionName) // action
|
|
198
|
+
* }
|
|
199
|
+
* ```
|
|
200
|
+
* @title Get Control
|
|
201
|
+
* @method getControl(inputName)
|
|
202
|
+
* @param {string} inputName
|
|
203
|
+
* @returns { { actionName: string, options: any } | undefined }
|
|
204
|
+
* @memberof KeyboardControls
|
|
205
|
+
*/
|
|
206
|
+
getControl(inputName: string): BoundKey | undefined;
|
|
207
|
+
/**
|
|
208
|
+
* Returns all controls
|
|
209
|
+
*
|
|
210
|
+
* @method getControls()
|
|
211
|
+
* @since 4.2.0
|
|
212
|
+
* @returns { { [key: string]: BoundKey } }
|
|
213
|
+
* @memberof KeyboardControls
|
|
214
|
+
*/
|
|
215
|
+
getControls(): {
|
|
216
|
+
[key: string]: BoundKey;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Triggers an input according to the name of the control
|
|
220
|
+
*
|
|
221
|
+
* ```ts
|
|
222
|
+
* import { Control, inject, KeyboardControls } from '@rpgjs/client'
|
|
223
|
+
*
|
|
224
|
+
* const controls = inject(KeyboardControls)
|
|
225
|
+
* controls.applyControl(Control.Action)
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* You can put a second parameter or indicate on whether the key is pressed or released
|
|
229
|
+
*
|
|
230
|
+
* ```ts
|
|
231
|
+
* import { Control, inject, KeyboardControls } from '@rpgjs/client'
|
|
232
|
+
*
|
|
233
|
+
* const controls = inject(KeyboardControls)
|
|
234
|
+
* controls.applyControl(Control.Up, true) // keydown
|
|
235
|
+
* controls.applyControl(Control.Up, false) // keyup
|
|
236
|
+
* ```
|
|
237
|
+
* @title Apply Control
|
|
238
|
+
* @method applyControl(controlName,isDown)
|
|
239
|
+
* @param {string} controlName
|
|
240
|
+
* @param {boolean} [isDown]
|
|
241
|
+
* @returns {Promise<void>}
|
|
242
|
+
* @memberof KeyboardControls
|
|
243
|
+
*/
|
|
244
|
+
applyControl(controlName: string | number, isDown?: boolean | undefined): Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Stop listening to the inputs. Pressing a key won't do anything
|
|
247
|
+
*
|
|
248
|
+
* @title Stop Inputs
|
|
249
|
+
* @method stopInputs()
|
|
250
|
+
* @returns {void}
|
|
251
|
+
* @memberof KeyboardControls
|
|
252
|
+
*/
|
|
253
|
+
stopInputs(): void;
|
|
254
|
+
/**
|
|
255
|
+
* Listen to the inputs again
|
|
256
|
+
*
|
|
257
|
+
* @title Listen Inputs
|
|
258
|
+
* @method listenInputs()
|
|
259
|
+
* @returns {void}
|
|
260
|
+
* @memberof KeyboardControls
|
|
261
|
+
*/
|
|
262
|
+
listenInputs(): void;
|
|
263
|
+
/**
|
|
264
|
+
* Assign custom inputs to the scene
|
|
265
|
+
*
|
|
266
|
+
* The object is the following:
|
|
267
|
+
*
|
|
268
|
+
* * the key of the object is the name of the control. Either it is existing controls (Up, Dow, Left, Right, Action, Back) or customized controls
|
|
269
|
+
* * The value is an object representing control information:
|
|
270
|
+
* * repeat {boolean} The key can be held down to repeat the action. (false by default)
|
|
271
|
+
* * bind {string | string[]} To which key is linked the control
|
|
272
|
+
* * method {Function} Function to be triggered. If you do not set this property, the name of the control is sent directly to the server.
|
|
273
|
+
* * delay {object|number} (since v3.2.0) Indicates how long (in milliseconds) the player can press the key again to perform the action
|
|
274
|
+
* * delay.duration
|
|
275
|
+
* * delay.otherControls {string | string[]} Indicates the other controls that will also have the delay at the same time
|
|
276
|
+
*
|
|
277
|
+
* ```ts
|
|
278
|
+
* import { Control, Input, inject, KeyboardControls } from '@rpgjs/client'
|
|
279
|
+
*
|
|
280
|
+
* const controls = inject(KeyboardControls)
|
|
281
|
+
* controls.setInputs({
|
|
282
|
+
[Control.Up]: {
|
|
283
|
+
repeat: true,
|
|
284
|
+
bind: Input.Up
|
|
285
|
+
},
|
|
286
|
+
[Control.Down]: {
|
|
287
|
+
repeat: true,
|
|
288
|
+
bind: Input.Down
|
|
289
|
+
},
|
|
290
|
+
[Control.Right]: {
|
|
291
|
+
repeat: true,
|
|
292
|
+
bind: Input.Right
|
|
293
|
+
},
|
|
294
|
+
[Control.Left]: {
|
|
295
|
+
repeat: true,
|
|
296
|
+
bind: Input.Left
|
|
297
|
+
},
|
|
298
|
+
[Control.Action]: {
|
|
299
|
+
bind: [Input.Space, Input.Enter]
|
|
300
|
+
},
|
|
301
|
+
[Control.Back]: {
|
|
302
|
+
bind: Input.Escape
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
// The myscustom1 control is sent to the server when the A key is pressed.
|
|
306
|
+
mycustom1: {
|
|
307
|
+
bind: Input.A
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
// the myAction method is executed when the B key is pressed
|
|
311
|
+
mycustom2: {
|
|
312
|
+
bind: Input.B,
|
|
313
|
+
method({ actionName }) {
|
|
314
|
+
console.log('cool', actionName)
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
// The player can redo the action after 400ms
|
|
319
|
+
mycustom3: {
|
|
320
|
+
bind: Input.C,
|
|
321
|
+
delay: 400 // ms
|
|
322
|
+
},
|
|
323
|
+
|
|
324
|
+
// The player can redo the action (mycustom4) and the directions after 400ms
|
|
325
|
+
mycustom4: {
|
|
326
|
+
bind: Input.C,
|
|
327
|
+
delay: {
|
|
328
|
+
duration: 400,
|
|
329
|
+
otherControls: [Control.Up, Control.Down, Control.Left, Control.Right]
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
})
|
|
333
|
+
*
|
|
334
|
+
* ```
|
|
335
|
+
* @enum {string} Control
|
|
336
|
+
*
|
|
337
|
+
* Control.Up | up
|
|
338
|
+
* Control.Down | down
|
|
339
|
+
* Control.Left | left
|
|
340
|
+
* Control.Right | right
|
|
341
|
+
* Control.Action | action
|
|
342
|
+
* Control.Back | back
|
|
343
|
+
*
|
|
344
|
+
* @enum {string} Mouse Event
|
|
345
|
+
*
|
|
346
|
+
* click | Click
|
|
347
|
+
* dblclick | Double Click
|
|
348
|
+
* mousedown | Mouse Down
|
|
349
|
+
* mouseup | Mouse Up
|
|
350
|
+
* mouseover | Mouse Over
|
|
351
|
+
* mousemove | Mouse Move
|
|
352
|
+
* mouseout | Mouse Out
|
|
353
|
+
* contextmenu | Context Menu
|
|
354
|
+
*
|
|
355
|
+
*
|
|
356
|
+
* @enum {string} Input
|
|
357
|
+
*
|
|
358
|
+
* break | Pause
|
|
359
|
+
* backspace | Backspace / Delete
|
|
360
|
+
* tab | Tab
|
|
361
|
+
* clear | Clear
|
|
362
|
+
* enter | Enter
|
|
363
|
+
* shift | Shift
|
|
364
|
+
* ctrl | Control
|
|
365
|
+
* alt | Alt
|
|
366
|
+
* pause/break | Pause / Break
|
|
367
|
+
* caps lock | Caps Lock
|
|
368
|
+
* escape | Escape
|
|
369
|
+
* conversion | Conversion
|
|
370
|
+
* non-conversion | Non-conversion
|
|
371
|
+
* space | Space
|
|
372
|
+
* page up | Page Up
|
|
373
|
+
* page down | Page Down
|
|
374
|
+
* end | End
|
|
375
|
+
* home | Home
|
|
376
|
+
* left | Left Arrow
|
|
377
|
+
* up | Up Arrow
|
|
378
|
+
* right | Right Arrow
|
|
379
|
+
* down | Down Arrow
|
|
380
|
+
* select | Select
|
|
381
|
+
* print | Print
|
|
382
|
+
* execute | Execute
|
|
383
|
+
* Print Screen | Print Screen
|
|
384
|
+
* insert | Insert
|
|
385
|
+
* delete | Delete
|
|
386
|
+
* n0 | 0
|
|
387
|
+
* n1 | 1
|
|
388
|
+
* n2 | 2
|
|
389
|
+
* n3 | 3
|
|
390
|
+
* n4 | 4
|
|
391
|
+
* n5 | 5
|
|
392
|
+
* n6 | 6
|
|
393
|
+
* n7 | 7
|
|
394
|
+
* n8 | 8
|
|
395
|
+
* n9 | 9
|
|
396
|
+
* : | Colon
|
|
397
|
+
* semicolon (firefox), equals | Semicolon (Firefox), Equals
|
|
398
|
+
* < | Less Than
|
|
399
|
+
* equals (firefox) | Equals (Firefox)
|
|
400
|
+
* ß | Eszett
|
|
401
|
+
* @ | At
|
|
402
|
+
* a | A
|
|
403
|
+
* b | B
|
|
404
|
+
* c | C
|
|
405
|
+
* d | D
|
|
406
|
+
* e | E
|
|
407
|
+
* f | F
|
|
408
|
+
* g | G
|
|
409
|
+
* h | H
|
|
410
|
+
* i | I
|
|
411
|
+
* j | J
|
|
412
|
+
* k | K
|
|
413
|
+
* l | L
|
|
414
|
+
* m | M
|
|
415
|
+
* n | N
|
|
416
|
+
* o | O
|
|
417
|
+
* p | P
|
|
418
|
+
* q | Q
|
|
419
|
+
* r | R
|
|
420
|
+
* s | S
|
|
421
|
+
* t | T
|
|
422
|
+
* u | U
|
|
423
|
+
* v | V
|
|
424
|
+
* w | W
|
|
425
|
+
* x | X
|
|
426
|
+
* y | Y
|
|
427
|
+
* z | Z
|
|
428
|
+
* Windows Key / Left ⌘ / Chromebook Search key | Windows Key / Left Command ⌘ / Chromebook Search Key
|
|
429
|
+
* right window key | Right Windows Key
|
|
430
|
+
* Windows Menu / Right ⌘ | Windows Menu / Right Command ⌘
|
|
431
|
+
* numpad 0 | Numpad 0
|
|
432
|
+
* numpad 1 | Numpad 1
|
|
433
|
+
* numpad 2 | Numpad 2
|
|
434
|
+
* numpad 3 | Numpad 3
|
|
435
|
+
* numpad 4 | Numpad 4
|
|
436
|
+
* numpad 5 | Numpad 5
|
|
437
|
+
* numpad 6 | Numpad 6
|
|
438
|
+
* numpad 7 | Numpad 7
|
|
439
|
+
* numpad 8 | Numpad 8
|
|
440
|
+
* numpad 9 | Numpad 9
|
|
441
|
+
* multiply | Multiply
|
|
442
|
+
* add | Add
|
|
443
|
+
* numpad period (firefox) | Numpad Period (Firefox)
|
|
444
|
+
* subtract | Subtract
|
|
445
|
+
* decimal point | Decimal Point
|
|
446
|
+
* divide | Divide
|
|
447
|
+
* f1 | F1
|
|
448
|
+
* f2 | F2
|
|
449
|
+
* f3 | F3
|
|
450
|
+
* f4 | F4
|
|
451
|
+
* f5 | F5
|
|
452
|
+
* f6 | F6
|
|
453
|
+
* f7 | F7
|
|
454
|
+
* f8 | F8
|
|
455
|
+
* f9 | F9
|
|
456
|
+
* f10 | F10
|
|
457
|
+
* f11 | F11
|
|
458
|
+
* f12 | F12
|
|
459
|
+
* f13 | F13
|
|
460
|
+
* f14 | F14
|
|
461
|
+
* f15 | F15
|
|
462
|
+
* f16 | F16
|
|
463
|
+
* f17 | F17
|
|
464
|
+
* f18 | F18
|
|
465
|
+
* f19 | F19
|
|
466
|
+
* f20 | F20
|
|
467
|
+
* f21 | F21
|
|
468
|
+
* f22 | F22
|
|
469
|
+
* f23 | F23
|
|
470
|
+
* f24 | F24
|
|
471
|
+
* num lock | Num Lock
|
|
472
|
+
* scroll lock | Scroll Lock
|
|
473
|
+
* ^ | Caret
|
|
474
|
+
* ! | Exclamation Point
|
|
475
|
+
* # | Hash
|
|
476
|
+
* $ | Dollar Sign
|
|
477
|
+
* ù | Grave Accent U
|
|
478
|
+
* page backward | Page Backward
|
|
479
|
+
* page forward | Page Forward
|
|
480
|
+
* closing paren (AZERTY) | Closing Parenthesis (AZERTY)
|
|
481
|
+
* * | Asterisk
|
|
482
|
+
* ~ + * key | Tilde + Asterisk Key
|
|
483
|
+
* minus (firefox), mute/unmute | Minus (Firefox), Mute/Unmute
|
|
484
|
+
* decrease volume level | Decrease Volume Level
|
|
485
|
+
* increase volume level | Increase Volume Level
|
|
486
|
+
* next | Next
|
|
487
|
+
* previous | Previous
|
|
488
|
+
* stop | Stop
|
|
489
|
+
* play/pause | Play/Pause
|
|
490
|
+
* e-mail | Email
|
|
491
|
+
* mute/unmute (firefox) | Mute/Unmute (Firefox)
|
|
492
|
+
* decrease volume level (firefox) | Decrease Volume Level (Firefox)
|
|
493
|
+
* increase volume level (firefox) | Increase Volume Level (Firefox)
|
|
494
|
+
* semi-colon / ñ | Semicolon / ñ
|
|
495
|
+
* equal sign | Equal Sign
|
|
496
|
+
* comma | Comma
|
|
497
|
+
* dash | Dash
|
|
498
|
+
* period | Period
|
|
499
|
+
* forward slash / ç | Forward Slash / ç
|
|
500
|
+
* grave accent / ñ / æ | Grave Accent / ñ / æ
|
|
501
|
+
* ?, / or ° | ?, / or °
|
|
502
|
+
* numpad period (chrome) | Numpad Period (Chrome)
|
|
503
|
+
* open bracket | Open Bracket
|
|
504
|
+
* back slash | Backslash
|
|
505
|
+
* close bracket / å | Close Bracket / å
|
|
506
|
+
* single quote / ø | Single Quote / ø
|
|
507
|
+
* \` | Backtick
|
|
508
|
+
* left or right ⌘ key (firefox) | Left or Right Command Key (Firefox)
|
|
509
|
+
* altgr | AltGr
|
|
510
|
+
* < /git > | < /git >
|
|
511
|
+
* GNOME Compose Key | GNOME Compose Key
|
|
512
|
+
* ç | ç
|
|
513
|
+
* XF86Forward | XF86Forward
|
|
514
|
+
* XF86Back | XF86Back
|
|
515
|
+
* alphanumeric | Alphanumeric
|
|
516
|
+
* hiragana/katakana | Hiragana/Katakana
|
|
517
|
+
* half-width/full-width | Half-Width/Full-Width
|
|
518
|
+
* kanji | Kanji
|
|
519
|
+
* toggle touchpad | Toggle Touchpad
|
|
520
|
+
*
|
|
521
|
+
* @title Set Inputs
|
|
522
|
+
* @method setInputs(inputs)
|
|
523
|
+
* @param {object} inputs
|
|
524
|
+
* @memberof KeyboardControls
|
|
525
|
+
*/
|
|
526
|
+
setInputs(inputs: Controls): void;
|
|
527
|
+
get options(): Controls;
|
|
528
|
+
}
|
|
529
|
+
export {};
|
|
530
|
+
//# sourceMappingURL=KeyboardControls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyboardControls.d.ts","sourceRoot":"","sources":["../../src/directives/KeyboardControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,M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oBAAoB;IAiB5B,OAAO,CAAC,YAAY;IAepB;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAInD;;;;;;;OAOG;IACH,WAAW,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE;IAI1C;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7F;;;;;;;OAOG;IACH,UAAU;IAIV;;;;;;;OAOG;IACH,YAAY;IAKZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsQG;IACH,SAAS,CAAC,MAAM,EAAE,QAAQ;IAkB1B,IAAI,OAAO,IAAI,QAAQ,CAEtB;CACJ"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Directive } from '../engine/directive';
|
|
2
|
+
import { Element } from '../engine/reactive';
|
|
3
|
+
|
|
4
|
+
export interface Tick {
|
|
5
|
+
timestamp: number;
|
|
6
|
+
deltaTime: number;
|
|
7
|
+
frame: number;
|
|
8
|
+
deltaRatio: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class Scheduler extends Directive {
|
|
11
|
+
private maxFps?;
|
|
12
|
+
private fps;
|
|
13
|
+
private deltaTime;
|
|
14
|
+
frame: number;
|
|
15
|
+
private timestamp;
|
|
16
|
+
private requestedDelay;
|
|
17
|
+
private lastTimestamp;
|
|
18
|
+
private _stop;
|
|
19
|
+
private tick;
|
|
20
|
+
onInit(element: Element): void;
|
|
21
|
+
onDestroy(): void;
|
|
22
|
+
onMount(element: Element): void;
|
|
23
|
+
onUpdate(props: any): void;
|
|
24
|
+
nextTick(timestamp: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* start the schedule
|
|
27
|
+
* @return {Scheduler} returns this scheduler instance
|
|
28
|
+
*/
|
|
29
|
+
start(options?: {
|
|
30
|
+
maxFps?: number;
|
|
31
|
+
fps?: number;
|
|
32
|
+
delay?: number;
|
|
33
|
+
}): this;
|
|
34
|
+
stop(): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=Scheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scheduler.d.ts","sourceRoot":"","sources":["../../src/directives/Scheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,MAAM,WAAW,IAAI;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;CACrB;AAED,qBAAa,SAAU,SAAQ,SAAS;IACpC,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,SAAS,CAAY;IACtB,KAAK,EAAE,MAAM,CAAI;IACxB,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,IAAI,CAA6B;IAEzC,MAAM,CAAC,OAAO,EAAE,OAAO;IAIvB,SAAS;IACT,OAAO,CAAC,OAAO,EAAE,OAAO;IACxB,QAAQ,CAAC,KAAK,EAAE,GAAG;IAEnB,QAAQ,CAAC,SAAS,EAAE,MAAM;IAa1B;;;OAGG;IACH,KAAK,CAAC,OAAO,GAAE;QACX,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACZ;IA2CN,IAAI;CAGP"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { Directive } from '../engine/directive';
|
|
3
|
+
import { Element } from '../engine/reactive';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Sound directive for playing audio with support for spatial audio and multiple sound sources
|
|
7
|
+
*
|
|
8
|
+
* This directive manages audio playback using Howler.js library. It supports:
|
|
9
|
+
* - Single or multiple sound sources
|
|
10
|
+
* - Spatial audio with distance-based volume calculation
|
|
11
|
+
* - All standard audio controls (play, pause, volume, etc.)
|
|
12
|
+
* - Event handling for audio lifecycle
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare class Sound extends Directive {
|
|
16
|
+
private sounds;
|
|
17
|
+
private eventsFn;
|
|
18
|
+
private maxVolume;
|
|
19
|
+
private maxDistance;
|
|
20
|
+
private tickSubscription?;
|
|
21
|
+
onInit(element: Element<Container>): void;
|
|
22
|
+
onMount(element: Element<Container>): void;
|
|
23
|
+
onUpdate(props: any): void;
|
|
24
|
+
onDestroy(): void;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Sound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sound.d.ts","sourceRoot":"","sources":["../../src/directives/Sound.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAK7C;;;;;;;;;GASG;AACH,qBAAa,KAAM,SAAQ,SAAS;IAChC,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,gBAAgB,CAAC,CAAc;IAEvC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;IAElC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;IA0DnC,QAAQ,CAAC,KAAK,EAAE,GAAG;IAuBnB,SAAS;CAkBZ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { Directive } from '../engine/directive';
|
|
3
|
+
import { Element } from '../engine/reactive';
|
|
4
|
+
|
|
5
|
+
export declare class Transition extends Directive {
|
|
6
|
+
onInit(element: Element<Container>): void;
|
|
7
|
+
onMount(element: Element<Container>): void;
|
|
8
|
+
onUpdate(props: any): void;
|
|
9
|
+
onDestroy(): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Transition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transition.d.ts","sourceRoot":"","sources":["../../src/directives/Transition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmD,MAAM,SAAS,CAAC;AAErF,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,qBAAa,UAAW,SAAQ,SAAS;IAGrC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;IAGlC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;IAuBnC,QAAQ,CAAC,KAAK,EAAE,GAAG;IAInB,SAAS;CAGZ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { Directive } from '../engine/directive';
|
|
3
|
+
import { Element } from '../engine/reactive';
|
|
4
|
+
|
|
5
|
+
export declare class ViewportCull extends Directive {
|
|
6
|
+
private cull;
|
|
7
|
+
onInit(element: any): void;
|
|
8
|
+
onMount(element: Element<Container>): void;
|
|
9
|
+
onUpdate(props: any): void;
|
|
10
|
+
onDestroy(): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ViewportCull.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewportCull.d.ts","sourceRoot":"","sources":["../../src/directives/ViewportCull.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,qBAAa,YAAa,SAAQ,SAAS;IACvC,OAAO,CAAC,IAAI,CAAQ;IAEpB,MAAM,CAAC,OAAO,KAAA;IAKd,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;IAoBnC,QAAQ,CAAC,KAAK,EAAE,GAAG;IACnB,SAAS;CACZ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentInstance } from '../components/DisplayObject';
|
|
2
|
+
import { SignalOrPrimitive } from '../components/types';
|
|
3
|
+
import { Directive } from '../engine/directive';
|
|
4
|
+
import { Element } from '../engine/reactive';
|
|
5
|
+
|
|
6
|
+
export type ViewportFollowProps = {
|
|
7
|
+
viewportFollow?: boolean | {
|
|
8
|
+
speed?: SignalOrPrimitive<number>;
|
|
9
|
+
acceleration?: SignalOrPrimitive<number>;
|
|
10
|
+
radius?: SignalOrPrimitive<number>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare class ViewportFollow extends Directive {
|
|
14
|
+
onInit(element: Element<ComponentInstance>): void;
|
|
15
|
+
onMount(element: Element): void;
|
|
16
|
+
onUpdate(viewportFollow: any, element: Element): void;
|
|
17
|
+
onDestroy(element: Element): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ViewportFollow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewportFollow.d.ts","sourceRoot":"","sources":["../../src/directives/ViewportFollow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI7C,MAAM,MAAM,mBAAmB,GAAG;IAC9B,cAAc,CAAC,EAAE,OAAO,GAAG;QACvB,KAAK,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAClC,YAAY,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACzC,MAAM,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;KACtC,CAAC;CACL,CAAA;AAED,qBAAa,cAAe,SAAQ,SAAS;IACzC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC;IAG1C,OAAO,CAAC,OAAO,EAAE,OAAO;IAGxB,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO;IAwB9C,SAAS,CAAC,OAAO,EAAE,OAAO;CAK7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/directives/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,aAAa,CAAA;AACpB,OAAO,kBAAkB,CAAA;AAEzB,OAAO,SAAS,CAAA;AAChB,OAAO,QAAQ,CAAA;AACf,OAAO,cAAc,CAAA"}
|