@dreamcomposer/engine-types 0.0.27 → 0.0.28-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 +29 -2
- package/package.json +2 -2
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
|
-
*
|
|
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
|
*
|
|
@@ -91,6 +93,31 @@ export interface PatternEmbossingConfiguration {
|
|
|
91
93
|
rotation?: number;
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
export interface TextureUrl {
|
|
97
|
+
/**
|
|
98
|
+
* The public url of the texture
|
|
99
|
+
*/
|
|
100
|
+
url: string;
|
|
101
|
+
/**
|
|
102
|
+
* Define the file extension of the texture. (e.g. ".png", ".jpg", ".basis")
|
|
103
|
+
*
|
|
104
|
+
* This is only necessary, if the url does not contain the extension itself
|
|
105
|
+
*/
|
|
106
|
+
fileExtension?: string;
|
|
107
|
+
}
|
|
108
|
+
export interface TextureBlob {
|
|
109
|
+
/**
|
|
110
|
+
* The texture itself as an Blob
|
|
111
|
+
*/
|
|
112
|
+
blob: Blob;
|
|
113
|
+
/**
|
|
114
|
+
* Define the file extension of the texture (e.g. ".png", ".jpg", ".basis")
|
|
115
|
+
*
|
|
116
|
+
* This is only necessary, if the blob is not a common image file (.png, .jpg)
|
|
117
|
+
*/
|
|
118
|
+
fileExtension?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
94
121
|
export type TextureOverride<T> = Record<
|
|
95
122
|
string,
|
|
96
123
|
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.
|
|
3
|
+
"version": "0.0.28-next.1",
|
|
4
4
|
"description": "The type definitions for messages from and to the engine",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"**/*.ts"
|
|
9
9
|
],
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@babylonjs/core": "5.
|
|
11
|
+
"@babylonjs/core": "5.18.0",
|
|
12
12
|
"prettier": "^2.5.1",
|
|
13
13
|
"typescript": "^4.4.4"
|
|
14
14
|
},
|