@planara/core 1.4.9 → 1.5.0

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.
Files changed (43) hide show
  1. package/dist/core/editor-renderer.d.ts +31 -2
  2. package/dist/core/editor-renderer.d.ts.map +1 -1
  3. package/dist/core/preview-renderer.d.ts +1 -0
  4. package/dist/core/preview-renderer.d.ts.map +1 -1
  5. package/dist/core/renderer.d.ts +2 -1
  6. package/dist/core/renderer.d.ts.map +1 -1
  7. package/dist/extensions/orbit-extension.d.ts +4 -1
  8. package/dist/extensions/orbit-extension.d.ts.map +1 -1
  9. package/dist/handlers/display/wireframe-handler.d.ts +37 -0
  10. package/dist/handlers/display/wireframe-handler.d.ts.map +1 -0
  11. package/dist/hub/app-hub.d.ts +8 -0
  12. package/dist/hub/app-hub.d.ts.map +1 -0
  13. package/dist/hub/editor-hub.d.ts +13 -0
  14. package/dist/hub/editor-hub.d.ts.map +1 -0
  15. package/dist/index.cjs.js +32 -4
  16. package/dist/index.d.ts +3 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.es.js +1636 -71
  19. package/dist/index.full.d.ts +216 -0
  20. package/dist/index.public.d.ts +174 -0
  21. package/dist/index.umd.js +32 -4
  22. package/dist/interfaces/display-handler.d.ts +12 -0
  23. package/dist/interfaces/display-handler.d.ts.map +1 -0
  24. package/dist/interfaces/handler.d.ts +22 -0
  25. package/dist/interfaces/handler.d.ts.map +1 -0
  26. package/dist/interfaces/manager.d.ts +22 -0
  27. package/dist/interfaces/manager.d.ts.map +1 -0
  28. package/dist/interfaces/mesh-api.d.ts +38 -0
  29. package/dist/interfaces/mesh-api.d.ts.map +1 -0
  30. package/dist/interfaces/renderer-api.d.ts +14 -0
  31. package/dist/interfaces/renderer-api.d.ts.map +1 -0
  32. package/dist/ioc/container.d.ts +4 -0
  33. package/dist/ioc/container.d.ts.map +1 -0
  34. package/dist/loaders/obj-loader.d.ts +2 -1
  35. package/dist/loaders/obj-loader.d.ts.map +1 -1
  36. package/dist/managers/display-manager.d.ts +19 -0
  37. package/dist/managers/display-manager.d.ts.map +1 -0
  38. package/dist/tsdoc-metadata.json +11 -0
  39. package/dist/utils/program-settings.d.ts +4 -3
  40. package/dist/utils/program-settings.d.ts.map +1 -1
  41. package/dist/utils/renderer-api.d.ts +19 -0
  42. package/dist/utils/renderer-api.d.ts.map +1 -0
  43. package/package.json +16 -4
@@ -1,10 +1,11 @@
1
1
  import { Renderer } from './renderer';
2
- import { Mesh } from 'ogl';
2
+ import { Mesh, OGLRenderingContext } from 'ogl';
3
3
  import { Figure } from '@planara/types';
4
4
  /**
5
5
  * Рендерер для редактора.
6
6
  * Добавляет сетку, оси координат и поддержку Orbit для управления камерой.
7
7
  * Наследуется от базового Renderer.
8
+ * @public
8
9
  */
9
10
  export declare class EditorRenderer extends Renderer {
10
11
  /** Orbit-контроллер для управления камерой */
@@ -21,6 +22,34 @@ export declare class EditorRenderer extends Renderer {
21
22
  * @param canvas - HTMLCanvasElement для рендеринга
22
23
  */
23
24
  constructor(canvas: HTMLCanvasElement);
25
+ /**
26
+ * Добавляет фигуру в сцену и сохраняет его во внутреннем массиве.
27
+ *
28
+ * @param mesh - Фигура для добавления в сцену.
29
+ * @internal
30
+ */
31
+ addMesh(mesh: Mesh): void;
32
+ /**
33
+ * Возвращает WebGL контекст рендерера.
34
+ *
35
+ * @returns Контекст WebGL (OGLRenderingContext) текущей сцены.
36
+ * @internal
37
+ */
38
+ getContext(): OGLRenderingContext;
39
+ /**
40
+ * Убирает фигуру со сцены
41
+ *
42
+ * @param mesh - Фигура для удаления со сцены.
43
+ * @internal
44
+ */
45
+ removeMesh(mesh: Mesh): void;
46
+ /**
47
+ * Возвращает список всех фигур, находящихся в сцене.
48
+ *
49
+ * @returns Массив текущих фигур.
50
+ * @internal
51
+ */
52
+ getMeshes(): Mesh[];
24
53
  /**
25
54
  * Обновление состояния рендерера.
26
55
  */
@@ -28,7 +57,7 @@ export declare class EditorRenderer extends Renderer {
28
57
  /**
29
58
  * Метод для добавления фигуры.
30
59
  * Настройка raycast.
31
- * @param figure Данные фигуры: position, normal, uv
60
+ * @param figure - Данные фигуры: position, normal, uv
32
61
  */
33
62
  addFigure(figure: Figure): Mesh<import('ogl').Geometry, import('ogl').Program>;
34
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"editor-renderer.d.ts","sourceRoot":"","sources":["../../src/core/editor-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAgC,KAAK,IAAI,EAAW,MAAM,KAAK,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,8CAA8C;IAC9C,OAAO,CAAC,KAAK,CAAkB;IAE/B,kDAAkD;IAClD,OAAO,CAAC,OAAO,CAAW;IAE1B,0DAA0D;IAC1D,OAAO,CAAC,KAAK,CAAQ;IAErB,4DAA4D;IAC5D,OAAO,CAAC,qBAAqB,CAAW;IAExC;;;;OAIG;gBACgB,MAAM,EAAE,iBAAiB;IAyB5C;;OAEG;IACH,SAAS,CAAC,MAAM;IAKhB;;;;OAIG;IACa,SAAS,CAAC,MAAM,EAAE,MAAM;IA2BxC;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAIrC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAK1B;;OAEG;IACH,OAAO,CAAC,eAAe,CAkBrB;IAEF,iBAAiB;IACV,OAAO;CAaf"}
1
+ {"version":3,"file":"editor-renderer.d.ts","sourceRoot":"","sources":["../../src/core/editor-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAgC,KAAK,IAAI,EAAW,KAAK,mBAAmB,EAAE,MAAM,KAAK,CAAC;AAEjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAM7C;;;;;GAKG;AACH,qBACa,cAAe,SAAQ,QAAQ;IAC1C,8CAA8C;IAC9C,OAAO,CAAC,KAAK,CAAkB;IAE/B,kDAAkD;IAClD,OAAO,CAAC,OAAO,CAAW;IAE1B,0DAA0D;IAC1D,OAAO,CAAC,KAAK,CAAQ;IAErB,4DAA4D;IAC5D,OAAO,CAAC,qBAAqB,CAAW;IAExC;;;;OAIG;gBACgB,MAAM,EAAE,iBAAiB;IAyB5C;;;;;OAKG;IACI,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAIhC;;;;;OAKG;IACI,UAAU,IAAI,mBAAmB;IAIxC;;;;;OAKG;IACI,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAInC;;;;;OAKG;IACI,SAAS,IAAI,IAAI,EAAE;IAI1B;;OAEG;IACH,SAAS,CAAC,MAAM;IAKhB;;;;OAIG;IACa,SAAS,CAAC,MAAM,EAAE,MAAM;IA2BxC;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAIrC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAK1B;;OAEG;IACH,OAAO,CAAC,eAAe,CAkBrB;IAEF,iBAAiB;IACV,OAAO;CAaf"}
@@ -3,6 +3,7 @@ import { Renderer } from './renderer';
3
3
  * Рендерер для предпросмотра 3D-модели.
4
4
  * Настраивает сцену, камеру и орбитальную навигацию (по горизонтали).
5
5
  * Наследуется от базового Renderer.
6
+ * @alpha
6
7
  */
7
8
  export declare class PreviewRenderer extends Renderer {
8
9
  /** Orbit-контроллер для управления камерой */
@@ -1 +1 @@
1
- {"version":3,"file":"preview-renderer.d.ts","sourceRoot":"","sources":["../../src/core/preview-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C,8CAA8C;IAC9C,OAAO,CAAC,KAAK,CAAS;IAEtB;;;OAGG;gBACS,MAAM,EAAE,iBAAiB;IAerC;;OAEG;IACH,SAAS,CAAC,MAAM;CAIjB"}
1
+ {"version":3,"file":"preview-renderer.d.ts","sourceRoot":"","sources":["../../src/core/preview-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C,8CAA8C;IAC9C,OAAO,CAAC,KAAK,CAAS;IAEtB;;;OAGG;gBACS,MAAM,EAAE,iBAAiB;IAerC;;OAEG;IACH,SAAS,CAAC,MAAM;CAIjB"}
@@ -3,6 +3,7 @@ import { Figure } from '@planara/types';
3
3
  /**
4
4
  * Абстрактный базовый класс рендерера для работы с WebGL через OGL.
5
5
  * Отвечает за инициализацию сцены, камеры и цикла рендеринга.
6
+ * @public
6
7
  */
7
8
  export declare abstract class Renderer {
8
9
  /** Экземпляр рендерера OGL */
@@ -40,7 +41,7 @@ export declare abstract class Renderer {
40
41
  loop(): void;
41
42
  /**
42
43
  * Публичный метод для добавления фигуры.
43
- * @param figure Данные фигуры: position, normal, uv
44
+ * @param figure - Данные фигуры: position, normal, uv
44
45
  */
45
46
  addFigure(figure: Figure): Mesh<Geometry, Program>;
46
47
  /** Деструктор */
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/core/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAE/F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,8BAAsB,QAAQ;IAC5B,8BAA8B;IAC9B,SAAS,CAAC,EAAE,EAAE,WAAW,CAAC;IAE1B,4BAA4B;IAC5B,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC;IAE3B,uBAAuB;IACvB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,uDAAuD;IACvD,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEpC,+CAA+C;IAC/C,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAE3B,8BAA8B;IAC9B,SAAS,CAAC,MAAM,EAAG,IAAI,EAAE,CAAC;IAE1B;;;OAGG;IACH,SAAS,aAAa,MAAM,EAAE,iBAAiB;IA4B/C;;OAEG;IACI,MAAM;IAMb;;OAEG;IACH,SAAS,CAAC,MAAM;IAIhB;;OAEG;IACH,SAAS,CAAC,MAAM,IAAI,IAAI;IAExB;;OAEG;IACI,IAAI;IAMX;;;OAGG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM;IAsB/B,iBAAiB;IACV,OAAO;CAef"}
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/core/renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAI/F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;GAIG;AACH,8BAAsB,QAAQ;IAC5B,8BAA8B;IAC9B,SAAS,CAAC,EAAE,EAAE,WAAW,CAAC;IAE1B,4BAA4B;IAC5B,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC;IAE3B,uBAAuB;IACvB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,uDAAuD;IACvD,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEpC,+CAA+C;IAC/C,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAE3B,8BAA8B;IAC9B,SAAS,CAAC,MAAM,EAAG,IAAI,EAAE,CAAC;IAE1B;;;OAGG;IACH,SAAS,aAAa,MAAM,EAAE,iBAAiB;IA4B/C;;OAEG;IACI,MAAM;IAMb;;OAEG;IACH,SAAS,CAAC,MAAM;IAIhB;;OAEG;IACH,SAAS,CAAC,MAAM,IAAI,IAAI;IAExB;;OAEG;IACI,IAAI;IAMX;;;OAGG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM;IAsB/B,iBAAiB;IACV,OAAO;CAef"}
@@ -1,5 +1,8 @@
1
1
  import { Orbit } from 'ogl';
2
- /** Расширение для Orbit с отслеживанием управления камерой*/
2
+ /**
3
+ * Расширение для Orbit с отслеживанием управления камерой
4
+ * @internal
5
+ */
3
6
  export declare class OrbitWithState extends Orbit {
4
7
  /** Используется ли Orbit-controls */
5
8
  isInteracting: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"orbit-extension.d.ts","sourceRoot":"","sources":["../../src/extensions/orbit-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAE5B,6DAA6D;AAC7D,qBAAa,cAAe,SAAQ,KAAK;IACvC,qCAAqC;IAC9B,aAAa,EAAE,OAAO,CAAS;IAEtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAEb,MAAM,EAAE,GAAG,EAAE,OAAO,GAAE,GAAQ;IAY1C,yCAAyC;IAClC,OAAO;CAMf"}
1
+ {"version":3,"file":"orbit-extension.d.ts","sourceRoot":"","sources":["../../src/extensions/orbit-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAE5B;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,qCAAqC;IAC9B,aAAa,EAAE,OAAO,CAAS;IAEtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAEb,MAAM,EAAE,GAAG,EAAE,OAAO,GAAE,GAAQ;IAY1C,yCAAyC;IAClC,OAAO;CAMf"}
@@ -0,0 +1,37 @@
1
+ import { IDisplayHandler } from '../../interfaces/display-handler';
2
+ import { RendererApi } from '../../utils/renderer-api';
3
+ import { DisplayMode } from '@planara/types';
4
+ /**
5
+ * Хендлер для включения wireframe-режима.
6
+ * Управляет сценой через RendererApi.
7
+ * @internal
8
+ */
9
+ export declare class WireframeHandler implements IDisplayHandler {
10
+ private api;
11
+ /** Режим отображения */
12
+ readonly mode: DisplayMode;
13
+ /** Wireframe-модели для добавленных на сцену объектов */
14
+ private wireMeshes;
15
+ /** Настройки рендеринга для режима wireframe */
16
+ private readonly wireMeshProgram;
17
+ /** WebGl контекст */
18
+ private readonly context;
19
+ constructor(api: RendererApi);
20
+ /**
21
+ * Применяет wireframe-режим к сцене.
22
+ */
23
+ handle(): void;
24
+ /**
25
+ * Отменяет wireframe-режим у сцены.
26
+ */
27
+ rollback(): void;
28
+ /**
29
+ * Освобождает ресурсы хендлера, удаляет wireframe-модели со сцены.
30
+ */
31
+ destroy(): void;
32
+ /**
33
+ * Создание wireframe-моделей для фигур на сцене.
34
+ */
35
+ private createWireMeshes;
36
+ }
37
+ //# sourceMappingURL=wireframe-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireframe-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/display/wireframe-handler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;GAIG;AACH,qBACa,gBAAiB,YAAW,eAAe;IAanB,OAAO,CAAC,GAAG;IAZ9C,wBAAwB;IACxB,SAAgB,IAAI,EAAE,WAAW,CAAyB;IAE1D,yDAAyD;IACzD,OAAO,CAAC,UAAU,CAAc;IAEhC,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IAEjD,qBAAqB;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;gBAEJ,GAAG,EAAE,WAAW;IAW3D;;OAEG;IACI,MAAM;IAab;;OAEG;IACH,QAAQ,IAAI,IAAI;IAUhB;;OAEG;IACH,OAAO,IAAI,IAAI;IAOf;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAWzB"}
@@ -0,0 +1,8 @@
1
+ import { EditorHub } from './editor-hub';
2
+ import { Renderer } from '../core/renderer';
3
+ /**
4
+ * Создаёт или возвращает готовый экземпляр хаба.
5
+ * @public
6
+ */
7
+ export declare function createAppHub(renderer: Renderer): EditorHub;
8
+ //# sourceMappingURL=app-hub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-hub.d.ts","sourceRoot":"","sources":["../../src/hub/app-hub.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAG1D"}
@@ -0,0 +1,13 @@
1
+ import { DisplayMode } from '@planara/types';
2
+ import { IDisplayManager } from '../interfaces/manager';
3
+ /**
4
+ * Хаб для управления редактированием
5
+ * @public
6
+ */
7
+ export declare class EditorHub {
8
+ private displayManager;
9
+ constructor(displayManager: IDisplayManager);
10
+ setDisplayMode(mode: DisplayMode): void;
11
+ destroy(): void;
12
+ }
13
+ //# sourceMappingURL=editor-hub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-hub.d.ts","sourceRoot":"","sources":["../../src/hub/editor-hub.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;GAGG;AACH,qBACa,SAAS;IACmB,OAAO,CAAC,cAAc;gBAAd,cAAc,EAAE,eAAe;IAE9E,cAAc,CAAC,IAAI,EAAE,WAAW;IAIhC,OAAO;CAGR"}
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("ogl");function d(s){const e=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("ogl");var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Te={};/*! *****************************************************************************
2
+ Copyright (C) Microsoft. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */var Ae;function ft(){if(Ae)return Te;Ae=1;var t;return(function(e){(function(r){var i=typeof globalThis=="object"?globalThis:typeof Ce=="object"?Ce:typeof self=="object"?self:typeof this=="object"?this:w(),a=o(e);typeof i.Reflect<"u"&&(a=o(i.Reflect,a)),r(a,i),typeof i.Reflect>"u"&&(i.Reflect=e);function o(v,b){return function(T,N){Object.defineProperty(v,T,{configurable:!0,writable:!0,value:N}),b&&b(T,N)}}function f(){try{return Function("return this;")()}catch{}}function m(){try{return(0,eval)("(function() { return this; })()")}catch{}}function w(){return f()||m()}})(function(r,i){var a=Object.prototype.hasOwnProperty,o=typeof Symbol=="function",f=o&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",m=o&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",w=typeof Object.create=="function",v={__proto__:[]}instanceof Array,b=!w&&!v,T={create:w?function(){return ee(Object.create(null))}:v?function(){return ee({__proto__:null})}:function(){return ee({})},has:b?function(n,s){return a.call(n,s)}:function(n,s){return s in n},get:b?function(n,s){return a.call(n,s)?n[s]:void 0}:function(n,s){return n[s]}},N=Object.getPrototypeOf(Function),F=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:st(),J=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:at(),Y=typeof WeakMap=="function"?WeakMap:ot(),k=o?Symbol.for("@reflect-metadata:registry"):void 0,W=rt(),he=nt(W);function Fe(n,s,u,l){if(g(u)){if(!_e(n))throw new TypeError;if(!be(s))throw new TypeError;return Ze(n,s)}else{if(!_e(n))throw new TypeError;if(!E(s))throw new TypeError;if(!E(l)&&!g(l)&&!j(l))throw new TypeError;return j(l)&&(l=void 0),u=x(u),Je(n,s,u,l)}}r("decorate",Fe);function Le(n,s){function u(l,y){if(!E(l))throw new TypeError;if(!g(y)&&!et(y))throw new TypeError;ye(n,s,l,y)}return u}r("metadata",Le);function Ge(n,s,u,l){if(!E(u))throw new TypeError;return g(l)||(l=x(l)),ye(n,s,u,l)}r("defineMetadata",Ge);function Ve(n,s,u){if(!E(s))throw new TypeError;return g(u)||(u=x(u)),de(n,s,u)}r("hasMetadata",Ve);function We(n,s,u){if(!E(s))throw new TypeError;return g(u)||(u=x(u)),Q(n,s,u)}r("hasOwnMetadata",We);function ze(n,s,u){if(!E(s))throw new TypeError;return g(u)||(u=x(u)),pe(n,s,u)}r("getMetadata",ze);function Ue(n,s,u){if(!E(s))throw new TypeError;return g(u)||(u=x(u)),ve(n,s,u)}r("getOwnMetadata",Ue);function $e(n,s){if(!E(n))throw new TypeError;return g(s)||(s=x(s)),ge(n,s)}r("getMetadataKeys",$e);function qe(n,s){if(!E(n))throw new TypeError;return g(s)||(s=x(s)),me(n,s)}r("getOwnMetadataKeys",qe);function Be(n,s,u){if(!E(s))throw new TypeError;if(g(u)||(u=x(u)),!E(s))throw new TypeError;g(u)||(u=x(u));var l=L(s,u,!1);return g(l)?!1:l.OrdinaryDeleteMetadata(n,s,u)}r("deleteMetadata",Be);function Ze(n,s){for(var u=n.length-1;u>=0;--u){var l=n[u],y=l(s);if(!g(y)&&!j(y)){if(!be(y))throw new TypeError;s=y}}return s}function Je(n,s,u,l){for(var y=n.length-1;y>=0;--y){var O=n[y],S=O(s,u,l);if(!g(S)&&!j(S)){if(!E(S))throw new TypeError;l=S}}return l}function de(n,s,u){var l=Q(n,s,u);if(l)return!0;var y=K(s);return j(y)?!1:de(n,y,u)}function Q(n,s,u){var l=L(s,u,!1);return g(l)?!1:Me(l.OrdinaryHasOwnMetadata(n,s,u))}function pe(n,s,u){var l=Q(n,s,u);if(l)return ve(n,s,u);var y=K(s);if(!j(y))return pe(n,y,u)}function ve(n,s,u){var l=L(s,u,!1);if(!g(l))return l.OrdinaryGetOwnMetadata(n,s,u)}function ye(n,s,u,l){var y=L(u,l,!0);y.OrdinaryDefineOwnMetadata(n,s,u,l)}function ge(n,s){var u=me(n,s),l=K(n);if(l===null)return u;var y=ge(l,s);if(y.length<=0)return u;if(u.length<=0)return y;for(var O=new J,S=[],M=0,c=u;M<c.length;M++){var h=c[M],d=O.has(h);d||(O.add(h),S.push(h))}for(var p=0,_=y;p<_.length;p++){var h=_[p],d=O.has(h);d||(O.add(h),S.push(h))}return S}function me(n,s){var u=L(n,s,!1);return u?u.OrdinaryOwnMetadataKeys(n,s):[]}function we(n){if(n===null)return 1;switch(typeof n){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return n===null?1:6;default:return 6}}function g(n){return n===void 0}function j(n){return n===null}function Ye(n){return typeof n=="symbol"}function E(n){return typeof n=="object"?n!==null:typeof n=="function"}function Qe(n,s){switch(we(n)){case 0:return n;case 1:return n;case 2:return n;case 3:return n;case 4:return n;case 5:return n}var u="string",l=Re(n,f);if(l!==void 0){var y=l.call(n,u);if(E(y))throw new TypeError;return y}return Xe(n)}function Xe(n,s){var u,l,y;{var O=n.toString;if(z(O)){var l=O.call(n);if(!E(l))return l}var u=n.valueOf;if(z(u)){var l=u.call(n);if(!E(l))return l}}throw new TypeError}function Me(n){return!!n}function Ke(n){return""+n}function x(n){var s=Qe(n);return Ye(s)?s:Ke(s)}function _e(n){return Array.isArray?Array.isArray(n):n instanceof Object?n instanceof Array:Object.prototype.toString.call(n)==="[object Array]"}function z(n){return typeof n=="function"}function be(n){return typeof n=="function"}function et(n){switch(we(n)){case 3:return!0;case 4:return!0;default:return!1}}function X(n,s){return n===s||n!==n&&s!==s}function Re(n,s){var u=n[s];if(u!=null){if(!z(u))throw new TypeError;return u}}function Oe(n){var s=Re(n,m);if(!z(s))throw new TypeError;var u=s.call(n);if(!E(u))throw new TypeError;return u}function Pe(n){return n.value}function Ee(n){var s=n.next();return s.done?!1:s}function Se(n){var s=n.return;s&&s.call(n)}function K(n){var s=Object.getPrototypeOf(n);if(typeof n!="function"||n===N||s!==N)return s;var u=n.prototype,l=u&&Object.getPrototypeOf(u);if(l==null||l===Object.prototype)return s;var y=l.constructor;return typeof y!="function"||y===n?s:y}function tt(){var n;!g(k)&&typeof i.Reflect<"u"&&!(k in i.Reflect)&&typeof i.Reflect.defineMetadata=="function"&&(n=it(i.Reflect));var s,u,l,y=new Y,O={registerProvider:S,getProvider:c,setProvider:d};return O;function S(p){if(!Object.isExtensible(O))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case n===p:break;case g(s):s=p;break;case s===p:break;case g(u):u=p;break;case u===p:break;default:l===void 0&&(l=new J),l.add(p);break}}function M(p,_){if(!g(s)){if(s.isProviderFor(p,_))return s;if(!g(u)){if(u.isProviderFor(p,_))return s;if(!g(l))for(var R=Oe(l);;){var P=Ee(R);if(!P)return;var A=Pe(P);if(A.isProviderFor(p,_))return Se(R),A}}}if(!g(n)&&n.isProviderFor(p,_))return n}function c(p,_){var R=y.get(p),P;return g(R)||(P=R.get(_)),g(P)&&(P=M(p,_),g(P)||(g(R)&&(R=new F,y.set(p,R)),R.set(_,P))),P}function h(p){if(g(p))throw new TypeError;return s===p||u===p||!g(l)&&l.has(p)}function d(p,_,R){if(!h(R))throw new Error("Metadata provider not registered.");var P=c(p,_);if(P!==R){if(!g(P))return!1;var A=y.get(p);g(A)&&(A=new F,y.set(p,A)),A.set(_,R)}return!0}}function rt(){var n;return!g(k)&&E(i.Reflect)&&Object.isExtensible(i.Reflect)&&(n=i.Reflect[k]),g(n)&&(n=tt()),!g(k)&&E(i.Reflect)&&Object.isExtensible(i.Reflect)&&Object.defineProperty(i.Reflect,k,{enumerable:!1,configurable:!1,writable:!1,value:n}),n}function nt(n){var s=new Y,u={isProviderFor:function(h,d){var p=s.get(h);return g(p)?!1:p.has(d)},OrdinaryDefineOwnMetadata:S,OrdinaryHasOwnMetadata:y,OrdinaryGetOwnMetadata:O,OrdinaryOwnMetadataKeys:M,OrdinaryDeleteMetadata:c};return W.registerProvider(u),u;function l(h,d,p){var _=s.get(h),R=!1;if(g(_)){if(!p)return;_=new F,s.set(h,_),R=!0}var P=_.get(d);if(g(P)){if(!p)return;if(P=new F,_.set(d,P),!n.setProvider(h,d,u))throw _.delete(d),R&&s.delete(h),new Error("Wrong provider for target.")}return P}function y(h,d,p){var _=l(d,p,!1);return g(_)?!1:Me(_.has(h))}function O(h,d,p){var _=l(d,p,!1);if(!g(_))return _.get(h)}function S(h,d,p,_){var R=l(p,_,!0);R.set(h,d)}function M(h,d){var p=[],_=l(h,d,!1);if(g(_))return p;for(var R=_.keys(),P=Oe(R),A=0;;){var Ie=Ee(P);if(!Ie)return p.length=A,p;var ut=Pe(Ie);try{p[A]=ut}catch(lt){try{Se(P)}finally{throw lt}}A++}}function c(h,d,p){var _=l(d,p,!1);if(g(_)||!_.delete(h))return!1;if(_.size===0){var R=s.get(d);g(R)||(R.delete(p),R.size===0&&s.delete(R))}return!0}}function it(n){var s=n.defineMetadata,u=n.hasOwnMetadata,l=n.getOwnMetadata,y=n.getOwnMetadataKeys,O=n.deleteMetadata,S=new Y,M={isProviderFor:function(c,h){var d=S.get(c);return!g(d)&&d.has(h)?!0:y(c,h).length?(g(d)&&(d=new J,S.set(c,d)),d.add(h),!0):!1},OrdinaryDefineOwnMetadata:s,OrdinaryHasOwnMetadata:u,OrdinaryGetOwnMetadata:l,OrdinaryOwnMetadataKeys:y,OrdinaryDeleteMetadata:O};return M}function L(n,s,u){var l=W.getProvider(n,s);if(!g(l))return l;if(u){if(W.setProvider(n,s,he))return he;throw new Error("Illegal state.")}}function st(){var n={},s=[],u=(function(){function M(c,h,d){this._index=0,this._keys=c,this._values=h,this._selector=d}return M.prototype["@@iterator"]=function(){return this},M.prototype[m]=function(){return this},M.prototype.next=function(){var c=this._index;if(c>=0&&c<this._keys.length){var h=this._selector(this._keys[c],this._values[c]);return c+1>=this._keys.length?(this._index=-1,this._keys=s,this._values=s):this._index++,{value:h,done:!1}}return{value:void 0,done:!0}},M.prototype.throw=function(c){throw this._index>=0&&(this._index=-1,this._keys=s,this._values=s),c},M.prototype.return=function(c){return this._index>=0&&(this._index=-1,this._keys=s,this._values=s),{value:c,done:!0}},M})(),l=(function(){function M(){this._keys=[],this._values=[],this._cacheKey=n,this._cacheIndex=-2}return Object.defineProperty(M.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),M.prototype.has=function(c){return this._find(c,!1)>=0},M.prototype.get=function(c){var h=this._find(c,!1);return h>=0?this._values[h]:void 0},M.prototype.set=function(c,h){var d=this._find(c,!0);return this._values[d]=h,this},M.prototype.delete=function(c){var h=this._find(c,!1);if(h>=0){for(var d=this._keys.length,p=h+1;p<d;p++)this._keys[p-1]=this._keys[p],this._values[p-1]=this._values[p];return this._keys.length--,this._values.length--,X(c,this._cacheKey)&&(this._cacheKey=n,this._cacheIndex=-2),!0}return!1},M.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=n,this._cacheIndex=-2},M.prototype.keys=function(){return new u(this._keys,this._values,y)},M.prototype.values=function(){return new u(this._keys,this._values,O)},M.prototype.entries=function(){return new u(this._keys,this._values,S)},M.prototype["@@iterator"]=function(){return this.entries()},M.prototype[m]=function(){return this.entries()},M.prototype._find=function(c,h){if(!X(this._cacheKey,c)){this._cacheIndex=-1;for(var d=0;d<this._keys.length;d++)if(X(this._keys[d],c)){this._cacheIndex=d;break}}return this._cacheIndex<0&&h&&(this._cacheIndex=this._keys.length,this._keys.push(c),this._values.push(void 0)),this._cacheIndex},M})();return l;function y(M,c){return M}function O(M,c){return c}function S(M,c){return[M,c]}}function at(){var n=(function(){function s(){this._map=new F}return Object.defineProperty(s.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),s.prototype.has=function(u){return this._map.has(u)},s.prototype.add=function(u){return this._map.set(u,u),this},s.prototype.delete=function(u){return this._map.delete(u)},s.prototype.clear=function(){this._map.clear()},s.prototype.keys=function(){return this._map.keys()},s.prototype.values=function(){return this._map.keys()},s.prototype.entries=function(){return this._map.entries()},s.prototype["@@iterator"]=function(){return this.keys()},s.prototype[m]=function(){return this.keys()},s})();return n}function ot(){var n=16,s=T.create(),u=l();return(function(){function c(){this._key=l()}return c.prototype.has=function(h){var d=y(h,!1);return d!==void 0?T.has(d,this._key):!1},c.prototype.get=function(h){var d=y(h,!1);return d!==void 0?T.get(d,this._key):void 0},c.prototype.set=function(h,d){var p=y(h,!0);return p[this._key]=d,this},c.prototype.delete=function(h){var d=y(h,!1);return d!==void 0?delete d[this._key]:!1},c.prototype.clear=function(){this._key=l()},c})();function l(){var c;do c="@@WeakMap@@"+M();while(T.has(s,c));return s[c]=!0,c}function y(c,h){if(!a.call(c,u)){if(!h)return;Object.defineProperty(c,u,{value:T.create()})}return c[u]}function O(c,h){for(var d=0;d<h;++d)c[d]=Math.random()*255|0;return c}function S(c){if(typeof Uint8Array=="function"){var h=new Uint8Array(c);return typeof crypto<"u"?crypto.getRandomValues(h):typeof msCrypto<"u"?msCrypto.getRandomValues(h):O(h,c),h}return O(new Array(c),c)}function M(){var c=S(n);c[6]=c[6]&79|64,c[8]=c[8]&191|128;for(var h="",d=0;d<n;++d){var p=c[d];(d===4||d===6||d===8)&&(h+="-"),p<16&&(h+="0"),h+=p.toString(16).toLowerCase()}return h}}function ee(n){return n.__=void 0,delete n.__,n}})})(t||(t={})),Te}ft();function ct(t){const e=`
2
15
  attribute vec3 position;
3
16
  attribute vec3 normal;
4
17
 
@@ -12,7 +25,7 @@
12
25
  vNormal = normalize(normalMatrix * normal);
13
26
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
14
27
  }
15
- `,t=`
28
+ `,r=`
16
29
  precision highp float;
17
30
 
18
31
  uniform float uHit;
@@ -26,5 +39,20 @@
26
39
  gl_FragColor.rgb = color + lighting * 0.1;
27
40
  gl_FragColor.a = 1.0;
28
41
  }
29
- `;return new r.Program(s,{vertex:e,fragment:t,cullFace:!1,uniforms:{uHit:{value:0}}})}class h{gl;scene;camera;canvas;program;meshes;constructor(e){this.canvas=e,this.gl=new r.Renderer({canvas:e,dpr:2}),this.gl.setSize(e.clientWidth,e.clientHeight),this.gl.gl.clearColor(.1,.1,.1,1),this.scene=new r.Transform,this.camera=new r.Camera(this.gl.gl,{fov:45}),this.camera.position.set(1,1,7),this.camera.lookAt([0,0,0]),this.program=d(this.gl.gl),this.meshes=[]}resize(){this.gl.setSize(this.canvas.width,this.canvas.height),this.camera.perspective({aspect:this.canvas.width/this.canvas.height})}render(){this.gl.render({scene:this.scene,camera:this.camera})}update(){}loop(){this.update(),this.render(),requestAnimationFrame(this.loop.bind(this))}addFigure(e){const t=new r.Geometry(this.gl.gl,{position:{size:3,data:new Float32Array(e.position)},normal:{size:3,data:new Float32Array(e.normal??[])},uv:{size:2,data:new Float32Array(e.uv??[])}}),i=new r.Mesh(this.gl.gl,{geometry:t,program:this.program});return i.setParent(this.scene),this.meshes.push(i),i}destroy(){this.meshes&&(this.meshes.length=0,this.meshes=[]),this.scene=null,this.camera=null,this.program=null,this.gl=null,this.canvas=null}}class p extends r.Orbit{isInteracting=!1;element;constructor(e,t={}){super(e,t),this.element=t.element||document,this.element.addEventListener("mousedown",()=>this.isInteracting=!0),this.element.addEventListener("mouseup",()=>this.isInteracting=!1),this.element.addEventListener("touchstart",()=>this.isInteracting=!0),this.element.addEventListener("touchend",()=>this.isInteracting=!1)}destroy(){this.element.removeEventListener("mousedown",()=>this.isInteracting=!0),this.element.removeEventListener("mouseup",()=>this.isInteracting=!1),this.element.removeEventListener("touchstart",()=>this.isInteracting=!0),this.element.removeEventListener("touchend",()=>this.isInteracting=!1)}}class g extends h{orbit;raycast;mouse;isEventListenersAdded;constructor(e){super(e);const t=new r.GridHelper(this.gl.gl,{size:10,divisions:10});t.position.y=-.001,t.setParent(this.scene),new r.AxesHelper(this.gl.gl,{size:6,symmetric:!0}).setParent(this.scene),this.orbit=new p(this.camera,{element:this.canvas}),this.raycast=new r.Raycast,this.mouse=new r.Vec2,this.isEventListenersAdded=!1}update(){this.orbit?.update()}addFigure(e){const t=super.addFigure(e);if(t.geometry){const i=t.geometry.constructor.name;t.geometry.raycast=i.includes("Sphere")?"sphere":"box"}return t.isHit=!1,t.onBeforeRender(({mesh:i})=>{this.updateHitUniform(i)}),this.isEventListenersAdded||this.initMouseListeners(),t}updateHitUniform(e){this.program.uniforms.uHit.value=e.isHit?1:0}initMouseListeners(){document.addEventListener("mousemove",this.handleMouseMove,!1),this.isEventListenersAdded=!0}handleMouseMove=e=>{if(this.orbit.isInteracting)return;this.mouse.set(2*(e.x/this.gl.width)-1,2*(1-e.y/this.gl.height)-1),this.raycast.castMouse(this.camera,this.mouse),this.meshes.forEach(i=>i.isHit=!1),this.raycast.intersectBounds(this.meshes).forEach(i=>i.isHit=!0)};destroy(){this.isEventListenersAdded&&(window.removeEventListener("mousemove",this.handleMouseMove,!1),this.isEventListenersAdded=!1),this.orbit=null,this.raycast=null,this.mouse=null,super.destroy()}}class f extends h{orbit;constructor(e){super(e),this.orbit=new r.Orbit(this.camera,{element:this.canvas,target:new r.Vec3(0,0,0),minPolarAngle:Math.PI/2,maxPolarAngle:Math.PI/2,enableRotate:!0,enableZoom:!1,enablePan:!1})}update(){this.orbit?.update()}}class b{type;position;normal;uv;material;constructor(e){this.type=e.type,this.position=e.position,this.normal=e.normal??[],this.uv=e.uv??[],this.material=e.material}}var v=(s=>(s[s.Cube=0]="Cube",s[s.Sphere=1]="Sphere",s[s.Plane=2]="Plane",s[s.Cylinder=3]="Cylinder",s[s.Custom=4]="Custom",s))(v||{});class y{positions=[];normals=[];uvs=[];tmpPositions=[];tmpNormals=[];tmpUVs=[];load(e){const t=e.split(`
30
- `);for(const o of t){if(!o.trim()||o.startsWith("#"))continue;const n=o.trim().split(/\s+/);switch(n[0]){case"v":this.tmpPositions.push(n.slice(1).map(Number));break;case"vn":this.tmpNormals.push(n.slice(1).map(Number));break;case"vt":this.tmpUVs.push(n.slice(1).map(Number));break;case"f":this.processFaceLine(n);break}}const i={type:v.Custom,position:this.positions,...this.normals.length>0&&{normal:this.normals},...this.uvs.length>0&&{uv:this.uvs}};return new b(i)}processFaceLine(e){for(let t=1;t<e.length;t++){const i=e[t];if(!i)continue;const[o,n,l]=i.split("/"),m=o?parseInt(o,10):void 0,c=n?parseInt(n,10):void 0,u=l?parseInt(l,10):void 0;if(m!==void 0){const a=this.tmpPositions[m-1];a&&this.positions.push(...a)}if(c!==void 0){const a=this.tmpUVs[c-1];a&&this.uvs.push(...a)}if(u!==void 0){const a=this.tmpNormals[u-1];a&&this.normals.push(...a)}}}}exports.EditorRenderer=g;exports.ObjLoader=y;exports.PreviewRenderer=f;exports.Renderer=h;exports.createProgram=d;
42
+ `;return new I.Program(t,{vertex:e,fragment:r,cullFace:!1,uniforms:{uHit:{value:0}}})}class ue{gl;scene;camera;canvas;program;meshes;constructor(e){this.canvas=e,this.gl=new I.Renderer({canvas:e,dpr:2}),this.gl.setSize(e.clientWidth,e.clientHeight),this.gl.gl.clearColor(.1,.1,.1,1),this.scene=new I.Transform,this.camera=new I.Camera(this.gl.gl,{fov:45}),this.camera.position.set(1,1,7),this.camera.lookAt([0,0,0]),this.program=ct(this.gl.gl),this.meshes=[]}resize(){this.gl.setSize(this.canvas.width,this.canvas.height),this.camera.perspective({aspect:this.canvas.width/this.canvas.height})}render(){this.gl.render({scene:this.scene,camera:this.camera})}update(){}loop(){this.update(),this.render(),requestAnimationFrame(this.loop.bind(this))}addFigure(e){const r=new I.Geometry(this.gl.gl,{position:{size:3,data:new Float32Array(e.position)},normal:{size:3,data:new Float32Array(e.normal??[])},uv:{size:2,data:new Float32Array(e.uv??[])}}),i=new I.Mesh(this.gl.gl,{geometry:r,program:this.program});return i.setParent(this.scene),this.meshes.push(i),i}destroy(){this.meshes&&(this.meshes.length=0,this.meshes=[]),this.scene=null,this.camera=null,this.program=null,this.gl=null,this.canvas=null}}class ht extends I.Orbit{isInteracting=!1;element;constructor(e,r={}){super(e,r),this.element=r.element||document,this.element.addEventListener("mousedown",()=>this.isInteracting=!0),this.element.addEventListener("mouseup",()=>this.isInteracting=!1),this.element.addEventListener("touchstart",()=>this.isInteracting=!0),this.element.addEventListener("touchend",()=>this.isInteracting=!1)}destroy(){this.element.removeEventListener("mousedown",()=>this.isInteracting=!0),this.element.removeEventListener("mouseup",()=>this.isInteracting=!1),this.element.removeEventListener("touchstart",()=>this.isInteracting=!0),this.element.removeEventListener("touchend",()=>this.isInteracting=!1)}}var te;(function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"})(te||(te={}));const C=te;/*! *****************************************************************************
43
+ Copyright (c) Microsoft Corporation.
44
+
45
+ Permission to use, copy, modify, and/or distribute this software for any
46
+ purpose with or without fee is hereby granted.
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
49
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
51
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
52
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
53
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
54
+ PERFORMANCE OF THIS SOFTWARE.
55
+ ***************************************************************************** */var re=function(t,e){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},re(t,e)};function le(t,e){re(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function dt(t,e,r,i){function a(o){return o instanceof r?o:new r(function(f){f(o)})}return new(r||(r=Promise))(function(o,f){function m(b){try{v(i.next(b))}catch(T){f(T)}}function w(b){try{v(i.throw(b))}catch(T){f(T)}}function v(b){b.done?o(b.value):a(b.value).then(m,w)}v((i=i.apply(t,[])).next())})}function pt(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,a,o,f;return f={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function m(v){return function(b){return w([v,b])}}function w(v){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,a&&(o=v[0]&2?a.return:v[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,v[1])).done)return o;switch(a=0,o&&(v=[v[0]&2,o.value]),v[0]){case 0:case 1:o=v;break;case 4:return r.label++,{value:v[1],done:!1};case 5:r.label++,a=v[1],v=[0];continue;case 7:v=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(v[0]===6||v[0]===2)){r=0;continue}if(v[0]===3&&(!o||v[1]>o[0]&&v[1]<o[3])){r.label=v[1];break}if(v[0]===6&&r.label<o[1]){r.label=o[1],o=v;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(v);break}o[2]&&r.ops.pop(),r.trys.pop();continue}v=e.call(t,r)}catch(b){v=[6,b],a=0}finally{i=o=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}}function U(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),a,o=[],f;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)o.push(a.value)}catch(m){f={error:m}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(f)throw f.error}}return o}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Z(arguments[e]));return t}var ne="injectionTokens";function vt(t){var e=Reflect.getMetadata("design:paramtypes",t)||[],r=Reflect.getOwnMetadata(ne,t)||{};return Object.keys(r).forEach(function(i){e[+i]=r[i]}),e}function De(t,e){return function(r,i,a){var o=Reflect.getOwnMetadata(ne,r)||{};o[a]=t,Reflect.defineMetadata(ne,o,r)}}function ke(t){return!!t.useClass}function ie(t){return!!t.useFactory}var je=(function(){function t(e){this.wrap=e,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(e){var r=this,i={},a=!1,o,f=function(){return a||(o=e(r.wrap()),a=!0),o};return new Proxy(i,this.createHandler(f))},t.prototype.createHandler=function(e){var r={},i=function(a){r[a]=function(){for(var o=[],f=0;f<arguments.length;f++)o[f]=arguments[f];o[0]=e();var m=Reflect[a];return m.apply(void 0,D(o))}};return this.reflectMethods.forEach(i),r},t})();function H(t){return typeof t=="string"||typeof t=="symbol"}function yt(t){return typeof t=="object"&&"token"in t&&"multiple"in t}function xe(t){return typeof t=="object"&&"token"in t&&"transform"in t}function gt(t){return typeof t=="function"||t instanceof je}function q(t){return!!t.useToken}function B(t){return t.useValue!=null}function mt(t){return ke(t)||B(t)||q(t)||ie(t)}var fe=(function(){function t(){this._registryMap=new Map}return t.prototype.entries=function(){return this._registryMap.entries()},t.prototype.getAll=function(e){return this.ensure(e),this._registryMap.get(e)},t.prototype.get=function(e){this.ensure(e);var r=this._registryMap.get(e);return r[r.length-1]||null},t.prototype.set=function(e,r){this.ensure(e),this._registryMap.get(e).push(r)},t.prototype.setAll=function(e,r){this._registryMap.set(e,r)},t.prototype.has=function(e){return this.ensure(e),this._registryMap.get(e).length>0},t.prototype.clear=function(){this._registryMap.clear()},t.prototype.ensure=function(e){this._registryMap.has(e)||this._registryMap.set(e,[])},t})(),wt=(function(t){le(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(fe),$=(function(){function t(){this.scopedResolutions=new Map}return t})();function Mt(t,e){if(t===null)return"at position #"+e;var r=t.split(",")[e].trim();return'"'+r+'" at position #'+e}function _t(t,e,r){return r===void 0&&(r=" "),D([t],e.message.split(`
56
+ `).map(function(i){return r+i})).join(`
57
+ `)}function bt(t,e,r){var i=Z(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2),a=i[1],o=a===void 0?null:a,f=Mt(o,e);return _t("Cannot inject the dependency "+f+' of "'+t.name+'" constructor. Reason:',r)}function Rt(t){if(typeof t.dispose!="function")return!1;var e=t.dispose;return!(e.length>0)}var Ot=(function(t){le(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(fe),Pt=(function(t){le(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(fe),Et=(function(){function t(){this.preResolution=new Ot,this.postResolution=new Pt}return t})(),He=new Map,St=(function(){function t(e){this.parent=e,this._registry=new wt,this.interceptors=new Et,this.disposed=!1,this.disposables=new Set}return t.prototype.register=function(e,r,i){i===void 0&&(i={lifecycle:C.Transient}),this.ensureNotDisposed();var a;if(mt(r)?a=r:a={useClass:r},q(a))for(var o=[e],f=a;f!=null;){var m=f.useToken;if(o.includes(m))throw new Error("Token registration cycle detected! "+D(o,[m]).join(" -> "));o.push(m);var w=this._registry.get(m);w&&q(w.provider)?f=w.provider:f=null}if((i.lifecycle===C.Singleton||i.lifecycle==C.ContainerScoped||i.lifecycle==C.ResolutionScoped)&&(B(a)||ie(a)))throw new Error('Cannot use lifecycle "'+C[i.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(e,{provider:a,options:i}),this},t.prototype.registerType=function(e,r){return this.ensureNotDisposed(),H(r)?this.register(e,{useToken:r}):this.register(e,{useClass:r})},t.prototype.registerInstance=function(e,r){return this.ensureNotDisposed(),this.register(e,{useValue:r})},t.prototype.registerSingleton=function(e,r){if(this.ensureNotDisposed(),H(e)){if(H(r))return this.register(e,{useToken:r},{lifecycle:C.Singleton});if(r)return this.register(e,{useClass:r},{lifecycle:C.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var i=e;return r&&!H(r)&&(i=r),this.register(e,{useClass:i},{lifecycle:C.Singleton})},t.prototype.resolve=function(e,r,i){r===void 0&&(r=new $),i===void 0&&(i=!1),this.ensureNotDisposed();var a=this.getRegistration(e);if(!a&&H(e)){if(i)return;throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"')}if(this.executePreResolutionInterceptor(e,"Single"),a){var o=this.resolveRegistration(a,r);return this.executePostResolutionInterceptor(e,o,"Single"),o}if(gt(e)){var o=this.construct(e,r);return this.executePostResolutionInterceptor(e,o,"Single"),o}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(e,r){var i,a;if(this.interceptors.preResolution.has(e)){var o=[];try{for(var f=U(this.interceptors.preResolution.getAll(e)),m=f.next();!m.done;m=f.next()){var w=m.value;w.options.frequency!="Once"&&o.push(w),w.callback(e,r)}}catch(v){i={error:v}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}this.interceptors.preResolution.setAll(e,o)}},t.prototype.executePostResolutionInterceptor=function(e,r,i){var a,o;if(this.interceptors.postResolution.has(e)){var f=[];try{for(var m=U(this.interceptors.postResolution.getAll(e)),w=m.next();!w.done;w=m.next()){var v=w.value;v.options.frequency!="Once"&&f.push(v),v.callback(e,r,i)}}catch(b){a={error:b}}finally{try{w&&!w.done&&(o=m.return)&&o.call(m)}finally{if(a)throw a.error}}this.interceptors.postResolution.setAll(e,f)}},t.prototype.resolveRegistration=function(e,r){if(this.ensureNotDisposed(),e.options.lifecycle===C.ResolutionScoped&&r.scopedResolutions.has(e))return r.scopedResolutions.get(e);var i=e.options.lifecycle===C.Singleton,a=e.options.lifecycle===C.ContainerScoped,o=i||a,f;return B(e.provider)?f=e.provider.useValue:q(e.provider)?f=o?e.instance||(e.instance=this.resolve(e.provider.useToken,r)):this.resolve(e.provider.useToken,r):ke(e.provider)?f=o?e.instance||(e.instance=this.construct(e.provider.useClass,r)):this.construct(e.provider.useClass,r):ie(e.provider)?f=e.provider.useFactory(this):f=this.construct(e.provider,r),e.options.lifecycle===C.ResolutionScoped&&r.scopedResolutions.set(e,f),f},t.prototype.resolveAll=function(e,r,i){var a=this;r===void 0&&(r=new $),i===void 0&&(i=!1),this.ensureNotDisposed();var o=this.getAllRegistrations(e);if(!o&&H(e)){if(i)return[];throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"')}if(this.executePreResolutionInterceptor(e,"All"),o){var f=o.map(function(w){return a.resolveRegistration(w,r)});return this.executePostResolutionInterceptor(e,f,"All"),f}var m=[this.construct(e,r)];return this.executePostResolutionInterceptor(e,m,"All"),m},t.prototype.isRegistered=function(e,r){return r===void 0&&(r=!1),this.ensureNotDisposed(),this._registry.has(e)||r&&(this.parent||!1)&&this.parent.isRegistered(e,!0)},t.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var e,r;this.ensureNotDisposed();try{for(var i=U(this._registry.entries()),a=i.next();!a.done;a=i.next()){var o=Z(a.value,2),f=o[0],m=o[1];this._registry.setAll(f,m.filter(function(w){return!B(w.provider)}).map(function(w){return w.instance=void 0,w}))}}catch(w){e={error:w}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},t.prototype.createChildContainer=function(){var e,r;this.ensureNotDisposed();var i=new t(this);try{for(var a=U(this._registry.entries()),o=a.next();!o.done;o=a.next()){var f=Z(o.value,2),m=f[0],w=f[1];w.some(function(v){var b=v.options;return b.lifecycle===C.ContainerScoped})&&i._registry.setAll(m,w.map(function(v){return v.options.lifecycle===C.ContainerScoped?{provider:v.provider,options:v.options}:v}))}}catch(v){e={error:v}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return i},t.prototype.beforeResolution=function(e,r,i){i===void 0&&(i={frequency:"Always"}),this.interceptors.preResolution.set(e,{callback:r,options:i})},t.prototype.afterResolution=function(e,r,i){i===void 0&&(i={frequency:"Always"}),this.interceptors.postResolution.set(e,{callback:r,options:i})},t.prototype.dispose=function(){return dt(this,void 0,void 0,function(){var e;return pt(this,function(r){switch(r.label){case 0:return this.disposed=!0,e=[],this.disposables.forEach(function(i){var a=i.dispose();a&&e.push(a)}),[4,Promise.all(e)];case 1:return r.sent(),[2]}})})},t.prototype.getRegistration=function(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null},t.prototype.getAllRegistrations=function(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null},t.prototype.construct=function(e,r){var i=this;if(e instanceof je)return e.createProxy(function(o){return i.resolve(o,r)});var a=(function(){var o=He.get(e);if(!o||o.length===0){if(e.length===0)return new e;throw new Error('TypeInfo not known for "'+e.name+'"')}var f=o.map(i.resolveParams(r,e));return new(e.bind.apply(e,D([void 0],f)))})();return Rt(a)&&this.disposables.add(a),a},t.prototype.resolveParams=function(e,r){var i=this;return function(a,o){var f,m,w;try{return yt(a)?xe(a)?a.multiple?(f=i.resolve(a.transform)).transform.apply(f,D([i.resolveAll(a.token,new $,a.isOptional)],a.transformArgs)):(m=i.resolve(a.transform)).transform.apply(m,D([i.resolve(a.token,e,a.isOptional)],a.transformArgs)):a.multiple?i.resolveAll(a.token,new $,a.isOptional):i.resolve(a.token,e,a.isOptional):xe(a)?(w=i.resolve(a.transform,e)).transform.apply(w,D([i.resolve(a.token,e)],a.transformArgs)):i.resolve(a,e)}catch(v){throw new Error(bt(r,o,v))}}},t.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},t})(),It=new St;function ce(t,e){var r={token:t,multiple:!1,isOptional:e};return De(r)}function V(t){return function(e){He.set(e,vt(e))}}function Ct(t,e){var r={token:t,multiple:!0,isOptional:e};return De(r)}if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var Tt=Object.getOwnPropertyDescriptor,At=(t,e,r,i)=>{for(var a=i>1?void 0:i?Tt(e,r):e,o=t.length-1,f;o>=0;o--)(f=t[o])&&(a=f(a)||a);return a};exports.EditorRenderer=class extends ue{orbit;raycast;mouse;isEventListenersAdded;constructor(e){super(e);const r=new I.GridHelper(this.gl.gl,{size:10,divisions:10});r.position.y=-.001,r.setParent(this.scene),new I.AxesHelper(this.gl.gl,{size:6,symmetric:!0}).setParent(this.scene),this.orbit=new ht(this.camera,{element:this.canvas}),this.raycast=new I.Raycast,this.mouse=new I.Vec2,this.isEventListenersAdded=!1}addMesh(e){this.scene.addChild(e)}getContext(){return this.gl.gl}removeMesh(e){this.scene.removeChild(e)}getMeshes(){return this.meshes}update(){this.orbit?.update()}addFigure(e){const r=super.addFigure(e);if(r.geometry){const i=r.geometry.constructor.name;r.geometry.raycast=i.includes("Sphere")?"sphere":"box"}return r.isHit=!1,r.onBeforeRender(({mesh:i})=>{this.updateHitUniform(i)}),this.isEventListenersAdded||this.initMouseListeners(),r}updateHitUniform(e){this.program.uniforms.uHit.value=e.isHit?1:0}initMouseListeners(){document.addEventListener("mousemove",this.handleMouseMove,!1),this.isEventListenersAdded=!0}handleMouseMove=e=>{if(this.orbit.isInteracting)return;this.mouse.set(2*(e.x/this.gl.width)-1,2*(1-e.y/this.gl.height)-1),this.raycast.castMouse(this.camera,this.mouse),this.meshes.forEach(i=>i.isHit=!1),this.raycast.intersectBounds(this.meshes).forEach(i=>i.isHit=!0)};destroy(){this.isEventListenersAdded&&(window.removeEventListener("mousemove",this.handleMouseMove,!1),this.isEventListenersAdded=!1),this.orbit=null,this.raycast=null,this.mouse=null,super.destroy()}};exports.EditorRenderer=At([V()],exports.EditorRenderer);class xt extends ue{orbit;constructor(e){super(e),this.orbit=new I.Orbit(this.camera,{element:this.canvas,target:new I.Vec3(0,0,0),minPolarAngle:Math.PI/2,maxPolarAngle:Math.PI/2,enableRotate:!0,enableZoom:!1,enablePan:!1})}update(){this.orbit?.update()}}class Dt{type;position;normal;uv;material;constructor(e){this.type=e.type,this.position=e.position,this.normal=e.normal??[],this.uv=e.uv??[],this.material=e.material}}var Ne=(t=>(t[t.Cube=0]="Cube",t[t.Sphere=1]="Sphere",t[t.Plane=2]="Plane",t[t.Cylinder=3]="Cylinder",t[t.Custom=4]="Custom",t))(Ne||{}),G=(t=>(t.Plane="plane",t.Wireframe="wireframe",t.Texture="texture",t))(G||{});class kt{positions=[];normals=[];uvs=[];tmpPositions=[];tmpNormals=[];tmpUVs=[];load(e){const r=e.split(`
58
+ `);for(const a of r){if(!a.trim()||a.startsWith("#"))continue;const o=a.trim().split(/\s+/);switch(o[0]){case"v":this.tmpPositions.push(o.slice(1).map(Number));break;case"vn":this.tmpNormals.push(o.slice(1).map(Number));break;case"vt":this.tmpUVs.push(o.slice(1).map(Number));break;case"f":this.processFaceLine(o);break}}const i={type:Ne.Custom,position:this.positions,...this.normals.length>0&&{normal:this.normals},...this.uvs.length>0&&{uv:this.uvs}};return new Dt(i)}processFaceLine(e){for(let r=1;r<e.length;r++){const i=e[r];if(!i)continue;const[a,o,f]=i.split("/"),m=a?parseInt(a,10):void 0,w=o?parseInt(o,10):void 0,v=f?parseInt(f,10):void 0;if(m!==void 0){const b=this.tmpPositions[m-1];b&&this.positions.push(...b)}if(w!==void 0){const b=this.tmpUVs[w-1];b&&this.uvs.push(...b)}if(v!==void 0){const b=this.tmpNormals[v-1];b&&this.normals.push(...b)}}}}var jt=Object.getOwnPropertyDescriptor,Ht=(t,e,r,i)=>{for(var a=i>1?void 0:i?jt(e,r):e,o=t.length-1,f;o>=0;o--)(f=t[o])&&(a=f(a)||a);return a},Nt=(t,e)=>(r,i)=>e(r,i,t);let se=class{currentMode=G.Plane;handlers;constructor(t){this.handlers=new Map(t.map(e=>[e.mode,e]))}manage(t){t!==this.currentMode&&(this.handlers.get(this.currentMode)?.rollback(),t!==G.Plane&&this.handlers.get(t)?.handle(),this.currentMode=t)}destroy(){this.handlers&&this.handlers.clear(),this.currentMode=G.Plane}};se=Ht([V(),Nt(0,Ct("IDisplayHandler"))],se);var Ft=Object.getOwnPropertyDescriptor,Lt=(t,e,r,i)=>{for(var a=i>1?void 0:i?Ft(e,r):e,o=t.length-1,f;o>=0;o--)(f=t[o])&&(a=f(a)||a);return a},Gt=(t,e)=>(r,i)=>e(r,i,t);let ae=class{constructor(t){this.api=t,this.wireMeshes=[],this.context=this.api.getContext(),this.wireMeshProgram=new I.NormalProgram(this.context)}mode=G.Wireframe;wireMeshes;wireMeshProgram;context;handle(){const t=this.api.getMeshes();this.createWireMeshes(t),this.api.removeMeshes(t),this.api.addMeshes(this.wireMeshes)}rollback(){const t=this.api.getMeshes();this.api.removeMeshes(this.wireMeshes),this.api.addMeshes(t)}destroy(){this.wireMeshes&&(this.wireMeshes.length=0,this.wireMeshes=[])}createWireMeshes(t){for(const e of t){const r=new I.WireMesh(this.context,{geometry:e.geometry,program:this.wireMeshProgram});this.wireMeshes.push(r)}}};ae=Lt([V(),Gt(0,ce("RendererApi"))],ae);var Vt=Object.getOwnPropertyDescriptor,Wt=(t,e,r,i)=>{for(var a=i>1?void 0:i?Vt(e,r):e,o=t.length-1,f;o>=0;o--)(f=t[o])&&(a=f(a)||a);return a},zt=(t,e)=>(r,i)=>e(r,i,t);let oe=class{constructor(t){this.renderer=t}addMesh(t){this.renderer.addMesh(t)}addMeshes(t){for(const e of t)this.renderer.addMesh(e)}removeMesh(t){this.renderer.removeMesh(t)}removeMeshes(t){for(const e of t)this.renderer.removeMesh(e)}getMeshes(){return this.renderer.getMeshes()}getContext(){return this.renderer.getContext()}};oe=Wt([V(),zt(0,ce("EditorRenderer"))],oe);var Ut=Object.getOwnPropertyDescriptor,$t=(t,e,r,i)=>{for(var a=i>1?void 0:i?Ut(e,r):e,o=t.length-1,f;o>=0;o--)(f=t[o])&&(a=f(a)||a);return a},qt=(t,e)=>(r,i)=>e(r,i,t);exports.EditorHub=class{constructor(e){this.displayManager=e}setDisplayMode(e){this.displayManager.manage(e)}destroy(){this.displayManager.destroy()}};exports.EditorHub=$t([V(),qt(0,ce("IDisplayManager"))],exports.EditorHub);function Bt(t){const e=It.createChildContainer();return e.registerInstance("EditorRenderer",t),e.registerSingleton("RendererApi",oe),e.registerSingleton("IDisplayHandler",ae),e.registerSingleton("IDisplayManager",se),e.registerSingleton("EditorHub",exports.EditorHub),e}function Zt(t){return Bt(t).resolve("EditorHub")}exports.ObjLoader=kt;exports.PreviewRenderer=xt;exports.Renderer=ue;exports.createAppHub=Zt;
package/dist/index.d.ts CHANGED
@@ -2,5 +2,7 @@ export * from './core/renderer';
2
2
  export * from './core/editor-renderer';
3
3
  export * from './core/preview-renderer';
4
4
  export * from './loaders/obj-loader';
5
- export * from './utils/program-settings';
5
+ export * from './hub/app-hub';
6
+ export * from './hub/editor-hub';
7
+ export * from './interfaces/manager';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAErC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,sBAAsB,CAAC"}