@dreamcomposer/engine-types 0.0.30 → 0.0.31-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.
Files changed (2) hide show
  1. package/Layer.d.ts +29 -2
  2. package/package.json +1 -1
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.31-next.1",
4
4
  "description": "The type definitions for messages from and to the engine",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,