@dreamcomposer/engine-types 0.0.34 → 0.0.36
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.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FromEngineMessage } from "../post-messages";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Whenever a key is pressed while the iframe is focused, this event is
|
|
5
|
+
* dispatched. This can be useful since the embedder of the iframe does not
|
|
6
|
+
* receive key down events that happen inside the iframe.
|
|
7
|
+
*/
|
|
8
|
+
export interface KeyDownEventMessage
|
|
9
|
+
extends FromEngineMessage<"key-down-event"> {
|
|
10
|
+
/**
|
|
11
|
+
* The event data for the pressed key
|
|
12
|
+
*/
|
|
13
|
+
payload: KeyboardEventInit;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FromEngineMessage } from "../post-messages";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Whenever a key is released while the iframe is focused, this event is
|
|
5
|
+
* dispatched. This can be useful since the embedder of the iframe does not
|
|
6
|
+
* receive key down events that happen inside the iframe.
|
|
7
|
+
*/
|
|
8
|
+
export interface KeyUpEventMessage extends FromEngineMessage<"key-up-event"> {
|
|
9
|
+
/**
|
|
10
|
+
* The event data for the released key
|
|
11
|
+
*/
|
|
12
|
+
payload: KeyboardEventInit;
|
|
13
|
+
}
|
package/package.json
CHANGED
package/post-messages.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ import { RecenterSkeletonObjectsMessage } from "./to-engine/RecenterSkeletonObje
|
|
|
36
36
|
import { SetShadowPlaneVisibilityMessage } from "./to-engine/SetShadowPlaneVisibilityMessage";
|
|
37
37
|
import { DisplayLoadingUiMessage } from "./from-engine/DisplayLoadingUiMessage";
|
|
38
38
|
import { HideLoadingUiMessage } from "./from-engine/HideLoadingUiMessage";
|
|
39
|
+
import { KeyDownEventMessage } from "./from-engine/KeyDownEventMessage";
|
|
40
|
+
import { KeyUpEventMessage } from "./from-engine/KeyUpEventMessage";
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
43
|
* A message sent from the engine to the embedder.
|
|
@@ -66,6 +68,8 @@ export type FromEnginePostMessage =
|
|
|
66
68
|
| HideGuiMessage
|
|
67
69
|
| HideLoadingUiMessage
|
|
68
70
|
| KeyDownMessage
|
|
71
|
+
| KeyDownEventMessage
|
|
72
|
+
| KeyUpEventMessage
|
|
69
73
|
| PointerEventMessage
|
|
70
74
|
| SetLoadingProgressMessage;
|
|
71
75
|
|
|
@@ -12,33 +12,40 @@ export interface SetStageMappingsMessage
|
|
|
12
12
|
*/
|
|
13
13
|
[stageName: string]: {
|
|
14
14
|
/**
|
|
15
|
-
* The
|
|
15
|
+
* The layer texture mapping
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
* and `1`).
|
|
17
|
+
* If not provided only the surface material is visible by defaulting to `{x: -1, y: -1, width: 1, height: 1}`.
|
|
19
18
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
19
|
+
uvMapping?: {
|
|
20
|
+
/**
|
|
21
|
+
* The x position where the mapping begings.
|
|
22
|
+
*
|
|
23
|
+
* This is not a pixel value but a percentage (i.e., a value between `0`
|
|
24
|
+
* and `1`).
|
|
25
|
+
*/
|
|
26
|
+
x: number;
|
|
27
|
+
/**
|
|
28
|
+
* The y position where the mapping begings.
|
|
29
|
+
*
|
|
30
|
+
* This is not a pixel value but a percentage (i.e., a value between `0`
|
|
31
|
+
* and `1`).
|
|
32
|
+
*/
|
|
33
|
+
y: number;
|
|
34
|
+
/**
|
|
35
|
+
* The with of the mapping.
|
|
36
|
+
*
|
|
37
|
+
* This is not a pixel value but a percentage (i.e., a value between `0`
|
|
38
|
+
* and `1`).
|
|
39
|
+
*/
|
|
40
|
+
width: number;
|
|
41
|
+
/**
|
|
42
|
+
* The height of the mapping.
|
|
43
|
+
*
|
|
44
|
+
* This is not a pixel value but a percentage (i.e., a value between `0`
|
|
45
|
+
* and `1`).
|
|
46
|
+
*/
|
|
47
|
+
height: number;
|
|
48
|
+
};
|
|
42
49
|
/**
|
|
43
50
|
* The rotation of the mapping in degrees.
|
|
44
51
|
*
|