@wonderlandengine/editor-api 1.5.0-rc.1 → 1.5.0-rc.2

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.d.ts CHANGED
@@ -39,7 +39,17 @@ export declare enum RecordType {
39
39
  /** A dictionary (key-value pairs) of records */
40
40
  Dict = 2,
41
41
  /** A dictionary (key-value pairs) of records with stable indices */
42
- IdDict = 3
42
+ IdDict = 3,
43
+ Value = 4,
44
+ Bool = 5,
45
+ Int = 6,
46
+ Uint = 7,
47
+ Float = 8,
48
+ Double = 9,
49
+ String = 10,
50
+ Id = 11,
51
+ Enum = 12,
52
+ EnumInt = 13
43
53
  }
44
54
  export declare class Access {
45
55
  recordType?: () => RecordType;
@@ -131,6 +141,7 @@ export declare class RenderingSettings extends Access {
131
141
  usePreZ: boolean;
132
142
  useMultiDraw: boolean;
133
143
  useTextureStreaming: boolean;
144
+ deferSkinningCompilation: boolean;
134
145
  sky: SkySettings;
135
146
  bloom: BloomSettings;
136
147
  hdr: HdrSettings;
@@ -296,6 +307,8 @@ export declare class Resource extends Access {
296
307
  name: string;
297
308
  link: Link | null;
298
309
  packageAlways: boolean;
310
+ resourceKey: string;
311
+ resourceId: number;
299
312
  }
300
313
  /** Image resource */
301
314
  export declare class ImageResource extends Resource {
@@ -819,9 +832,11 @@ export declare class FileResource extends Resource {
819
832
  importerName: string;
820
833
  importPhysicalAsPhongMaterials: boolean;
821
834
  }
822
- export declare class ResourceSection<T> {
835
+ export type ResourceSection<T> = {
836
+ add(): T;
837
+ } & {
823
838
  [key: string]: T;
824
- }
839
+ };
825
840
  /**
826
841
  * Access to Wonderland Editor's data.
827
842
  *
package/dist/data.js CHANGED
@@ -23,8 +23,17 @@ export var RecordType;
23
23
  RecordType[RecordType["Dict"] = 2] = "Dict";
24
24
  /** A dictionary (key-value pairs) of records with stable indices */
25
25
  RecordType[RecordType["IdDict"] = 3] = "IdDict";
26
+ RecordType[RecordType["Value"] = 4] = "Value";
27
+ RecordType[RecordType["Bool"] = 5] = "Bool";
28
+ RecordType[RecordType["Int"] = 6] = "Int";
29
+ RecordType[RecordType["Uint"] = 7] = "Uint";
30
+ RecordType[RecordType["Float"] = 8] = "Float";
31
+ RecordType[RecordType["Double"] = 9] = "Double";
32
+ RecordType[RecordType["String"] = 10] = "String";
33
+ RecordType[RecordType["Id"] = 11] = "Id";
34
+ RecordType[RecordType["Enum"] = 12] = "Enum";
35
+ RecordType[RecordType["EnumInt"] = 13] = "EnumInt";
26
36
  })(RecordType || (RecordType = {}));
27
- ;
28
37
  export class Access {
29
38
  recordType;
30
39
  exists;
@@ -55,13 +64,13 @@ export class Access {
55
64
  }
56
65
  }
57
66
  if (ApiObject) {
58
- Object.assign(ApiObject, {
59
- keys: Access.prototype.keys,
60
- values: Access.prototype.values,
61
- entries: Access.prototype.entries,
62
- toValue: Access.prototype.toValue,
63
- toJSON: Access.prototype.toJSON,
64
- [Symbol.iterator]: Access.prototype[Symbol.iterator],
67
+ Object.defineProperties(ApiObject, {
68
+ keys: { value: Access.prototype.keys, enumerable: false },
69
+ values: { value: Access.prototype.values, enumerable: false },
70
+ entries: { value: Access.prototype.entries, enumerable: false },
71
+ toValue: { value: Access.prototype.toValue, enumerable: false },
72
+ toJSON: { value: Access.prototype.toJSON, enumerable: false },
73
+ [Symbol.iterator]: { value: Access.prototype[Symbol.iterator], enumerable: false },
65
74
  });
66
75
  }
67
76
  /** Project settings */
@@ -141,6 +150,7 @@ export class RenderingSettings extends Access {
141
150
  usePreZ = false;
142
151
  useMultiDraw = false;
143
152
  useTextureStreaming = true;
153
+ deferSkinningCompilation = false;
144
154
  sky = new SkySettings();
145
155
  bloom = new BloomSettings();
146
156
  hdr = new HdrSettings();
@@ -306,6 +316,8 @@ export class Resource extends Access {
306
316
  name = '';
307
317
  link = null;
308
318
  packageAlways = false;
319
+ resourceKey = "0";
320
+ resourceId = 0;
309
321
  }
310
322
  /** Image resource */
311
323
  export class ImageResource extends Resource {
@@ -838,5 +850,3 @@ export class FileResource extends Resource {
838
850
  importerName = '';
839
851
  importPhysicalAsPhongMaterials = true;
840
852
  }
841
- export class ResourceSection {
842
- }
@@ -0,0 +1,15 @@
1
+ export interface Camera {
2
+ lookAt(target: [number, number, number]): void;
3
+ }
4
+ export interface SceneViewState {
5
+ camera: Camera;
6
+ }
7
+ export interface EditorState {
8
+ /** `true` if baking is in progress. */
9
+ baking: boolean;
10
+ sceneView: SceneViewState;
11
+ }
12
+ declare global {
13
+ function _wl_internalBinding(moduleName: 'editorState'): EditorState;
14
+ }
15
+ export declare const editorState: EditorState;
@@ -0,0 +1 @@
1
+ export const editorState = _wl_internalBinding('editorState');
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './data.js';
2
+ export * from './editor-state.js';
2
3
  export * as ui from './ui.js';
3
4
  export * as tools from './tools.js';
4
5
  export * from './workspace.js';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './data.js';
2
+ export * from './editor-state.js';
2
3
  import * as ui_1 from './ui.js';
3
4
  export { ui_1 as ui };
4
5
  import * as tools_1 from './tools.js';
package/dist/native.d.ts CHANGED
@@ -9,6 +9,7 @@ interface NativeToolsAPI {
9
9
  awaitJob(jobId: number, cb: (success: boolean) => void): void;
10
10
  openBrowser(url: string): void;
11
11
  computeMeshBounds(meshId: string, out: Float32Array): void;
12
+ saveProject(): void;
12
13
  }
13
14
  interface NativeUiAPI {
14
15
  freeImage(id: number): void;
package/dist/tools.d.ts CHANGED
@@ -33,3 +33,4 @@ export declare function loadScene(path: string, options: {
33
33
  */
34
34
  export declare const openBrowser: (url: string) => void;
35
35
  export declare const computeMeshBounds: (meshId: string, out: Float32Array) => void;
36
+ export declare const saveProject: () => void;
package/dist/tools.js CHANGED
@@ -50,3 +50,4 @@ export function loadScene(path, options) {
50
50
  */
51
51
  export const openBrowser = tools.openBrowser.bind(tools);
52
52
  export const computeMeshBounds = tools.computeMeshBounds.bind(tools);
53
+ export const saveProject = tools.saveProject.bind(tools);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderlandengine/editor-api",
3
- "version": "1.5.0-rc.1",
3
+ "version": "1.5.0-rc.2",
4
4
  "description": "Wonderland Engine's Editor API for plugins - very experimental.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",