@wonderlandengine/editor-api 1.5.0-rc.3 → 1.5.0-rc.5
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/dist/data.js +20 -20
- package/dist/index.js +2 -4
- package/dist/native.d.ts +5 -0
- package/dist/tools.d.ts +1 -0
- package/dist/tools.js +1 -0
- package/dist/ui.d.ts +14 -1
- package/dist/ui.js +14 -1
- package/package.json +1 -1
package/dist/data.js
CHANGED
|
@@ -6,7 +6,7 @@ export var ProjectType;
|
|
|
6
6
|
(function (ProjectType) {
|
|
7
7
|
ProjectType["Website"] = "website";
|
|
8
8
|
ProjectType["Game"] = "game";
|
|
9
|
-
})(ProjectType || (ProjectType = {}));
|
|
9
|
+
})(ProjectType = ProjectType || (ProjectType = {}));
|
|
10
10
|
export function toValue(value) {
|
|
11
11
|
if (ApiObject.isPrototypeOf(value))
|
|
12
12
|
return value.toValue();
|
|
@@ -33,7 +33,7 @@ export var RecordType;
|
|
|
33
33
|
RecordType[RecordType["Id"] = 11] = "Id";
|
|
34
34
|
RecordType[RecordType["Enum"] = 12] = "Enum";
|
|
35
35
|
RecordType[RecordType["EnumInt"] = 13] = "EnumInt";
|
|
36
|
-
})(RecordType || (RecordType = {}));
|
|
36
|
+
})(RecordType = RecordType || (RecordType = {}));
|
|
37
37
|
export class Access {
|
|
38
38
|
recordType;
|
|
39
39
|
exists;
|
|
@@ -112,7 +112,7 @@ export var TonemappingMode;
|
|
|
112
112
|
TonemappingMode["Reinhard"] = "reinhard";
|
|
113
113
|
/** Tonemapping with an exponential curve */
|
|
114
114
|
TonemappingMode["Exponential"] = "exponential";
|
|
115
|
-
})(TonemappingMode || (TonemappingMode = {}));
|
|
115
|
+
})(TonemappingMode = TonemappingMode || (TonemappingMode = {}));
|
|
116
116
|
/** HDR settings */
|
|
117
117
|
export class HdrSettings extends Access {
|
|
118
118
|
exposure = 1.0;
|
|
@@ -129,7 +129,7 @@ export var EnvironmentMode;
|
|
|
129
129
|
EnvironmentMode["SphericalHarmonic0"] = "spherical-harmonic-0";
|
|
130
130
|
EnvironmentMode["SphericalHarmonic1"] = "spherical-harmonic-1";
|
|
131
131
|
EnvironmentMode["SphericalHarmonic2"] = "spherical-harmonic-2";
|
|
132
|
-
})(EnvironmentMode || (EnvironmentMode = {}));
|
|
132
|
+
})(EnvironmentMode = EnvironmentMode || (EnvironmentMode = {}));
|
|
133
133
|
/** Environment settings */
|
|
134
134
|
export class EnvironmentSettings extends Access {
|
|
135
135
|
enabled = false;
|
|
@@ -204,7 +204,7 @@ export var BundlingType;
|
|
|
204
204
|
BundlingType["None"] = "none";
|
|
205
205
|
BundlingType["Esbuild"] = "esbuild";
|
|
206
206
|
BundlingType["Npm"] = "npm";
|
|
207
|
-
})(BundlingType || (BundlingType = {}));
|
|
207
|
+
})(BundlingType = BundlingType || (BundlingType = {}));
|
|
208
208
|
/** Scripting settings */
|
|
209
209
|
export class ScriptingSettings extends Access {
|
|
210
210
|
sourcePaths = [];
|
|
@@ -307,7 +307,7 @@ export var ImageCompressionType;
|
|
|
307
307
|
ImageCompressionType["None"] = "etc1s";
|
|
308
308
|
ImageCompressionType["ETC1s"] = "etc1s";
|
|
309
309
|
ImageCompressionType["UASTC"] = "uastc";
|
|
310
|
-
})(ImageCompressionType || (ImageCompressionType = {}));
|
|
310
|
+
})(ImageCompressionType = ImageCompressionType || (ImageCompressionType = {}));
|
|
311
311
|
export class Link extends Access {
|
|
312
312
|
name = '';
|
|
313
313
|
file = '';
|
|
@@ -342,13 +342,13 @@ export var ShaderStage;
|
|
|
342
342
|
(function (ShaderStage) {
|
|
343
343
|
ShaderStage["Fragment"] = "fragment";
|
|
344
344
|
ShaderStage["Vertex"] = "vertex";
|
|
345
|
-
})(ShaderStage || (ShaderStage = {}));
|
|
345
|
+
})(ShaderStage = ShaderStage || (ShaderStage = {}));
|
|
346
346
|
/** Shader type enum */
|
|
347
347
|
export var ShaderType;
|
|
348
348
|
(function (ShaderType) {
|
|
349
349
|
ShaderType["Forward"] = "forward";
|
|
350
350
|
ShaderType["Fullscreen"] = "fullscreen";
|
|
351
|
-
})(ShaderType || (ShaderType = {}));
|
|
351
|
+
})(ShaderType = ShaderType || (ShaderType = {}));
|
|
352
352
|
/** Shader resource */
|
|
353
353
|
export class ShaderResource extends Resource {
|
|
354
354
|
name = 'shader';
|
|
@@ -475,14 +475,14 @@ export var AnimationBlendType;
|
|
|
475
475
|
(function (AnimationBlendType) {
|
|
476
476
|
AnimationBlendType["None"] = "none";
|
|
477
477
|
AnimationBlendType["Blend1D"] = "blend1D";
|
|
478
|
-
})(AnimationBlendType || (AnimationBlendType = {}));
|
|
478
|
+
})(AnimationBlendType = AnimationBlendType || (AnimationBlendType = {}));
|
|
479
479
|
/** Root motion handling mode */
|
|
480
480
|
export var RootMotionMode;
|
|
481
481
|
(function (RootMotionMode) {
|
|
482
482
|
RootMotionMode["None"] = "none";
|
|
483
483
|
RootMotionMode["ApplyToOwner"] = "applyToOwner";
|
|
484
484
|
RootMotionMode["ScriptEvent"] = "scriptEvent";
|
|
485
|
-
})(RootMotionMode || (RootMotionMode = {}));
|
|
485
|
+
})(RootMotionMode = RootMotionMode || (RootMotionMode = {}));
|
|
486
486
|
/** 'animation' component */
|
|
487
487
|
export class AnimationComponent extends Access {
|
|
488
488
|
preview = false;
|
|
@@ -506,7 +506,7 @@ export var LightType;
|
|
|
506
506
|
LightType["Spot"] = "spot";
|
|
507
507
|
/** Sun light type */
|
|
508
508
|
LightType["Sun"] = "sun";
|
|
509
|
-
})(LightType || (LightType = {}));
|
|
509
|
+
})(LightType = LightType || (LightType = {}));
|
|
510
510
|
/** 'light' component */
|
|
511
511
|
export class LightComponent extends Access {
|
|
512
512
|
type = LightType.Point;
|
|
@@ -528,7 +528,7 @@ export var ProjectionType;
|
|
|
528
528
|
ProjectionType["Perspective"] = "perspective";
|
|
529
529
|
/** Orthographic projection */
|
|
530
530
|
ProjectionType["Orthographic"] = "orthographic";
|
|
531
|
-
})(ProjectionType || (ProjectionType = {}));
|
|
531
|
+
})(ProjectionType = ProjectionType || (ProjectionType = {}));
|
|
532
532
|
/** 'view' component */
|
|
533
533
|
export class ViewComponent extends Access {
|
|
534
534
|
projectionType = ProjectionType.Perspective;
|
|
@@ -568,7 +568,7 @@ export var PhysXShapeType;
|
|
|
568
568
|
PhysXShapeType["Capsule"] = "capsule";
|
|
569
569
|
PhysXShapeType["TriangleMesh"] = "triangleMesh";
|
|
570
570
|
PhysXShapeType["ConvexMesh"] = "convexMesh";
|
|
571
|
-
})(PhysXShapeType || (PhysXShapeType = {}));
|
|
571
|
+
})(PhysXShapeType = PhysXShapeType || (PhysXShapeType = {}));
|
|
572
572
|
/** 'physx' component */
|
|
573
573
|
export class PhysXComponent extends Access {
|
|
574
574
|
static = false;
|
|
@@ -613,7 +613,7 @@ export var TextEffectType;
|
|
|
613
613
|
TextEffectType["None"] = "none";
|
|
614
614
|
TextEffectType["Outline"] = "outline";
|
|
615
615
|
TextEffectType["Shadow"] = "shadow";
|
|
616
|
-
})(TextEffectType || (TextEffectType = {}));
|
|
616
|
+
})(TextEffectType = TextEffectType || (TextEffectType = {}));
|
|
617
617
|
/** Text wrap mode */
|
|
618
618
|
export var TextWrapMode;
|
|
619
619
|
(function (TextWrapMode) {
|
|
@@ -621,7 +621,7 @@ export var TextWrapMode;
|
|
|
621
621
|
TextWrapMode["Soft"] = "soft";
|
|
622
622
|
TextWrapMode["Hard"] = "hard";
|
|
623
623
|
TextWrapMode["Clip"] = "clip";
|
|
624
|
-
})(TextWrapMode || (TextWrapMode = {}));
|
|
624
|
+
})(TextWrapMode = TextWrapMode || (TextWrapMode = {}));
|
|
625
625
|
/** 'text' component */
|
|
626
626
|
export class TextComponent extends Access {
|
|
627
627
|
alignment = 'center';
|
|
@@ -666,7 +666,7 @@ export var InputType;
|
|
|
666
666
|
InputType["HandRight"] = "hand right";
|
|
667
667
|
InputType["RayLeft"] = "ray left";
|
|
668
668
|
InputType["RayRight"] = "ray right";
|
|
669
|
-
})(InputType || (InputType = {}));
|
|
669
|
+
})(InputType = InputType || (InputType = {}));
|
|
670
670
|
/** 'input' component */
|
|
671
671
|
export class InputComponent extends Access {
|
|
672
672
|
type = InputType.Head;
|
|
@@ -759,7 +759,7 @@ export var BlendFunction;
|
|
|
759
759
|
BlendFunction["OneMinusDestinationColor"] = "one minus destination color";
|
|
760
760
|
BlendFunction["DestinationAlpha"] = "destination alpha";
|
|
761
761
|
BlendFunction["OneMinusDestinationAlpha"] = "one minus destination alpha";
|
|
762
|
-
})(BlendFunction || (BlendFunction = {}));
|
|
762
|
+
})(BlendFunction = BlendFunction || (BlendFunction = {}));
|
|
763
763
|
/** Blend equation enum for {@link PipelineResource} */
|
|
764
764
|
export var BlendEquation;
|
|
765
765
|
(function (BlendEquation) {
|
|
@@ -768,7 +768,7 @@ export var BlendEquation;
|
|
|
768
768
|
BlendEquation["ReverseSubtract"] = "reverse subtract";
|
|
769
769
|
BlendEquation["Min"] = "min";
|
|
770
770
|
BlendEquation["Max"] = "max";
|
|
771
|
-
})(BlendEquation || (BlendEquation = {}));
|
|
771
|
+
})(BlendEquation = BlendEquation || (BlendEquation = {}));
|
|
772
772
|
/** Depth function enum for {@link PipelineResource} */
|
|
773
773
|
export var DepthFunction;
|
|
774
774
|
(function (DepthFunction) {
|
|
@@ -780,7 +780,7 @@ export var DepthFunction;
|
|
|
780
780
|
DepthFunction["NotEqual"] = "not equal";
|
|
781
781
|
DepthFunction["GreaterOrEqual"] = "greater or equal";
|
|
782
782
|
DepthFunction["Greater"] = "greater";
|
|
783
|
-
})(DepthFunction || (DepthFunction = {}));
|
|
783
|
+
})(DepthFunction = DepthFunction || (DepthFunction = {}));
|
|
784
784
|
/** Mesh sorting mode */
|
|
785
785
|
export var MeshSorting;
|
|
786
786
|
(function (MeshSorting) {
|
|
@@ -788,7 +788,7 @@ export var MeshSorting;
|
|
|
788
788
|
MeshSorting["Z"] = "z";
|
|
789
789
|
MeshSorting["InverseZ"] = "inverse-z";
|
|
790
790
|
MeshSorting["MeshIndex"] = "mesh-index";
|
|
791
|
-
})(MeshSorting || (MeshSorting = {}));
|
|
791
|
+
})(MeshSorting = MeshSorting || (MeshSorting = {}));
|
|
792
792
|
/** Pipeline resource */
|
|
793
793
|
export class PipelineResource extends Resource {
|
|
794
794
|
name = 'pipeline';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export * from './data.js';
|
|
2
2
|
export * from './editor-state.js';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
import * as tools_1 from './tools.js';
|
|
6
|
-
export { tools_1 as tools };
|
|
3
|
+
export * as ui from './ui.js';
|
|
4
|
+
export * as tools from './tools.js';
|
|
7
5
|
export * from './workspace.js';
|
|
8
6
|
/** Editor plugin */
|
|
9
7
|
export class EditorPlugin {
|
package/dist/native.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ interface NativeToolsAPI {
|
|
|
10
10
|
openBrowser(url: string): void;
|
|
11
11
|
computeMeshBounds(meshId: string, out: Float32Array): void;
|
|
12
12
|
saveProject(): void;
|
|
13
|
+
getComponentTypes(): {
|
|
14
|
+
name: string;
|
|
15
|
+
properties: Record<string, string>;
|
|
16
|
+
}[];
|
|
13
17
|
}
|
|
14
18
|
interface NativeUiAPI {
|
|
15
19
|
freeImage(id: number): void;
|
|
@@ -19,6 +23,7 @@ interface NativeUiAPI {
|
|
|
19
23
|
button(label: string): boolean;
|
|
20
24
|
image(id: number, width: number, height: number): boolean;
|
|
21
25
|
inputText(label: string, value: string): string | null;
|
|
26
|
+
inputTextPassword(label: string, value: string): string | null;
|
|
22
27
|
inputTextMultiline(widgetId: string, value: string): string | null;
|
|
23
28
|
checkbox(label: string, value: boolean): boolean | null;
|
|
24
29
|
colorEdit4(label: string, value: Float32Array): boolean;
|
package/dist/tools.d.ts
CHANGED
|
@@ -34,3 +34,4 @@ export declare function loadScene(path: string, options: {
|
|
|
34
34
|
export declare const openBrowser: (url: string) => void;
|
|
35
35
|
export declare const computeMeshBounds: (meshId: string, out: Float32Array) => void;
|
|
36
36
|
export declare const saveProject: () => void;
|
|
37
|
+
export declare const getComponentTypes: () => void;
|
package/dist/tools.js
CHANGED
|
@@ -51,3 +51,4 @@ export function loadScene(path, options) {
|
|
|
51
51
|
export const openBrowser = tools.openBrowser.bind(tools);
|
|
52
52
|
export const computeMeshBounds = tools.computeMeshBounds.bind(tools);
|
|
53
53
|
export const saveProject = tools.saveProject.bind(tools);
|
|
54
|
+
export const getComponentTypes = tools.getComponentTypes.bind(tools);
|
package/dist/ui.d.ts
CHANGED
|
@@ -54,7 +54,20 @@ export declare function image(image: UiImage, width: number, height: number): bo
|
|
|
54
54
|
*/
|
|
55
55
|
export declare const inputText: (label: string, value: string) => string | null;
|
|
56
56
|
/**
|
|
57
|
-
* Text input field
|
|
57
|
+
* Text input field for passwords.
|
|
58
|
+
*
|
|
59
|
+
* Shows asterisks instead of the actual characters and disables copying.
|
|
60
|
+
*
|
|
61
|
+
* @param label Label to display next to the field.
|
|
62
|
+
* @param value Current value to set the field to.
|
|
63
|
+
* @returns The new string value when changed by the user this frame, otherwise `null`.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* s = ui.inputTextPassword("change secret:", s) || s;
|
|
67
|
+
*/
|
|
68
|
+
export declare const inputTextPassword: (label: string, value: string) => string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Text input field for multiple lines.
|
|
58
71
|
*
|
|
59
72
|
* @param widgetId Unique id for the widget.
|
|
60
73
|
* @param value Current value to set the field to.
|
package/dist/ui.js
CHANGED
|
@@ -78,7 +78,20 @@ export function image(image, width, height) {
|
|
|
78
78
|
*/
|
|
79
79
|
export const inputText = ui.inputText.bind(ui);
|
|
80
80
|
/**
|
|
81
|
-
* Text input field
|
|
81
|
+
* Text input field for passwords.
|
|
82
|
+
*
|
|
83
|
+
* Shows asterisks instead of the actual characters and disables copying.
|
|
84
|
+
*
|
|
85
|
+
* @param label Label to display next to the field.
|
|
86
|
+
* @param value Current value to set the field to.
|
|
87
|
+
* @returns The new string value when changed by the user this frame, otherwise `null`.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* s = ui.inputTextPassword("change secret:", s) || s;
|
|
91
|
+
*/
|
|
92
|
+
export const inputTextPassword = ui.inputTextPassword.bind(ui);
|
|
93
|
+
/**
|
|
94
|
+
* Text input field for multiple lines.
|
|
82
95
|
*
|
|
83
96
|
* @param widgetId Unique id for the widget.
|
|
84
97
|
* @param value Current value to set the field to.
|
package/package.json
CHANGED