@dreamcomposer/engine-types 0.0.30 → 0.0.32-next.1

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
@@ -24,9 +24,11 @@ export interface Layer {
24
24
  /**
25
25
  * The texture of the layer, either a url or a blob.
26
26
  *
27
- * Must be in the PNG format.
27
+ * For non PNG images the file format must be specified:
28
+ * - in the URL itself
29
+ * - via a TextureUrl and TextureUrlCollection object
28
30
  */
29
- texture: string | Blob;
31
+ texture: string | TextureUrl | Blob | TextureBlob;
30
32
  /**
31
33
  * Whether or not the layer is overprinted with the texture.
32
34
  *
@@ -81,6 +83,31 @@ export interface PatternEmbossingConfiguration {
81
83
  rotation?: number;
82
84
  }
83
85
 
86
+ export interface TextureUrl {
87
+ /**
88
+ * The public url of the texture
89
+ */
90
+ url: string;
91
+ /**
92
+ * Define the file extension of the texture. (e.g. ".png", ".jpg", ".basis")
93
+ *
94
+ * This is only necessary, if the url does not contain the extension itself
95
+ */
96
+ fileExtension?: string;
97
+ }
98
+ export interface TextureBlob {
99
+ /**
100
+ * The texture itself as an Blob
101
+ */
102
+ blob: Blob;
103
+ /**
104
+ * Define the file extension of the texture (e.g. ".png", ".jpg", ".ktx2")
105
+ *
106
+ * This is only necessary, if the blob is not a common image file (.png, .jpg)
107
+ */
108
+ fileExtension?: string;
109
+ }
110
+
84
111
  export type TextureOverride<T> = Record<
85
112
  string,
86
113
  Partial<T> | Record<string, Partial<T>>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamcomposer/engine-types",
3
- "version": "0.0.30",
3
+ "version": "0.0.32-next.1",
4
4
  "description": "The type definitions for messages from and to the engine",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -39,6 +39,41 @@ export interface SetStageMappingsMessage
39
39
  * and `1`).
40
40
  */
41
41
  height: number;
42
+ /**
43
+ * Defines a sub area of the target geometry, where the stage will be displayed
44
+ *
45
+ * If no subMeshUVArea is defined, the whole area is used.
46
+ */
47
+ subMeshUVArea?: {
48
+ /**
49
+ * The x position where the target uv box begins.
50
+ *
51
+ * This is not a pixel value but a percentage (i.e., a value between `0`
52
+ * and `1`).
53
+ */
54
+ x: number;
55
+ /**
56
+ * The y position where the target uv box begins.
57
+ *
58
+ * This is not a pixel value but a percentage (i.e., a value between `0`
59
+ * and `1`).
60
+ */
61
+ y: number;
62
+ /**
63
+ * The width of target uv box
64
+ *
65
+ * This is not a pixel value but a percentage (i.e., a value between `0`
66
+ * and `1`).
67
+ */
68
+ width: number;
69
+ /**
70
+ * The height of target uv box
71
+ *
72
+ * This is not a pixel value but a percentage (i.e., a value between `0`
73
+ * and `1`).
74
+ */
75
+ height: number;
76
+ };
42
77
  };
43
78
  };
44
79
  }