@wonderlandengine/editor-api 1.2.0-dev.2 → 1.2.0-dev.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/dist/data.d.ts CHANGED
@@ -380,9 +380,18 @@ export declare class LightComponent {
380
380
  shadowTexelSize: number;
381
381
  cascadeCount: number;
382
382
  }
383
+ /** View projection type enum */
384
+ export declare enum ProjectionType {
385
+ /** Perspective projection */
386
+ Perspective = "perspective",
387
+ /** Orthographic projection */
388
+ Orthographic = "orthographic"
389
+ }
383
390
  /** 'view' component configuration */
384
391
  export declare class ViewComponent {
392
+ projectionType: ProjectionType;
385
393
  fov: number;
394
+ extent: number;
386
395
  near: number;
387
396
  far: number;
388
397
  }
package/dist/data.js CHANGED
@@ -375,9 +375,19 @@ export class LightComponent {
375
375
  shadowTexelSize = 1.0;
376
376
  cascadeCount = 4;
377
377
  }
378
+ /** View projection type enum */
379
+ export var ProjectionType;
380
+ (function (ProjectionType) {
381
+ /** Perspective projection */
382
+ ProjectionType["Perspective"] = "perspective";
383
+ /** Orthographic projection */
384
+ ProjectionType["Orthographic"] = "orthographic";
385
+ })(ProjectionType || (ProjectionType = {}));
378
386
  /** 'view' component configuration */
379
387
  export class ViewComponent {
388
+ projectionType = ProjectionType.Perspective;
380
389
  fov = 90;
390
+ extent = 10;
381
391
  near = 0.01;
382
392
  far = 100;
383
393
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './data.js';
2
2
  export * as ui from './ui.js';
3
3
  export * as tools from './tools.js';
4
+ export * from './project.js';
4
5
  /** Editor plugin */
5
6
  export declare class EditorPlugin {
6
7
  name: string;
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import * as ui_1 from './ui.js';
3
3
  export { ui_1 as ui };
4
4
  import * as tools_1 from './tools.js';
5
5
  export { tools_1 as tools };
6
+ export * from './project.js';
6
7
  /** Editor plugin */
7
8
  export class EditorPlugin {
8
9
  name = 'Editor Plugin';
package/dist/native.d.ts CHANGED
@@ -21,9 +21,49 @@ interface NativeUiAPI {
21
21
  beginGroup(): void;
22
22
  endGroup(): void;
23
23
  }
24
+ export interface Project {
25
+ /**
26
+ * Root directory of the project
27
+ *
28
+ * Directory in which the project file resides in.
29
+ */
30
+ readonly rootPath: string;
31
+ /**
32
+ * Project filename
33
+ *
34
+ * File only without the root directory.
35
+ */
36
+ readonly filename: string;
37
+ /**
38
+ * Project deploy path
39
+ * @returns `<root>/deploy`
40
+ */
41
+ readonly deployPath: string;
42
+ /**
43
+ * Project cache path
44
+ * @returns `<root>/cache`
45
+ */
46
+ readonly cachePath: string;
47
+ /**
48
+ * Project package.json path
49
+ * @returns `<root>/package.json`
50
+ */
51
+ readonly packageJsonPath: string;
52
+ /**
53
+ * Project node_modules path
54
+ * @returns `<root>/node_modules`
55
+ */
56
+ readonly nodeModulesPath: string;
57
+ /**
58
+ * Project shaders path
59
+ * @returns `<root>/shaders`
60
+ */
61
+ readonly shadersPath: string;
62
+ }
24
63
  declare global {
25
64
  function _wl_internalBinding(moduleName: 'tools'): NativeToolsAPI;
26
65
  function _wl_internalBinding(moduleName: 'ui'): NativeUiAPI;
27
66
  function _wl_internalBinding(moduleName: 'data'): EditorData;
67
+ function _wl_internalBinding(moduleName: 'project'): Project;
28
68
  }
29
69
  export {};
@@ -0,0 +1 @@
1
+ export declare const project: import("./native.js").Project;
@@ -0,0 +1 @@
1
+ export const project = _wl_internalBinding('project');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderlandengine/editor-api",
3
- "version": "1.2.0-dev.2",
3
+ "version": "1.2.0-dev.3",
4
4
  "description": "Wonderland Engine's Editor API for plugins - very experimental.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",