@dreamcomposer/engine-types 0.0.33 → 0.0.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamcomposer/engine-types",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "The type definitions for messages from and to the engine",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -23,7 +23,6 @@ import { SetHardwareScalingLevelMessage } from "./to-engine/SetHardwareScalingLe
23
23
  import { SetLayersMessage } from "./to-engine/SetLayersMessage";
24
24
  import { SetPpiMessage } from "./to-engine/SetPpiMessage";
25
25
  import { SetStageMappingsMessage } from "./to-engine/SetStageMappingsMessage";
26
- import { SetStageRotationsMessage } from "./to-engine/SetStageRotationsMessage";
27
26
  import { SetSurfaceMaterialMessage } from "./to-engine/SetSurfaceMaterialMessage";
28
27
  import { ToggleFullscreenMessage } from "./to-engine/ToggleFullscreenMessage";
29
28
  import { ToggleInspectorMessage } from "./to-engine/ToggleInspectorMessage";
@@ -91,7 +90,6 @@ export type ToEnginePostMessage =
91
90
  | SetLayersMessage
92
91
  | SetPpiMessage
93
92
  | SetStageMappingsMessage
94
- | SetStageRotationsMessage
95
93
  | SetSurfaceMaterialMessage
96
94
  | SetUseFramingAnimation
97
95
  | ToggleFullscreenMessage
@@ -12,33 +12,52 @@ export interface SetStageMappingsMessage
12
12
  */
13
13
  [stageName: string]: {
14
14
  /**
15
- * The x position where the mapping begings.
15
+ * The layer texture mapping
16
16
  *
17
- * This is not a pixel value but a percentage (i.e., a value between `0`
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
- x: number;
21
- /**
22
- * The y position where the mapping begings.
23
- *
24
- * This is not a pixel value but a percentage (i.e., a value between `0`
25
- * and `1`).
26
- */
27
- y: number;
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
+ };
28
49
  /**
29
- * The with of the mapping.
50
+ * The rotation of the mapping in degrees.
30
51
  *
31
- * This is not a pixel value but a percentage (i.e., a value between `0`
32
- * and `1`).
52
+ * Defaults to `0`.
33
53
  */
34
- width: number;
54
+ rotation?: 0 | 90 | 180 | 270;
35
55
  /**
36
- * The height of the mapping.
56
+ * Defines if the stage should be visible or not.
37
57
  *
38
- * This is not a pixel value but a percentage (i.e., a value between `0`
39
- * and `1`).
58
+ * Defaults to `true`.
40
59
  */
41
- height: number;
60
+ visible?: boolean;
42
61
  /**
43
62
  * Defines a sub area of the target geometry, where the stage will be displayed
44
63
  *
@@ -1,14 +0,0 @@
1
- import { ToEngineMessage } from "../post-messages";
2
-
3
- /**
4
- * Sets how the engine should rotate the stages.
5
- */
6
- export interface SetStageRotationsMessage
7
- extends ToEngineMessage<"set-stage-rotations"> {
8
- payload: {
9
- /**
10
- * The name of the stage with its rotation in degrees.
11
- */
12
- [stageName: string]: 0 | 90 | 180 | 270;
13
- };
14
- }