@dreamcomposer/engine-types 0.0.20 → 0.0.21

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/Layer.d.ts CHANGED
@@ -14,7 +14,7 @@ export interface Layer {
14
14
  /**
15
15
  * The name of the material of the layer (e.g., "print_diffuse") or a complete material definition
16
16
  */
17
- material: string | MaterialDefinition;
17
+ material: MaterialDefinition;
18
18
  /**
19
19
  * Whether or not the layer is visible.
20
20
  *
@@ -63,18 +63,7 @@ export interface Layer {
63
63
  /**
64
64
  * A pattern embossing that is applied to the layer.
65
65
  */
66
- patternEmbossing?: PatternEmbossing;
67
- }
68
-
69
- export interface PatternEmbossing {
70
- /**
71
- * The id of the pattern embossing preset (e.g., "M515_006").
72
- */
73
- preset: string;
74
- /**
75
- * Overwrites of the preset values.
76
- */
77
- configuration?: PatternEmbossingConfiguration;
66
+ patternEmbossing?: PatternEmbossingConfiguration;
78
67
  }
79
68
 
80
69
  export interface PatternEmbossingConfiguration {
@@ -96,6 +85,10 @@ export interface PatternEmbossingConfiguration {
96
85
  * The offset of the embossing.
97
86
  */
98
87
  offset?: [number, number];
88
+ /**
89
+ * The rotation of the embossing.
90
+ */
91
+ rotation?: number;
99
92
  }
100
93
 
101
94
  export type TextureOverride<T> = Record<
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamcomposer/engine-types",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "The type definitions for messages from and to the engine",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -26,7 +26,7 @@ import { SetLayersMessage } from "./to-engine/SetLayersMessage";
26
26
  import { SetPpiMessage } from "./to-engine/SetPpiMessage";
27
27
  import { SetStageMappingsMessage } from "./to-engine/SetStageMappingsMessage";
28
28
  import { SetStageRotationsMessage } from "./to-engine/SetStageRotationsMessage";
29
- import { SetSurfaceMaterialIdMessage } from "./to-engine/SetSurfaceMaterialIdMessage";
29
+ import { SetSurfaceMaterialMessage } from "./to-engine/SetSurfaceMaterialMessage";
30
30
  import { ToggleFullscreenMessage } from "./to-engine/ToggleFullscreenMessage";
31
31
  import { ToggleInspectorMessage } from "./to-engine/ToggleInspectorMessage";
32
32
  import { UnhighlightLayerMessage } from "./to-engine/UnhighlightLayerMessage";
@@ -98,7 +98,7 @@ export type ToEnginePostMessage =
98
98
  | SetPpiMessage
99
99
  | SetStageMappingsMessage
100
100
  | SetStageRotationsMessage
101
- | SetSurfaceMaterialIdMessage
101
+ | SetSurfaceMaterialMessage
102
102
  | SetUseFramingAnimation
103
103
  | ToggleFullscreenMessage
104
104
  | ToggleInspectorMessage
@@ -0,0 +1,13 @@
1
+ import { MaterialDefinition } from "../Material";
2
+ import { ToEngineMessage } from "../post-messages";
3
+
4
+ /**
5
+ * Loads and sets the surface material by its definition.
6
+ */
7
+ export interface SetSurfaceMaterialMessage
8
+ extends ToEngineMessage<"set-surface-material"> {
9
+ /**
10
+ * The definition of the surface material
11
+ */
12
+ payload: MaterialDefinition;
13
+ }
@@ -1,12 +0,0 @@
1
- import { ToEngineMessage } from "../post-messages";
2
-
3
- /**
4
- * Loads and sets the surface material by its id.
5
- */
6
- export interface SetSurfaceMaterialIdMessage
7
- extends ToEngineMessage<"set-surface-material-id"> {
8
- /**
9
- * The id of the surface material (e.g., "paper_blanko_rough").
10
- */
11
- payload: string;
12
- }