@dreamcomposer/engine-types 0.0.6 → 0.0.9
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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { MaterialDefinition } from "./Material";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* A 2D layer.
|
|
3
5
|
*/
|
|
@@ -8,12 +10,11 @@ export interface Layer {
|
|
|
8
10
|
*
|
|
9
11
|
* Should start at `0`.
|
|
10
12
|
*/
|
|
11
|
-
// TODO: The order should be dynamically set by the engine
|
|
12
13
|
order: number;
|
|
13
14
|
/**
|
|
14
|
-
* The name of the material of the layer (e.g., "print_diffuse")
|
|
15
|
+
* The name of the material of the layer (e.g., "print_diffuse") or a complete material definition
|
|
15
16
|
*/
|
|
16
|
-
material: string;
|
|
17
|
+
material: string | MaterialDefinition;
|
|
17
18
|
/**
|
|
18
19
|
* Whether or not the layer is visible.
|
|
19
20
|
*
|
|
@@ -39,10 +40,8 @@ export interface Layer {
|
|
|
39
40
|
*/
|
|
40
41
|
overprintColor?: string;
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
43
|
* Overprint mode. Can be either "tint" (for tintable foils) or "opaque" (for
|
|
44
44
|
* spot colors)
|
|
45
|
-
*
|
|
46
45
|
*/
|
|
47
46
|
overprintMode?: "tint" | "opaque";
|
|
48
47
|
/**
|
package/Material.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface MaterialDefinition {
|
|
2
|
+
materialBase: string;
|
|
3
|
+
materialPBRShaderInjections?: string[];
|
|
4
|
+
materialExtensions: string[];
|
|
5
|
+
materialOverrides: Record<string, unknown> | Record<string, unknown>[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface MaterialExtension {
|
|
9
|
+
metadata: {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
materialsOverrides: Record<string, unknown> | Record<string, unknown>[];
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FromEngineMessage } from "../post-messages";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Sent whenever a file
|
|
4
|
+
* Sent whenever a file is loaded by the engine.
|
|
5
5
|
*/
|
|
6
6
|
export interface SetLoadingProgressMessage
|
|
7
7
|
extends FromEngineMessage<"set-loading-progress"> {
|
|
@@ -21,13 +21,13 @@ export interface SetLoadingProgressMessage
|
|
|
21
21
|
/**
|
|
22
22
|
* The bytes loaded so far.
|
|
23
23
|
*
|
|
24
|
-
* `-1` if an error
|
|
24
|
+
* `-1` if an error occurred.
|
|
25
25
|
*/
|
|
26
26
|
bytes: number;
|
|
27
27
|
/**
|
|
28
28
|
* The total bytes of the file (or `0` if not known yet).
|
|
29
29
|
*
|
|
30
|
-
* `-1` if an error
|
|
30
|
+
* `-1` if an error occurred.
|
|
31
31
|
*/
|
|
32
32
|
total: number;
|
|
33
33
|
};
|
package/package.json
CHANGED
package/post-messages.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import { SetGeometryUrlMessage } from "./to-engine/SetGeometryUrlMessage";
|
|
|
34
34
|
import { ToggleVrMessage } from "./to-engine/ToggleVrMessage";
|
|
35
35
|
import { PointerEventMessage } from "./from-engine/PointerEventMessage";
|
|
36
36
|
import { HideGuiMessage } from "./from-engine/HideGuiMessage";
|
|
37
|
+
import { SetUseFramingAnimation } from "./to-engine/SetUseFramingAnimation";
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* A message sent from the engine to the embedder.
|
|
@@ -91,6 +92,7 @@ export type ToEnginePostMessage =
|
|
|
91
92
|
| SetStageMappingsMessage
|
|
92
93
|
| SetStageRotationsMessage
|
|
93
94
|
| SetSurfaceMaterialIdMessage
|
|
95
|
+
| SetUseFramingAnimation
|
|
94
96
|
| ToggleFullscreenMessage
|
|
95
97
|
| ToggleInspectorMessage
|
|
96
98
|
| ToggleVrMessage
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToEngineMessage } from "../post-messages";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Enable/disable framing animations
|
|
5
|
+
*/
|
|
6
|
+
export interface SetUseFramingAnimation
|
|
7
|
+
extends ToEngineMessage<"set-use-framing-animation"> {
|
|
8
|
+
/**
|
|
9
|
+
* A boolean, setting current engine mode for framing animations
|
|
10
|
+
*/
|
|
11
|
+
payload: boolean;
|
|
12
|
+
}
|