@dreamcomposer/engine-types 0.0.27 → 0.0.28-next.3

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
  *
@@ -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>>
@@ -1,5 +1,4 @@
1
1
  import { ToEngineMessage } from "../post-messages";
2
- import { Vector2 } from "@babylonjs/core/Maths/math";
3
2
 
4
3
  // Mouse events from engine to clients
5
4
  export interface PointerEvent {
@@ -8,7 +7,10 @@ export interface PointerEvent {
8
7
  drag: boolean;
9
8
  type: string;
10
9
  buttons: number;
11
- pick?: Vector2;
10
+ pick?: {
11
+ x: number;
12
+ y: number;
13
+ };
12
14
  shiftKey: boolean;
13
15
  }
14
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamcomposer/engine-types",
3
- "version": "0.0.27",
3
+ "version": "0.0.28-next.3",
4
4
  "description": "The type definitions for messages from and to the engine",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -8,7 +8,6 @@
8
8
  "**/*.ts"
9
9
  ],
10
10
  "devDependencies": {
11
- "@babylonjs/core": "5.0.0-alpha.58",
12
11
  "prettier": "^2.5.1",
13
12
  "typescript": "^4.4.4"
14
13
  },