@dreamcomposer/engine-types 0.0.17-next.1 → 0.0.19

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
@@ -22,15 +22,11 @@ export interface Layer {
22
22
  */
23
23
  visible?: boolean;
24
24
  /**
25
- * A URL that points to the texture of the layer.
26
- * For non PNG images the file format must be specified either in the URL itself or via a TexturUrl and TexturUrlCollection object
25
+ * A url that points to the texture of the layer.
26
+ *
27
+ * Must be in the PNG format.
27
28
  */
28
- textureUrl:
29
- | string
30
- | TextureUrl
31
- | CompressedTextureUrlCollection
32
- | Blob
33
- | TextureBlob;
29
+ textureUrl: string | Blob;
34
30
  /**
35
31
  * Whether or not the layer is overprinted with the texture.
36
32
  *
@@ -92,7 +88,7 @@ export interface PatternEmbossingConfiguration {
92
88
  sizePx: [number, number];
93
89
 
94
90
  /**
95
- * PPI of the textureforcedExtension
91
+ * PPI of the texture
96
92
  */
97
93
  ppi: number;
98
94
 
@@ -102,73 +98,6 @@ export interface PatternEmbossingConfiguration {
102
98
  offset?: [number, number];
103
99
  }
104
100
 
105
- export interface TextureUrl {
106
- /**
107
- * The public url of the texture
108
- */
109
- url: string;
110
- /**
111
- * Define the file extension of the texture.
112
- * This is only necessary, if the url does not contain the extension itself (e.g. ".png", "-dxt.ktx")
113
- */
114
- fileExtension?: string;
115
- /**
116
- * Define the texture compression that is stored inside (e.g. "dxt", "etc1", "astc")
117
- * Currently comporessed textures are only supported inside a .ktx file
118
- */
119
- textureCompressionFormat?: string;
120
- }
121
- export interface TextureBlob {
122
- /**
123
- * The texture itself as an Blob
124
- */
125
- blob: Blob;
126
- /**
127
- * Define the file extension of the texture (e.g. ".png", ".jpg", ".ktx")
128
- */
129
- fileExtension?: string;
130
- /**
131
- * Define the texture compression that is stored inside (e.g. "dxt", "etc1", "astc")
132
- * Currently comporessed textures are only supported inside a .ktx file
133
- */
134
- textureCompressionFormat?: string;
135
- }
136
-
137
- /**
138
- * A collection of URLs for a single texture in diffrent compression formats
139
- */
140
- export interface CompressedTextureUrlCollection {
141
- /**
142
- * The URL, that is used, if the GPU does not support any of the provied compression formats.
143
- * Must be referencing to a PNG image
144
- */
145
- fallbackURL: string;
146
- /**
147
- * URL that points to an ASTC compressed textur in a KTX file format
148
- */
149
- astcKtxURL?: string;
150
- /**
151
- * URL that points to an ATC compressed textur in a KTX file format
152
- */
153
- atcKtxURL?: string;
154
- /**
155
- * URL that points to an DXT3 or DXT5 compressed textur in a KTX file format
156
- */
157
- dxtKtxURL?: string;
158
- /**
159
- * URL that points to an ETC-1 compressed textur in a KTX file format
160
- */
161
- etc1KtxURL?: string;
162
- /**
163
- * URL that points to an ETC-2 compressed textur in a KTX file format
164
- */
165
- etc2KtxURL?: string;
166
- /**
167
- * URL that points to an PVRTC compressed textur in a KTX file format
168
- */
169
- pvrtcKtxURL?: string;
170
- }
171
-
172
101
  export type TextureOverride<T> = Record<
173
102
  string,
174
103
  Partial<T> | Record<string, Partial<T>>
@@ -0,0 +1,9 @@
1
+ import { FromEngineMessage } from "../post-messages";
2
+
3
+ /**
4
+ * Sent whenever the loading ui should be displayed.
5
+ */
6
+ export interface DisplayLoadingUiMessage
7
+ extends FromEngineMessage<"display-loading-ui"> {
8
+ payload: {};
9
+ }
@@ -1,14 +1,9 @@
1
1
  import { FromEngineMessage } from "../post-messages";
2
2
 
3
- export interface EngineReadyEvent {
4
- ready: boolean;
5
- supportedCompressedTextureFormats: string[];
6
- }
7
-
8
3
  /**
9
4
  * A message that gets send by the engine when it's ready to receive commands.
10
5
  * You must not send any messages before receiving this message.
11
6
  */
12
7
  export interface EngineReadyMessage extends FromEngineMessage<"engine-ready"> {
13
- payload: EngineReadyEvent;
8
+ payload: boolean;
14
9
  }
@@ -0,0 +1,9 @@
1
+ import { FromEngineMessage } from "../post-messages";
2
+
3
+ /**
4
+ * Sent whenever the loading ui should be hidden.
5
+ */
6
+ export interface HideLoadingUiMessage
7
+ extends FromEngineMessage<"hide-loading-ui"> {
8
+ payload: {};
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamcomposer/engine-types",
3
- "version": "0.0.17-next.1",
3
+ "version": "0.0.19",
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.8.2",
11
+ "@babylonjs/core": "5.0.0-alpha.58",
12
12
  "prettier": "^2.5.1",
13
13
  "typescript": "^4.4.4"
14
14
  },
@@ -38,6 +38,8 @@ import { SetUseFramingAnimation } from "./to-engine/SetUseFramingAnimation";
38
38
  import { SetSkeletonStatesMessage } from "./to-engine/SetSkeletonStatesMessage";
39
39
  import { RecenterSkeletonObjectsMessage } from "./to-engine/RecenterSkeletonObjectsMessage";
40
40
  import { SetShadowPlaneVisibilityMessage } from "./to-engine/SetShadowPlaneVisibilityMessage";
41
+ import { DisplayLoadingUiMessage } from "./from-engine/DisplayLoadingUiMessage";
42
+ import { HideLoadingUiMessage } from "./from-engine/HideLoadingUiMessage";
41
43
 
42
44
  /**
43
45
  * A message sent from the engine to the embedder.
@@ -63,8 +65,10 @@ export interface ToEngineMessage<Channel> {
63
65
  export type FromEnginePostMessage =
64
66
  | AckMessage
65
67
  | CanvasImageUrlMessage
68
+ | DisplayLoadingUiMessage
66
69
  | EngineReadyMessage
67
70
  | HideGuiMessage
71
+ | HideLoadingUiMessage
68
72
  | KeyDownMessage
69
73
  | PointerEventMessage
70
74
  | SetEffectsSettingsAckMessage
@@ -9,8 +9,9 @@ import { ToEngineMessage } from "../post-messages";
9
9
  export interface SetCutoutTextureMessage
10
10
  extends ToEngineMessage<"set-cutout-texture"> {
11
11
  /**
12
- * The cutout mask in the PNG format or an empty string to reset it (i.e.,
13
- * setting a texture with no cutouts).
12
+ * The cutout mask in the PNG format. Can either be a blob or a URL to the
13
+ * cutout texture. An empty string is used to reset it (i.e., setting a
14
+ * texture with no cutouts).
14
15
  */
15
- payload: Blob | "";
16
+ payload: Blob | string | "";
16
17
  }