@shapediver/viewer.rendering-engine.camera-engine 2.10.1-rc.0 → 2.12.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 (84) hide show
  1. package/dist/implementation/CameraEngine.js +45 -41
  2. package/dist/implementation/CameraEngine.js.map +1 -1
  3. package/dist/implementation/camera/AbstractCamera.d.ts +5 -3
  4. package/dist/implementation/camera/AbstractCamera.d.ts.map +1 -1
  5. package/dist/implementation/camera/AbstractCamera.js +71 -36
  6. package/dist/implementation/camera/AbstractCamera.js.map +1 -1
  7. package/dist/implementation/camera/OrthographicCamera.js +72 -68
  8. package/dist/implementation/camera/OrthographicCamera.js.map +1 -1
  9. package/dist/implementation/camera/PerspectiveCamera.js +69 -65
  10. package/dist/implementation/camera/PerspectiveCamera.js.map +1 -1
  11. package/dist/implementation/controls/AbstractCameraControls.d.ts +13 -7
  12. package/dist/implementation/controls/AbstractCameraControls.d.ts.map +1 -1
  13. package/dist/implementation/controls/AbstractCameraControls.js +105 -68
  14. package/dist/implementation/controls/AbstractCameraControls.js.map +1 -1
  15. package/dist/implementation/controls/OrthographicCameraControls.d.ts.map +1 -1
  16. package/dist/implementation/controls/OrthographicCameraControls.js +16 -12
  17. package/dist/implementation/controls/OrthographicCameraControls.js.map +1 -1
  18. package/dist/implementation/controls/PerspectiveCameraControls.d.ts +15 -3
  19. package/dist/implementation/controls/PerspectiveCameraControls.d.ts.map +1 -1
  20. package/dist/implementation/controls/PerspectiveCameraControls.js +126 -92
  21. package/dist/implementation/controls/PerspectiveCameraControls.js.map +1 -1
  22. package/dist/implementation/controls/orthographic/CameraControlsEventDistribution.d.ts +3 -3
  23. package/dist/implementation/controls/orthographic/CameraControlsEventDistribution.d.ts.map +1 -1
  24. package/dist/implementation/controls/orthographic/CameraControlsEventDistribution.js +36 -24
  25. package/dist/implementation/controls/orthographic/CameraControlsEventDistribution.js.map +1 -1
  26. package/dist/implementation/controls/orthographic/CameraControlsLogic.d.ts.map +1 -1
  27. package/dist/implementation/controls/orthographic/CameraControlsLogic.js +70 -68
  28. package/dist/implementation/controls/orthographic/CameraControlsLogic.js.map +1 -1
  29. package/dist/implementation/controls/perspective/CameraControlsEventDistribution.d.ts +4 -4
  30. package/dist/implementation/controls/perspective/CameraControlsEventDistribution.d.ts.map +1 -1
  31. package/dist/implementation/controls/perspective/CameraControlsEventDistribution.js +44 -33
  32. package/dist/implementation/controls/perspective/CameraControlsEventDistribution.js.map +1 -1
  33. package/dist/implementation/controls/perspective/CameraControlsLogic.d.ts +3 -2
  34. package/dist/implementation/controls/perspective/CameraControlsLogic.d.ts.map +1 -1
  35. package/dist/implementation/controls/perspective/CameraControlsLogic.js +147 -121
  36. package/dist/implementation/controls/perspective/CameraControlsLogic.js.map +1 -1
  37. package/dist/implementation/interpolation/CameraInterpolationManager.js +38 -11
  38. package/dist/implementation/interpolation/CameraInterpolationManager.js.map +1 -1
  39. package/dist/implementation/interpolation/interpolationMethods/CameraCylindricalInterpolation.js +25 -21
  40. package/dist/implementation/interpolation/interpolationMethods/CameraCylindricalInterpolation.js.map +1 -1
  41. package/dist/implementation/interpolation/interpolationMethods/CameraLinearInterpolation.js +12 -8
  42. package/dist/implementation/interpolation/interpolationMethods/CameraLinearInterpolation.js.map +1 -1
  43. package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.js +12 -8
  44. package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.js.map +1 -1
  45. package/dist/implementation/interpolation/interpolationMethods/CameraOrthographicInterpolation.js +12 -8
  46. package/dist/implementation/interpolation/interpolationMethods/CameraOrthographicInterpolation.js.map +1 -1
  47. package/dist/implementation/interpolation/interpolationMethods/CameraSphericalInterpolation.js +19 -15
  48. package/dist/implementation/interpolation/interpolationMethods/CameraSphericalInterpolation.js.map +1 -1
  49. package/dist/index.js +19 -11
  50. package/dist/index.js.map +1 -1
  51. package/dist/interfaces/ICameraEngine.js +5 -2
  52. package/dist/interfaces/ICameraEngine.js.map +1 -1
  53. package/dist/interfaces/camera/ICamera.d.ts +9 -8
  54. package/dist/interfaces/camera/ICamera.d.ts.map +1 -1
  55. package/dist/interfaces/camera/ICamera.js +2 -1
  56. package/dist/interfaces/camera/IOrthographicCamera.js +5 -2
  57. package/dist/interfaces/camera/IOrthographicCamera.js.map +1 -1
  58. package/dist/interfaces/camera/IPerspectiveCamera.js +2 -1
  59. package/dist/interfaces/controls/ICameraControls.d.ts +4 -3
  60. package/dist/interfaces/controls/ICameraControls.d.ts.map +1 -1
  61. package/dist/interfaces/controls/ICameraControls.js +2 -1
  62. package/dist/interfaces/controls/ICameraControlsEventDistribution.js +2 -1
  63. package/dist/interfaces/controls/ICameraControlsLogic.d.ts +3 -2
  64. package/dist/interfaces/controls/ICameraControlsLogic.d.ts.map +1 -1
  65. package/dist/interfaces/controls/ICameraControlsLogic.js +2 -1
  66. package/dist/interfaces/controls/ICameraControlsUsage.js +2 -1
  67. package/dist/interfaces/controls/IOrthographicCameraControls.js +2 -1
  68. package/dist/interfaces/controls/IPerspectiveCameraControls.d.ts +4 -0
  69. package/dist/interfaces/controls/IPerspectiveCameraControls.d.ts.map +1 -1
  70. package/dist/interfaces/controls/IPerspectiveCameraControls.js +2 -1
  71. package/dist/interfaces/interpolation/ICameraInterpolation.js +2 -1
  72. package/package.json +8 -8
  73. package/src/implementation/camera/AbstractCamera.ts +44 -37
  74. package/src/implementation/controls/AbstractCameraControls.ts +113 -70
  75. package/src/implementation/controls/OrthographicCameraControls.ts +9 -9
  76. package/src/implementation/controls/PerspectiveCameraControls.ts +114 -73
  77. package/src/implementation/controls/orthographic/CameraControlsEventDistribution.ts +61 -56
  78. package/src/implementation/controls/orthographic/CameraControlsLogic.ts +45 -53
  79. package/src/implementation/controls/perspective/CameraControlsEventDistribution.ts +83 -80
  80. package/src/implementation/controls/perspective/CameraControlsLogic.ts +100 -81
  81. package/src/interfaces/camera/ICamera.ts +31 -26
  82. package/src/interfaces/controls/ICameraControls.ts +5 -5
  83. package/src/interfaces/controls/ICameraControlsLogic.ts +6 -2
  84. package/src/interfaces/controls/IPerspectiveCameraControls.ts +10 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ICamera.d.ts","sourceRoot":"","sources":["../../../src/interfaces/camera/ICamera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAE9E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAEnE,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,GACtB,cAAc,GAAG,eAAe,GAAG,iBAAiB,GACpD,UAAU,GAAG,WAAW,GAAG,aAAa,GACxC,YAAY,GAAG,aAAa,GAAG,eAAe,GAC9C,YAAY,GAAG,aAAa,GAAG,eAAe,GAC9C,eAAe,GAAG,gBAAgB,GAAG,kBAAkB,GACvD,gBAAgB,GAAG,iBAAiB,GAAG,mBAAmB,GAC1D,aAAa,GAAG,cAAc,GAAG,gBAAgB,GACjD,YAAY,GAAG,aAAa,GAAG,eAAe,GAC9C,SAAS,GAAG,UAAU,GAAG,YAAY,GACrC,WAAW,GAAG,YAAY,GAAG,cAAc,GAC3C,QAAQ,CAAC;IACT;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAC;IACrD;;OAEG;IACH,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAA;CAChE;AAED,MAAM,WAAW,OAAQ,SAAQ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AAC;KAAE,CAAC;IACtH,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9E,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAGzE"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=ICamera.js.map
@@ -1,4 +1,7 @@
1
- export var ORTHOGRAPHIC_CAMERA_DIRECTION;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ORTHOGRAPHIC_CAMERA_DIRECTION = void 0;
4
+ var ORTHOGRAPHIC_CAMERA_DIRECTION;
2
5
  (function (ORTHOGRAPHIC_CAMERA_DIRECTION) {
3
6
  ORTHOGRAPHIC_CAMERA_DIRECTION["TOP"] = "top";
4
7
  ORTHOGRAPHIC_CAMERA_DIRECTION["BOTTOM"] = "bottom";
@@ -6,5 +9,5 @@ export var ORTHOGRAPHIC_CAMERA_DIRECTION;
6
9
  ORTHOGRAPHIC_CAMERA_DIRECTION["RIGHT"] = "right";
7
10
  ORTHOGRAPHIC_CAMERA_DIRECTION["FRONT"] = "front";
8
11
  ORTHOGRAPHIC_CAMERA_DIRECTION["BACK"] = "back";
9
- })(ORTHOGRAPHIC_CAMERA_DIRECTION || (ORTHOGRAPHIC_CAMERA_DIRECTION = {}));
12
+ })(ORTHOGRAPHIC_CAMERA_DIRECTION = exports.ORTHOGRAPHIC_CAMERA_DIRECTION || (exports.ORTHOGRAPHIC_CAMERA_DIRECTION = {}));
10
13
  //# sourceMappingURL=IOrthographicCamera.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IOrthographicCamera.js","sourceRoot":"","sources":["../../../src/interfaces/camera/IOrthographicCamera.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,6BAOV;AAPF,WAAY,6BAA6B;IACrC,4CAAW,CAAA;IACX,kDAAiB,CAAA;IACjB,8CAAa,CAAA;IACb,gDAAe,CAAA;IACf,gDAAe,CAAA;IACf,8CAAa,CAAA;AAChB,CAAC,EAPU,6BAA6B,KAA7B,6BAA6B,QAOvC"}
1
+ {"version":3,"file":"IOrthographicCamera.js","sourceRoot":"","sources":["../../../src/interfaces/camera/IOrthographicCamera.ts"],"names":[],"mappings":";;;AAGA,IAAY,6BAOV;AAPF,WAAY,6BAA6B;IACrC,4CAAW,CAAA;IACX,kDAAiB,CAAA;IACjB,8CAAa,CAAA;IACb,gDAAe,CAAA;IACf,gDAAe,CAAA;IACf,8CAAa,CAAA;AAChB,CAAC,EAPU,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAOvC"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=IPerspectiveCamera.js.map
@@ -1,6 +1,6 @@
1
- import { mat4, vec3 } from "gl-matrix";
2
- import { ICamera, ICameraOptions } from "../camera/ICamera";
3
- import { ICameraControlsEventDistribution } from "./ICameraControlsEventDistribution";
1
+ import { mat4, vec2, vec3 } from 'gl-matrix';
2
+ import { ICamera, ICameraOptions } from '../camera/ICamera';
3
+ import { ICameraControlsEventDistribution } from './ICameraControlsEventDistribution';
4
4
  export interface ICameraControls {
5
5
  readonly cameraControlsEventDistribution: ICameraControlsEventDistribution;
6
6
  camera: ICamera;
@@ -28,6 +28,7 @@ export interface ICameraControls {
28
28
  update(time: number): {
29
29
  position: vec3;
30
30
  target: vec3;
31
+ sceneRotation: vec2;
31
32
  };
32
33
  }
33
34
  //# sourceMappingURL=ICameraControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ICameraControls.d.ts","sourceRoot":"","sources":["../../../src/interfaces/controls/ICameraControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,MAAM,WAAW,eAAe;IAG5B,QAAQ,CAAC,+BAA+B,EAAE,gCAAgC,CAAC;IAE3E,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,IAAI,CAAC;IAMb,OAAO,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,IAAI,CAAA;KAAE,EAAE,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IACjF,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IACjF,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/E,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/E,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,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AAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IACjF,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IACjF,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/E,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/E,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC3E,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClE,4BAA4B,IAAI,IAAI,CAAC;IACrC,sBAAsB,IAAI,IAAI,CAAC;IAC/B,0BAA0B,IAAI,IAAI,CAAC;IACnC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,QAAQ,IAAI,OAAO,CAAC;IACpB,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IAC5D,KAAK,IAAI,IAAI,CAAC;IACd,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,QAAQ,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,IAAI,CAAC;QAAC,aAAa,EAAE,IAAI,CAAA;KAAE,CAAC;CAG/E"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=ICameraControls.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=ICameraControlsEventDistribution.js.map
@@ -1,10 +1,11 @@
1
- import { vec3 } from 'gl-matrix';
1
+ import { vec2, vec3 } from 'gl-matrix';
2
2
  export interface ICameraControlsLogic {
3
3
  isWithinRestrictions(position: any, target: any): boolean;
4
4
  reset(): void;
5
- restrict(p: vec3, t: vec3): {
5
+ restrict(p: vec3, t: vec3, s?: vec2): {
6
6
  position: vec3;
7
7
  target: vec3;
8
+ sceneRotation?: vec2;
8
9
  };
9
10
  update(time: number, manualInteraction: boolean): void;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ICameraControlsLogic.d.ts","sourceRoot":"","sources":["../../../src/interfaces/controls/ICameraControlsLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,WAAW,oBAAoB;IACjC,oBAAoB,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC;IAC1D,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG;QAAE,QAAQ,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,IAAI,CAAA;KAAE,CAAC;IAC7D,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAA;CACzD"}
1
+ {"version":3,"file":"ICameraControlsLogic.d.ts","sourceRoot":"","sources":["../../../src/interfaces/controls/ICameraControlsLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW,oBAAoB;IAGjC,oBAAoB,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC;IAC1D,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG;QAAE,QAAQ,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,IAAI,CAAC;QAAC,aAAa,CAAC,EAAE,IAAI,CAAA;KAAE,CAAC;IAC7F,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAA;CAGzD"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=ICameraControlsLogic.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=ICameraControlsUsage.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=IOrthographicCameraControls.js.map
@@ -12,9 +12,12 @@ export interface IPerspectiveCameraControls extends ICameraControls {
12
12
  };
13
13
  damping: number;
14
14
  enableAutoRotation: boolean;
15
+ enableAzimuthRotation: boolean;
15
16
  enableKeyPan: boolean;
16
17
  enablePan: boolean;
18
+ enablePolarRotation: boolean;
17
19
  enableRotation: boolean;
20
+ enableTurntableControls: boolean;
18
21
  enableZoom: boolean;
19
22
  input: {
20
23
  keys: {
@@ -52,6 +55,7 @@ export interface IPerspectiveCameraControls extends ICameraControls {
52
55
  center: vec3;
53
56
  radius: number;
54
57
  };
58
+ turntableCenter: vec3;
55
59
  zoomRestriction: {
56
60
  minDistance: number;
57
61
  maxDistance: number;
@@ -1 +1 @@
1
- {"version":3,"file":"IPerspectiveCameraControls.d.ts","sourceRoot":"","sources":["../../../src/interfaces/controls/IPerspectiveCameraControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,0BAA2B,SAAQ,eAAe;IAC/D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE;Q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AE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IACvL,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IACxH,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE;QAAE,MAAM,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,uBAAuB,EAAE;QAAE,MAAM,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,eAAe,EAAE,IAAI,CAAC;IACtB,eAAe,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,SAAS,EAAE,MAAM,CAAC;CAGrB"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=IPerspectiveCameraControls.js.map
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=ICameraInterpolation.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapediver/viewer.rendering-engine.camera-engine",
3
- "version": "2.10.1-rc.0",
3
+ "version": "2.12.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "Michael Oppitz <michael@shapediver.com>",
@@ -39,15 +39,15 @@
39
39
  "testEnvironment": "node"
40
40
  },
41
41
  "dependencies": {
42
- "@shapediver/viewer.rendering-engine.rendering-engine": "2.10.1-rc.0",
43
- "@shapediver/viewer.settings": "0.5.5",
44
- "@shapediver/viewer.shared.math": "2.10.1-rc.0",
45
- "@shapediver/viewer.shared.node-tree": "2.10.1-rc.0",
46
- "@shapediver/viewer.shared.services": "2.10.1-rc.0",
47
- "@shapediver/viewer.shared.types": "2.10.1-rc.0",
42
+ "@shapediver/viewer.rendering-engine.rendering-engine": "2.12.0",
43
+ "@shapediver/viewer.settings": "0.5.7",
44
+ "@shapediver/viewer.shared.math": "2.12.0",
45
+ "@shapediver/viewer.shared.node-tree": "2.12.0",
46
+ "@shapediver/viewer.shared.services": "2.12.0",
47
+ "@shapediver/viewer.shared.types": "2.12.0",
48
48
  "@tweenjs/tween.js": "^18.6.4",
49
49
  "detect-it": "4.0.1",
50
50
  "gl-matrix": "3.3.0"
51
51
  },
52
- "gitHead": "7d6e75b740536d82351b9f4d1c2b0722bbde5a87"
52
+ "gitHead": "4453bb1d704facd5722ffd81518e54b5453d991f"
53
53
  }
@@ -1,20 +1,18 @@
1
- import * as detectIt from 'detect-it'
2
- import { vec2, vec3 } from 'gl-matrix'
1
+ import * as detectIt from 'detect-it';
2
+ import { vec2, vec3 } from 'gl-matrix';
3
3
  import {
4
- DomEventEngine,
5
4
  EventEngine,
6
5
  EVENTTYPE,
7
- IEvent,
8
6
  SettingsEngine,
9
7
  StateEngine,
10
- } from '@shapediver/viewer.shared.services'
11
- import { Box, IBox } from '@shapediver/viewer.shared.math'
12
- import { AbstractTreeNodeData, ITreeNode } from '@shapediver/viewer.shared.node-tree'
8
+ } from '@shapediver/viewer.shared.services';
9
+ import { Box, IBox } from '@shapediver/viewer.shared.math';
10
+ import { AbstractTreeNodeData, ITreeNode } from '@shapediver/viewer.shared.node-tree';
13
11
 
14
- import { ICameraControls } from '../../interfaces/controls/ICameraControls'
15
- import { ICamera, ICameraOptions } from '../../interfaces/camera/ICamera'
16
- import { CAMERA_TYPE } from '../../interfaces/ICameraEngine'
17
- import { IRenderingEngine } from '@shapediver/viewer.rendering-engine.rendering-engine'
12
+ import { ICameraControls } from '../../interfaces/controls/ICameraControls';
13
+ import { ICamera, ICameraOptions } from '../../interfaces/camera/ICamera';
14
+ import { CAMERA_TYPE } from '../../interfaces/ICameraEngine';
15
+ import { IRenderingEngine } from '@shapediver/viewer.rendering-engine.rendering-engine';
18
16
 
19
17
  export abstract class AbstractCamera extends AbstractTreeNodeData implements ICamera {
20
18
  // #region Properties (23)
@@ -29,22 +27,22 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
29
27
  #name?: string;
30
28
  #near: number = 1;
31
29
  #node?: ITreeNode;
32
- #useNodeData: boolean = false;
33
30
  #order?: number;
34
31
  #revertAtMouseUp: boolean = false;
35
32
  #revertAtMouseUpDuration: number = 800;
33
+ #sceneRotation: vec2 = vec2.create();
34
+ #useNodeData: boolean = false;
36
35
  #zoomExtentsFactor: number = 1;
37
36
 
38
37
  protected readonly _eventEngine: EventEngine = EventEngine.instance;
39
38
  protected readonly _stateEngine: StateEngine = StateEngine.instance;
40
39
 
41
40
  protected _boundingBox: IBox = new Box();
41
+ protected abstract _controls: ICameraControls;
42
42
  protected _position: vec3 = vec3.create();
43
43
  protected _target: vec3 = vec3.create();
44
44
  protected _viewportId?: string;
45
45
 
46
- protected abstract _controls: ICameraControls;
47
-
48
46
  // #endregion Properties (23)
49
47
 
50
48
  // #region Constructors (1)
@@ -55,7 +53,7 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
55
53
 
56
54
  // #endregion Constructors (1)
57
55
 
58
- // #region Public Accessors (39)
56
+ // #region Public Accessors (41)
59
57
 
60
58
  public get active(): boolean {
61
59
  return this.#active;
@@ -149,14 +147,6 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
149
147
  this.#node = value;
150
148
  }
151
149
 
152
- public get useNodeData(): boolean {
153
- return this.#useNodeData;
154
- }
155
-
156
- public set useNodeData(value: boolean) {
157
- this.#useNodeData = value;
158
- }
159
-
160
150
  public get order(): number | undefined {
161
151
  return this.#order;
162
152
  }
@@ -190,6 +180,14 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
190
180
  this.#revertAtMouseUpDuration = value;
191
181
  }
192
182
 
183
+ public get sceneRotation(): vec2 {
184
+ return this.#sceneRotation;
185
+ }
186
+
187
+ public set sceneRotation(value: vec2) {
188
+ this.#sceneRotation = value;
189
+ }
190
+
193
191
  public get target(): vec3 {
194
192
  return this._target;
195
193
  }
@@ -203,6 +201,14 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
203
201
  return this._type;
204
202
  }
205
203
 
204
+ public get useNodeData(): boolean {
205
+ return this.#useNodeData;
206
+ }
207
+
208
+ public set useNodeData(value: boolean) {
209
+ this.#useNodeData = value;
210
+ }
211
+
206
212
  public get viewportId(): string | undefined {
207
213
  return this._viewportId;
208
214
  }
@@ -215,7 +221,7 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
215
221
  this.#zoomExtentsFactor = value;
216
222
  }
217
223
 
218
- // #endregion Public Accessors (39)
224
+ // #endregion Public Accessors (41)
219
225
 
220
226
  // #region Public Methods (5)
221
227
 
@@ -256,22 +262,23 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
256
262
  }
257
263
 
258
264
  public update(time: number): boolean {
259
- if(this.useNodeData && this.node && this._viewportId) {
265
+ if (this.useNodeData && this.node && this._viewportId) {
260
266
  return true;
261
267
  } else {
262
- const { position, target } = this._controls.update(time);
268
+ const { position, target, sceneRotation } = this._controls.update(time);
263
269
  let changed = true;
264
- if (vec3.equals(position, this.position) && vec3.equals(target, this.target))
270
+ if (vec3.equals(position, this.position) && vec3.equals(target, this.target))
265
271
  changed = false;
266
-
272
+
267
273
  this.position = vec3.clone(position);
268
274
  this.target = vec3.clone(target);
275
+ this.sceneRotation = vec2.clone(sceneRotation);
269
276
  return changed;
270
277
  }
271
278
  }
272
279
 
273
280
  public zoomTo(zoomTarget?: Box, options?: ICameraOptions): Promise<boolean> {
274
- const { position, target } = this.calculateZoomTo(zoomTarget)
281
+ const { position, target } = this.calculateZoomTo(zoomTarget);
275
282
  return this.set(position, target, options);
276
283
  }
277
284
 
@@ -291,24 +298,24 @@ export abstract class AbstractCamera extends AbstractTreeNodeData implements ICa
291
298
 
292
299
  protected assignViewerInternal(viewportId: string, canvas: HTMLCanvasElement) {
293
300
  this._viewportId = viewportId;
294
- this._eventEngine.addListener(EVENTTYPE.SESSION.SESSION_CUSTOMIZED, async (e: IEvent) => {
301
+ this._eventEngine.addListener(EVENTTYPE.SESSION.SESSION_CUSTOMIZED, async () => {
295
302
  if (this.#autoAdjust === true) {
296
- const innerListenerToken = this._eventEngine.addListener(EVENTTYPE.VIEWPORT.VIEWPORT_UPDATED, async (e: IEvent) => {
303
+ const innerListenerToken = this._eventEngine.addListener(EVENTTYPE.VIEWPORT.VIEWPORT_UPDATED, async () => {
297
304
  this.zoomTo();
298
- this._eventEngine.removeListener(innerListenerToken)
299
- })
305
+ this._eventEngine.removeListener(innerListenerToken);
306
+ });
300
307
  }
301
308
  });
302
309
  const revert = () => {
303
310
  if (this.#revertAtMouseUp === true)
304
311
  this.reset({ duration: this.#revertAtMouseUpDuration });
305
312
  };
306
- canvas.addEventListener("mouseup", () => revert(), detectIt.supportsPassiveEvents ? { capture: false, passive: true } : false);
307
- canvas.addEventListener("mouseout", () => revert(), detectIt.supportsPassiveEvents ? { capture: false, passive: true } : false);
308
- canvas.addEventListener("touchend", () => revert(), detectIt.supportsPassiveEvents ? { capture: false, passive: true } : false);
313
+ canvas.addEventListener('mouseup', () => revert(), detectIt.supportsPassiveEvents ? { capture: false, passive: true } : false);
314
+ canvas.addEventListener('mouseout', () => revert(), detectIt.supportsPassiveEvents ? { capture: false, passive: true } : false);
315
+ canvas.addEventListener('touchend', () => revert(), detectIt.supportsPassiveEvents ? { capture: false, passive: true } : false);
309
316
 
310
317
  let zoomResizeTimeout: NodeJS.Timeout;
311
- let mouseWheelEvent = /Firefox/i.test(navigator.userAgent) ? "DOMMouseScroll" : "mousewheel"; //FF doesn't recognize mousewheel as of FF3.x
318
+ const mouseWheelEvent = /Firefox/i.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel'; //FF doesn't recognize mousewheel as of FF3.x
312
319
  canvas.addEventListener(mouseWheelEvent,
313
320
  () => {
314
321
  clearTimeout(zoomResizeTimeout);