kitchen-simulator 11.30.0 → 11.30.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.
Files changed (57) hide show
  1. package/es/assets/img/svg/accessories.svg +4 -4
  2. package/es/assets/img/svg/bottombar/elevation-back.svg +6 -6
  3. package/es/assets/img/svg/bottombar/elevation-front.svg +6 -6
  4. package/es/assets/img/svg/bottombar/elevation-left.svg +6 -6
  5. package/es/assets/img/svg/bottombar/elevation-right.svg +7 -7
  6. package/es/assets/img/svg/bottombar/elevation.svg +13 -13
  7. package/es/assets/img/svg/detail.svg +77 -77
  8. package/es/assets/img/svg/filtersActive.svg +19 -19
  9. package/es/assets/img/svg/invert.svg +12 -12
  10. package/es/assets/img/svg/menubar/login.svg +84 -84
  11. package/es/assets/img/svg/menubar/my_projects.svg +85 -85
  12. package/es/assets/img/svg/menubar/new_project.svg +110 -110
  13. package/es/assets/img/svg/menubar/save_project.svg +84 -84
  14. package/es/assets/img/svg/options.svg +3 -3
  15. package/es/assets/img/svg/positioning.svg +3 -3
  16. package/es/assets/img/svg/toggleFilters.svg +19 -19
  17. package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  18. package/es/assets/img/svg/wizardstep/detail_view.svg +87 -87
  19. package/es/assets/img/svg/wizardstep/tile_view.svg +95 -95
  20. package/es/class/vertex.js +7 -1
  21. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  22. package/es/events/external/handlers.syncScene.js +33 -0
  23. package/es/mappings/external-events/mapExternalEventPayload.js +4 -4
  24. package/es/mappings/external-events/mappers/addItemMapper.js +9 -9
  25. package/es/shared/domain/asset/sanitize-asset-url.js +5 -5
  26. package/es/shared/math/line-metrics.js +34 -0
  27. package/es/utils/helper.js +2 -5
  28. package/es/utils/skinPanelEngine.js +14 -14
  29. package/lib/assets/img/svg/accessories.svg +4 -4
  30. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -6
  31. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -6
  32. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -6
  33. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -7
  34. package/lib/assets/img/svg/bottombar/elevation.svg +13 -13
  35. package/lib/assets/img/svg/detail.svg +77 -77
  36. package/lib/assets/img/svg/filtersActive.svg +19 -19
  37. package/lib/assets/img/svg/invert.svg +12 -12
  38. package/lib/assets/img/svg/menubar/login.svg +84 -84
  39. package/lib/assets/img/svg/menubar/my_projects.svg +85 -85
  40. package/lib/assets/img/svg/menubar/new_project.svg +110 -110
  41. package/lib/assets/img/svg/menubar/save_project.svg +84 -84
  42. package/lib/assets/img/svg/options.svg +3 -3
  43. package/lib/assets/img/svg/positioning.svg +3 -3
  44. package/lib/assets/img/svg/toggleFilters.svg +19 -19
  45. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  46. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -87
  47. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -95
  48. package/lib/class/vertex.js +7 -1
  49. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  50. package/lib/events/external/handlers.syncScene.js +34 -0
  51. package/lib/mappings/external-events/mapExternalEventPayload.js +4 -4
  52. package/lib/mappings/external-events/mappers/addItemMapper.js +9 -9
  53. package/lib/shared/domain/asset/sanitize-asset-url.js +5 -5
  54. package/lib/shared/math/line-metrics.js +40 -0
  55. package/lib/utils/helper.js +2 -5
  56. package/lib/utils/skinPanelEngine.js +14 -14
  57. package/package.json +1 -1
@@ -7,11 +7,11 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
7
7
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
10
- /*!
11
- * camera-controls
12
- * https://github.com/yomotsu/camera-controls
13
- * (c) 2017 @yomotsu
14
- * Released under the MIT License.
10
+ /*!
11
+ * camera-controls
12
+ * https://github.com/yomotsu/camera-controls
13
+ * (c) 2017 @yomotsu
14
+ * Released under the MIT License.
15
15
  */
16
16
  // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#value
17
17
  var MOUSE_BUTTON = {
@@ -182,11 +182,11 @@ var EventDispatcher = /*#__PURE__*/function () {
182
182
  _classCallCheck(this, EventDispatcher);
183
183
  this._listeners = {};
184
184
  }
185
- /**
186
- * Adds the specified event listener.
187
- * @param type event name
188
- * @param listener handler function
189
- * @category Methods
185
+ /**
186
+ * Adds the specified event listener.
187
+ * @param type event name
188
+ * @param listener handler function
189
+ * @category Methods
190
190
  */
191
191
  return _createClass(EventDispatcher, [{
192
192
  key: "addEventListener",
@@ -195,11 +195,11 @@ var EventDispatcher = /*#__PURE__*/function () {
195
195
  if (listeners[type] === undefined) listeners[type] = [];
196
196
  if (listeners[type].indexOf(listener) === -1) listeners[type].push(listener);
197
197
  }
198
- /**
199
- * Presence of the specified event listener.
200
- * @param type event name
201
- * @param listener handler function
202
- * @category Methods
198
+ /**
199
+ * Presence of the specified event listener.
200
+ * @param type event name
201
+ * @param listener handler function
202
+ * @category Methods
203
203
  */
204
204
  }, {
205
205
  key: "hasEventListener",
@@ -207,11 +207,11 @@ var EventDispatcher = /*#__PURE__*/function () {
207
207
  var listeners = this._listeners;
208
208
  return listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;
209
209
  }
210
- /**
211
- * Removes the specified event listener
212
- * @param type event name
213
- * @param listener handler function
214
- * @category Methods
210
+ /**
211
+ * Removes the specified event listener
212
+ * @param type event name
213
+ * @param listener handler function
214
+ * @category Methods
215
215
  */
216
216
  }, {
217
217
  key: "removeEventListener",
@@ -223,10 +223,10 @@ var EventDispatcher = /*#__PURE__*/function () {
223
223
  if (index !== -1) listenerArray.splice(index, 1);
224
224
  }
225
225
  }
226
- /**
227
- * Removes all event listeners
228
- * @param type event name
229
- * @category Methods
226
+ /**
227
+ * Removes all event listeners
228
+ * @param type event name
229
+ * @category Methods
230
230
  */
231
231
  }, {
232
232
  key: "removeAllEventListeners",
@@ -237,10 +237,10 @@ var EventDispatcher = /*#__PURE__*/function () {
237
237
  }
238
238
  if (Array.isArray(this._listeners[type])) this._listeners[type].length = 0;
239
239
  }
240
- /**
241
- * Fire an event type.
242
- * @param event DispatcherEvent
243
- * @category Methods
240
+ /**
241
+ * Fire an event type.
242
+ * @param event DispatcherEvent
243
+ * @category Methods
244
244
  */
245
245
  }, {
246
246
  key: "dispatchEvent",
@@ -285,177 +285,177 @@ var _quaternionB;
285
285
  var _rotationMatrix;
286
286
  var _raycaster;
287
287
  var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
288
- /**
289
- * Creates a `CameraControls` instance.
290
- *
291
- * Note:
292
- * You **must install** three.js before using camera-controls. see [#install](#install)
293
- * Not doing so will lead to runtime errors (`undefined` references to THREE).
294
- *
295
- * e.g.
296
- * ```
297
- * CameraControls.install( { THREE } );
298
- * const cameraControls = new CameraControls( camera, domElement );
299
- * ```
300
- *
301
- * @param camera A `THREE.PerspectiveCamera` or `THREE.OrthographicCamera` to be controlled.
302
- * @param domElement A `HTMLElement` for the draggable area, usually `renderer.domElement`.
303
- * @category Constructor
288
+ /**
289
+ * Creates a `CameraControls` instance.
290
+ *
291
+ * Note:
292
+ * You **must install** three.js before using camera-controls. see [#install](#install)
293
+ * Not doing so will lead to runtime errors (`undefined` references to THREE).
294
+ *
295
+ * e.g.
296
+ * ```
297
+ * CameraControls.install( { THREE } );
298
+ * const cameraControls = new CameraControls( camera, domElement );
299
+ * ```
300
+ *
301
+ * @param camera A `THREE.PerspectiveCamera` or `THREE.OrthographicCamera` to be controlled.
302
+ * @param domElement A `HTMLElement` for the draggable area, usually `renderer.domElement`.
303
+ * @category Constructor
304
304
  */
305
305
  function CameraControls(camera, domElement) {
306
306
  var _this;
307
307
  _classCallCheck(this, CameraControls);
308
308
  _this = _callSuper(this, CameraControls);
309
- /**
310
- * Minimum vertical angle in radians.
311
- * The angle has to be between `0` and `.maxPolarAngle` inclusive.
312
- * The default value is `0`.
313
- *
314
- * e.g.
315
- * ```
316
- * cameraControls.maxPolarAngle = 0;
317
- * ```
318
- * @category Properties
309
+ /**
310
+ * Minimum vertical angle in radians.
311
+ * The angle has to be between `0` and `.maxPolarAngle` inclusive.
312
+ * The default value is `0`.
313
+ *
314
+ * e.g.
315
+ * ```
316
+ * cameraControls.maxPolarAngle = 0;
317
+ * ```
318
+ * @category Properties
319
319
  */
320
320
  _this.minPolarAngle = 0; // radians
321
- /**
322
- * Maximum vertical angle in radians.
323
- * The angle has to be between `.maxPolarAngle` and `Math.PI` inclusive.
324
- * The default value is `Math.PI`.
325
- *
326
- * e.g.
327
- * ```
328
- * cameraControls.maxPolarAngle = Math.PI;
329
- * ```
330
- * @category Properties
321
+ /**
322
+ * Maximum vertical angle in radians.
323
+ * The angle has to be between `.maxPolarAngle` and `Math.PI` inclusive.
324
+ * The default value is `Math.PI`.
325
+ *
326
+ * e.g.
327
+ * ```
328
+ * cameraControls.maxPolarAngle = Math.PI;
329
+ * ```
330
+ * @category Properties
331
331
  */
332
332
  _this.maxPolarAngle = Math.PI; // radians
333
- /**
334
- * Minimum horizontal angle in radians.
335
- * The angle has to be less than `.maxAzimuthAngle`.
336
- * The default value is `- Infinity`.
337
- *
338
- * e.g.
339
- * ```
340
- * cameraControls.minAzimuthAngle = - Infinity;
341
- * ```
342
- * @category Properties
333
+ /**
334
+ * Minimum horizontal angle in radians.
335
+ * The angle has to be less than `.maxAzimuthAngle`.
336
+ * The default value is `- Infinity`.
337
+ *
338
+ * e.g.
339
+ * ```
340
+ * cameraControls.minAzimuthAngle = - Infinity;
341
+ * ```
342
+ * @category Properties
343
343
  */
344
344
  _this.minAzimuthAngle = -Infinity; // radians
345
- /**
346
- * Maximum horizontal angle in radians.
347
- * The angle has to be greater than `.minAzimuthAngle`.
348
- * The default value is `Infinity`.
349
- *
350
- * e.g.
351
- * ```
352
- * cameraControls.maxAzimuthAngle = Infinity;
353
- * ```
354
- * @category Properties
345
+ /**
346
+ * Maximum horizontal angle in radians.
347
+ * The angle has to be greater than `.minAzimuthAngle`.
348
+ * The default value is `Infinity`.
349
+ *
350
+ * e.g.
351
+ * ```
352
+ * cameraControls.maxAzimuthAngle = Infinity;
353
+ * ```
354
+ * @category Properties
355
355
  */
356
356
  _this.maxAzimuthAngle = Infinity; // radians
357
357
  // How far you can dolly in and out ( PerspectiveCamera only )
358
- /**
359
- * Minimum distance for dolly. The value must be higher than `0`. Default is `Number.EPSILON`.
360
- * PerspectiveCamera only.
361
- * @category Properties
358
+ /**
359
+ * Minimum distance for dolly. The value must be higher than `0`. Default is `Number.EPSILON`.
360
+ * PerspectiveCamera only.
361
+ * @category Properties
362
362
  */
363
363
  _this.minDistance = Number.EPSILON;
364
- /**
365
- * Maximum distance for dolly. The value must be higher than `minDistance`. Default is `Infinity`.
366
- * PerspectiveCamera only.
367
- * @category Properties
364
+ /**
365
+ * Maximum distance for dolly. The value must be higher than `minDistance`. Default is `Infinity`.
366
+ * PerspectiveCamera only.
367
+ * @category Properties
368
368
  */
369
369
  _this.maxDistance = Infinity;
370
- /**
371
- * `true` to enable Infinity Dolly for wheel and pinch. Use this with `minDistance` and `maxDistance`
372
- * If the Dolly distance is less (or over) than the `minDistance` (or `maxDistance`), `infinityDolly` will keep the distance and pushes the target position instead.
373
- * @category Properties
370
+ /**
371
+ * `true` to enable Infinity Dolly for wheel and pinch. Use this with `minDistance` and `maxDistance`
372
+ * If the Dolly distance is less (or over) than the `minDistance` (or `maxDistance`), `infinityDolly` will keep the distance and pushes the target position instead.
373
+ * @category Properties
374
374
  */
375
375
  _this.infinityDolly = false;
376
- /**
377
- * Minimum camera zoom.
378
- * @category Properties
376
+ /**
377
+ * Minimum camera zoom.
378
+ * @category Properties
379
379
  */
380
380
  _this.minZoom = 0.01;
381
- /**
382
- * Maximum camera zoom.
383
- * @category Properties
381
+ /**
382
+ * Maximum camera zoom.
383
+ * @category Properties
384
384
  */
385
385
  _this.maxZoom = Infinity;
386
- /**
387
- * Approximate time in seconds to reach the target. A smaller value will reach the target faster.
388
- * @category Properties
386
+ /**
387
+ * Approximate time in seconds to reach the target. A smaller value will reach the target faster.
388
+ * @category Properties
389
389
  */
390
390
  _this.smoothTime = 0.25;
391
- /**
392
- * the smoothTime while dragging
393
- * @category Properties
391
+ /**
392
+ * the smoothTime while dragging
393
+ * @category Properties
394
394
  */
395
395
  _this.draggingSmoothTime = 0.125;
396
- /**
397
- * Max transition speed in unit-per-seconds
398
- * @category Properties
396
+ /**
397
+ * Max transition speed in unit-per-seconds
398
+ * @category Properties
399
399
  */
400
400
  _this.maxSpeed = Infinity;
401
- /**
402
- * Speed of azimuth (horizontal) rotation.
403
- * @category Properties
401
+ /**
402
+ * Speed of azimuth (horizontal) rotation.
403
+ * @category Properties
404
404
  */
405
405
  _this.azimuthRotateSpeed = 1.0;
406
- /**
407
- * Speed of polar (vertical) rotation.
408
- * @category Properties
406
+ /**
407
+ * Speed of polar (vertical) rotation.
408
+ * @category Properties
409
409
  */
410
410
  _this.polarRotateSpeed = 1.0;
411
- /**
412
- * Speed of mouse-wheel dollying.
413
- * @category Properties
411
+ /**
412
+ * Speed of mouse-wheel dollying.
413
+ * @category Properties
414
414
  */
415
415
  _this.dollySpeed = 1.0;
416
- /**
417
- * `true` to invert direction when dollying or zooming via drag
418
- * @category Properties
416
+ /**
417
+ * `true` to invert direction when dollying or zooming via drag
418
+ * @category Properties
419
419
  */
420
420
  _this.dollyDragInverted = false;
421
- /**
422
- * Speed of drag for truck and pedestal.
423
- * @category Properties
421
+ /**
422
+ * Speed of drag for truck and pedestal.
423
+ * @category Properties
424
424
  */
425
425
  _this.truckSpeed = 2.0;
426
- /**
427
- * `true` to enable Dolly-in to the mouse cursor coords.
428
- * @category Properties
426
+ /**
427
+ * `true` to enable Dolly-in to the mouse cursor coords.
428
+ * @category Properties
429
429
  */
430
430
  _this.dollyToCursor = false;
431
- /**
432
- * @category Properties
431
+ /**
432
+ * @category Properties
433
433
  */
434
434
  _this.dragToOffset = false;
435
- /**
436
- * The same as `.screenSpacePanning` in three.js's OrbitControls.
437
- * @category Properties
435
+ /**
436
+ * The same as `.screenSpacePanning` in three.js's OrbitControls.
437
+ * @category Properties
438
438
  */
439
439
  _this.verticalDragToForward = false;
440
- /**
441
- * Friction ratio of the boundary.
442
- * @category Properties
440
+ /**
441
+ * Friction ratio of the boundary.
442
+ * @category Properties
443
443
  */
444
444
  _this.boundaryFriction = 0.0;
445
- /**
446
- * Controls how soon the `rest` event fires as the camera slows.
447
- * @category Properties
445
+ /**
446
+ * Controls how soon the `rest` event fires as the camera slows.
447
+ * @category Properties
448
448
  */
449
449
  _this.restThreshold = 0.01;
450
- /**
451
- * An array of Meshes to collide with camera.
452
- * Be aware colliderMeshes may decrease performance. The collision test uses 4 raycasters from the camera since the near plane has 4 corners.
453
- * @category Properties
450
+ /**
451
+ * An array of Meshes to collide with camera.
452
+ * Be aware colliderMeshes may decrease performance. The collision test uses 4 raycasters from the camera since the near plane has 4 corners.
453
+ * @category Properties
454
454
  */
455
455
  _this.colliderMeshes = [];
456
- /**
457
- * Force cancel user dragging.
458
- * @category Methods
456
+ /**
457
+ * Force cancel user dragging.
458
+ * @category Methods
459
459
  */
460
460
  // cancel will be overwritten in the constructor.
461
461
  _this.cancel = function () {};
@@ -1014,9 +1014,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1014
1014
  _this.update(0);
1015
1015
  return _this;
1016
1016
  }
1017
- /**
1018
- * The camera to be controlled
1019
- * @category Properties
1017
+ /**
1018
+ * The camera to be controlled
1019
+ * @category Properties
1020
1020
  */
1021
1021
  _inherits(CameraControls, _EventDispatcher);
1022
1022
  return _createClass(CameraControls, [{
@@ -1031,10 +1031,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1031
1031
  this._updateNearPlaneCorners();
1032
1032
  this._needsUpdate = true;
1033
1033
  }
1034
- /**
1035
- * Whether or not the controls are enabled.
1036
- * `false` to disable user dragging/touch-move, but all methods works.
1037
- * @category Properties
1034
+ /**
1035
+ * Whether or not the controls are enabled.
1036
+ * `false` to disable user dragging/touch-move, but all methods works.
1037
+ * @category Properties
1038
1038
  */
1039
1039
  }, {
1040
1040
  key: "enabled",
@@ -1055,29 +1055,29 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1055
1055
  this._domElement.style.webkitUserSelect = '';
1056
1056
  }
1057
1057
  }
1058
- /**
1059
- * Returns `true` if the controls are active updating.
1060
- * readonly value.
1061
- * @category Properties
1058
+ /**
1059
+ * Returns `true` if the controls are active updating.
1060
+ * readonly value.
1061
+ * @category Properties
1062
1062
  */
1063
1063
  }, {
1064
1064
  key: "active",
1065
1065
  get: function get() {
1066
1066
  return !this._hasRested;
1067
1067
  }
1068
- /**
1069
- * Getter for the current `ACTION`.
1070
- * readonly value.
1071
- * @category Properties
1068
+ /**
1069
+ * Getter for the current `ACTION`.
1070
+ * readonly value.
1071
+ * @category Properties
1072
1072
  */
1073
1073
  }, {
1074
1074
  key: "currentAction",
1075
1075
  get: function get() {
1076
1076
  return this._state;
1077
1077
  }
1078
- /**
1079
- * get/set Current distance.
1080
- * @category Properties
1078
+ /**
1079
+ * get/set Current distance.
1080
+ * @category Properties
1081
1081
  */
1082
1082
  }, {
1083
1083
  key: "distance",
@@ -1091,10 +1091,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1091
1091
  this._needsUpdate = true;
1092
1092
  }
1093
1093
  // horizontal angle
1094
- /**
1095
- * get/set the azimuth angle (horizontal) in radians.
1096
- * Every 360 degrees turn is added to `.azimuthAngle` value, which is accumulative.
1097
- * @category Properties
1094
+ /**
1095
+ * get/set the azimuth angle (horizontal) in radians.
1096
+ * Every 360 degrees turn is added to `.azimuthAngle` value, which is accumulative.
1097
+ * @category Properties
1098
1098
  */
1099
1099
  }, {
1100
1100
  key: "azimuthAngle",
@@ -1108,9 +1108,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1108
1108
  this._needsUpdate = true;
1109
1109
  }
1110
1110
  // vertical angle
1111
- /**
1112
- * get/set the polar angle (vertical) in radians.
1113
- * @category Properties
1111
+ /**
1112
+ * get/set the polar angle (vertical) in radians.
1113
+ * @category Properties
1114
1114
  */
1115
1115
  }, {
1116
1116
  key: "polarAngle",
@@ -1123,9 +1123,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1123
1123
  this._sphericalEnd.phi = polarAngle;
1124
1124
  this._needsUpdate = true;
1125
1125
  }
1126
- /**
1127
- * Whether camera position should be enclosed in the boundary or not.
1128
- * @category Properties
1126
+ /**
1127
+ * Whether camera position should be enclosed in the boundary or not.
1128
+ * @category Properties
1129
1129
  */
1130
1130
  }, {
1131
1131
  key: "boundaryEnclosesCamera",
@@ -1136,11 +1136,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1136
1136
  this._boundaryEnclosesCamera = boundaryEnclosesCamera;
1137
1137
  this._needsUpdate = true;
1138
1138
  }
1139
- /**
1140
- * Set drag-start, touches and wheel enable area in the domElement.
1141
- * each values are between `0` and `1` inclusive, where `0` is left/top and `1` is right/bottom of the screen.
1142
- * e.g. `{ x: 0, y: 0, width: 1, height: 1 }` for entire area.
1143
- * @category Properties
1139
+ /**
1140
+ * Set drag-start, touches and wheel enable area in the domElement.
1141
+ * each values are between `0` and `1` inclusive, where `0` is left/top and `1` is right/bottom of the screen.
1142
+ * e.g. `{ x: 0, y: 0, width: 1, height: 1 }` for entire area.
1143
+ * @category Properties
1144
1144
  */
1145
1145
  }, {
1146
1146
  key: "interactiveArea",
@@ -1150,58 +1150,58 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1150
1150
  this._interactiveArea.x = clamp(interactiveArea.x, 0, 1 - this._interactiveArea.width);
1151
1151
  this._interactiveArea.y = clamp(interactiveArea.y, 0, 1 - this._interactiveArea.height);
1152
1152
  }
1153
- /**
1154
- * Adds the specified event listener.
1155
- * Applicable event types (which is `K`) are:
1156
- * | Event name | Timing |
1157
- * | ------------------- | ------ |
1158
- * | `'controlstart'` | When the user starts to control the camera via mouse / touches. ¹ |
1159
- * | `'control'` | When the user controls the camera (dragging). |
1160
- * | `'controlend'` | When the user ends to control the camera. ¹ |
1161
- * | `'transitionstart'` | When any kind of transition starts, either user control or using a method with `enableTransition = true` |
1162
- * | `'update'` | When the camera position is updated. |
1163
- * | `'wake'` | When the camera starts moving. |
1164
- * | `'rest'` | When the camera movement is below `.restThreshold` ². |
1165
- * | `'sleep'` | When the camera end moving. |
1166
- *
1167
- * 1. `mouseButtons.wheel` (Mouse wheel control) does not emit `'controlstart'` and `'controlend'`. `mouseButtons.wheel` uses scroll-event internally, and scroll-event happens intermittently. That means "start" and "end" cannot be detected.
1168
- * 2. Due to damping, `sleep` will usually fire a few seconds after the camera _appears_ to have stopped moving. If you want to do something (e.g. enable UI, perform another transition) at the point when the camera has stopped, you probably want the `rest` event. This can be fine tuned using the `.restThreshold` parameter. See the [Rest and Sleep Example](https://yomotsu.github.io/camera-controls/examples/rest-and-sleep.html).
1169
- *
1170
- * e.g.
1171
- * ```
1172
- * cameraControl.addEventListener( 'controlstart', myCallbackFunction );
1173
- * ```
1174
- * @param type event name
1175
- * @param listener handler function
1176
- * @category Methods
1153
+ /**
1154
+ * Adds the specified event listener.
1155
+ * Applicable event types (which is `K`) are:
1156
+ * | Event name | Timing |
1157
+ * | ------------------- | ------ |
1158
+ * | `'controlstart'` | When the user starts to control the camera via mouse / touches. ¹ |
1159
+ * | `'control'` | When the user controls the camera (dragging). |
1160
+ * | `'controlend'` | When the user ends to control the camera. ¹ |
1161
+ * | `'transitionstart'` | When any kind of transition starts, either user control or using a method with `enableTransition = true` |
1162
+ * | `'update'` | When the camera position is updated. |
1163
+ * | `'wake'` | When the camera starts moving. |
1164
+ * | `'rest'` | When the camera movement is below `.restThreshold` ². |
1165
+ * | `'sleep'` | When the camera end moving. |
1166
+ *
1167
+ * 1. `mouseButtons.wheel` (Mouse wheel control) does not emit `'controlstart'` and `'controlend'`. `mouseButtons.wheel` uses scroll-event internally, and scroll-event happens intermittently. That means "start" and "end" cannot be detected.
1168
+ * 2. Due to damping, `sleep` will usually fire a few seconds after the camera _appears_ to have stopped moving. If you want to do something (e.g. enable UI, perform another transition) at the point when the camera has stopped, you probably want the `rest` event. This can be fine tuned using the `.restThreshold` parameter. See the [Rest and Sleep Example](https://yomotsu.github.io/camera-controls/examples/rest-and-sleep.html).
1169
+ *
1170
+ * e.g.
1171
+ * ```
1172
+ * cameraControl.addEventListener( 'controlstart', myCallbackFunction );
1173
+ * ```
1174
+ * @param type event name
1175
+ * @param listener handler function
1176
+ * @category Methods
1177
1177
  */
1178
1178
  }, {
1179
1179
  key: "addEventListener",
1180
1180
  value: function addEventListener(type, listener) {
1181
1181
  _superPropGet(CameraControls, "addEventListener", this, 3)([type, listener]);
1182
1182
  }
1183
- /**
1184
- * Removes the specified event listener
1185
- * e.g.
1186
- * ```
1187
- * cameraControl.addEventListener( 'controlstart', myCallbackFunction );
1188
- * ```
1189
- * @param type event name
1190
- * @param listener handler function
1191
- * @category Methods
1183
+ /**
1184
+ * Removes the specified event listener
1185
+ * e.g.
1186
+ * ```
1187
+ * cameraControl.addEventListener( 'controlstart', myCallbackFunction );
1188
+ * ```
1189
+ * @param type event name
1190
+ * @param listener handler function
1191
+ * @category Methods
1192
1192
  */
1193
1193
  }, {
1194
1194
  key: "removeEventListener",
1195
1195
  value: function removeEventListener(type, listener) {
1196
1196
  _superPropGet(CameraControls, "removeEventListener", this, 3)([type, listener]);
1197
1197
  }
1198
- /**
1199
- * Rotate azimuthal angle(horizontal) and polar angle(vertical).
1200
- * Every value is added to the current value.
1201
- * @param azimuthAngle Azimuth rotate angle. In radian.
1202
- * @param polarAngle Polar rotate angle. In radian.
1203
- * @param enableTransition Whether to move smoothly or immediately
1204
- * @category Methods
1198
+ /**
1199
+ * Rotate azimuthal angle(horizontal) and polar angle(vertical).
1200
+ * Every value is added to the current value.
1201
+ * @param azimuthAngle Azimuth rotate angle. In radian.
1202
+ * @param polarAngle Polar rotate angle. In radian.
1203
+ * @param enableTransition Whether to move smoothly or immediately
1204
+ * @category Methods
1205
1205
  */
1206
1206
  }, {
1207
1207
  key: "rotate",
@@ -1209,16 +1209,16 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1209
1209
  var enableTransition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1210
1210
  return this.rotateTo(this._sphericalEnd.theta + azimuthAngle, this._sphericalEnd.phi + polarAngle, enableTransition);
1211
1211
  }
1212
- /**
1213
- * Rotate azimuthal angle(horizontal) to the given angle and keep the same polar angle(vertical) target.
1214
- *
1215
- * e.g.
1216
- * ```
1217
- * cameraControls.rotateAzimuthTo( 30 * THREE.MathUtils.DEG2RAD, true );
1218
- * ```
1219
- * @param azimuthAngle Azimuth rotate angle. In radian.
1220
- * @param enableTransition Whether to move smoothly or immediately
1221
- * @category Methods
1212
+ /**
1213
+ * Rotate azimuthal angle(horizontal) to the given angle and keep the same polar angle(vertical) target.
1214
+ *
1215
+ * e.g.
1216
+ * ```
1217
+ * cameraControls.rotateAzimuthTo( 30 * THREE.MathUtils.DEG2RAD, true );
1218
+ * ```
1219
+ * @param azimuthAngle Azimuth rotate angle. In radian.
1220
+ * @param enableTransition Whether to move smoothly or immediately
1221
+ * @category Methods
1222
1222
  */
1223
1223
  }, {
1224
1224
  key: "rotateAzimuthTo",
@@ -1226,16 +1226,16 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1226
1226
  var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1227
1227
  return this.rotateTo(azimuthAngle, this._sphericalEnd.phi, enableTransition);
1228
1228
  }
1229
- /**
1230
- * Rotate polar angle(vertical) to the given angle and keep the same azimuthal angle(horizontal) target.
1231
- *
1232
- * e.g.
1233
- * ```
1234
- * cameraControls.rotatePolarTo( 30 * THREE.MathUtils.DEG2RAD, true );
1235
- * ```
1236
- * @param polarAngle Polar rotate angle. In radian.
1237
- * @param enableTransition Whether to move smoothly or immediately
1238
- * @category Methods
1229
+ /**
1230
+ * Rotate polar angle(vertical) to the given angle and keep the same azimuthal angle(horizontal) target.
1231
+ *
1232
+ * e.g.
1233
+ * ```
1234
+ * cameraControls.rotatePolarTo( 30 * THREE.MathUtils.DEG2RAD, true );
1235
+ * ```
1236
+ * @param polarAngle Polar rotate angle. In radian.
1237
+ * @param enableTransition Whether to move smoothly or immediately
1238
+ * @category Methods
1239
1239
  */
1240
1240
  }, {
1241
1241
  key: "rotatePolarTo",
@@ -1243,43 +1243,43 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1243
1243
  var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1244
1244
  return this.rotateTo(this._sphericalEnd.theta, polarAngle, enableTransition);
1245
1245
  }
1246
- /**
1247
- * Rotate azimuthal angle(horizontal) and polar angle(vertical) to the given angle.
1248
- * Camera view will rotate over the orbit pivot absolutely:
1249
- *
1250
- * azimuthAngle
1251
- * ```
1252
- * 0º
1253
- * \
1254
- * 90º -----+----- -90º
1255
- * \
1256
- * 180º
1257
- * ```
1258
- * | direction | angle |
1259
- * | --------- | ---------------------- |
1260
- * | front | 0º |
1261
- * | left | 90º (`Math.PI / 2`) |
1262
- * | right | -90º (`- Math.PI / 2`) |
1263
- * | back | 180º (`Math.PI`) |
1264
- *
1265
- * polarAngle
1266
- * ```
1267
- * 180º
1268
- * |
1269
- * 90º
1270
- * |
1271
- * 0º
1272
- * ```
1273
- * | direction | angle |
1274
- * | -------------------- | ---------------------- |
1275
- * | top/sky | 180º (`Math.PI`) |
1276
- * | horizontal from view | 90º (`Math.PI / 2`) |
1277
- * | bottom/floor | 0º |
1278
- *
1279
- * @param azimuthAngle Azimuth rotate angle to. In radian.
1280
- * @param polarAngle Polar rotate angle to. In radian.
1281
- * @param enableTransition Whether to move smoothly or immediately
1282
- * @category Methods
1246
+ /**
1247
+ * Rotate azimuthal angle(horizontal) and polar angle(vertical) to the given angle.
1248
+ * Camera view will rotate over the orbit pivot absolutely:
1249
+ *
1250
+ * azimuthAngle
1251
+ * ```
1252
+ * 0º
1253
+ * \
1254
+ * 90º -----+----- -90º
1255
+ * \
1256
+ * 180º
1257
+ * ```
1258
+ * | direction | angle |
1259
+ * | --------- | ---------------------- |
1260
+ * | front | 0º |
1261
+ * | left | 90º (`Math.PI / 2`) |
1262
+ * | right | -90º (`- Math.PI / 2`) |
1263
+ * | back | 180º (`Math.PI`) |
1264
+ *
1265
+ * polarAngle
1266
+ * ```
1267
+ * 180º
1268
+ * |
1269
+ * 90º
1270
+ * |
1271
+ * 0º
1272
+ * ```
1273
+ * | direction | angle |
1274
+ * | -------------------- | ---------------------- |
1275
+ * | top/sky | 180º (`Math.PI`) |
1276
+ * | horizontal from view | 90º (`Math.PI / 2`) |
1277
+ * | bottom/floor | 0º |
1278
+ *
1279
+ * @param azimuthAngle Azimuth rotate angle to. In radian.
1280
+ * @param polarAngle Polar rotate angle to. In radian.
1281
+ * @param enableTransition Whether to move smoothly or immediately
1282
+ * @category Methods
1283
1283
  */
1284
1284
  }, {
1285
1285
  key: "rotateTo",
@@ -1299,11 +1299,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1299
1299
  var resolveImmediately = !enableTransition || approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold);
1300
1300
  return this._createOnRestPromise(resolveImmediately);
1301
1301
  }
1302
- /**
1303
- * Dolly in/out camera position.
1304
- * @param distance Distance of dollyIn. Negative number for dollyOut.
1305
- * @param enableTransition Whether to move smoothly or immediately.
1306
- * @category Methods
1302
+ /**
1303
+ * Dolly in/out camera position.
1304
+ * @param distance Distance of dollyIn. Negative number for dollyOut.
1305
+ * @param enableTransition Whether to move smoothly or immediately.
1306
+ * @category Methods
1307
1307
  */
1308
1308
  }, {
1309
1309
  key: "dolly",
@@ -1311,11 +1311,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1311
1311
  var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1312
1312
  return this.dollyTo(this._sphericalEnd.radius - distance, enableTransition);
1313
1313
  }
1314
- /**
1315
- * Dolly in/out camera position to given distance.
1316
- * @param distance Distance of dolly.
1317
- * @param enableTransition Whether to move smoothly or immediately.
1318
- * @category Methods
1314
+ /**
1315
+ * Dolly in/out camera position to given distance.
1316
+ * @param distance Distance of dolly.
1317
+ * @param enableTransition Whether to move smoothly or immediately.
1318
+ * @category Methods
1319
1319
  */
1320
1320
  }, {
1321
1321
  key: "dollyTo",
@@ -1348,12 +1348,12 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1348
1348
  var resolveImmediately = !enableTransition || approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
1349
1349
  return this._createOnRestPromise(resolveImmediately);
1350
1350
  }
1351
- /**
1352
- * Dolly in, but does not change the distance between the target and the camera, and moves the target position instead.
1353
- * Specify a negative value for dolly out.
1354
- * @param distance Distance of dolly.
1355
- * @param enableTransition Whether to move smoothly or immediately.
1356
- * @category Methods
1351
+ /**
1352
+ * Dolly in, but does not change the distance between the target and the camera, and moves the target position instead.
1353
+ * Specify a negative value for dolly out.
1354
+ * @param distance Distance of dolly.
1355
+ * @param enableTransition Whether to move smoothly or immediately.
1356
+ * @category Methods
1357
1357
  */
1358
1358
  }, {
1359
1359
  key: "dollyInFixed",
@@ -1366,12 +1366,12 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1366
1366
  var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold);
1367
1367
  return this._createOnRestPromise(resolveImmediately);
1368
1368
  }
1369
- /**
1370
- * Zoom in/out camera. The value is added to camera zoom.
1371
- * Limits set with `.minZoom` and `.maxZoom`
1372
- * @param zoomStep zoom scale
1373
- * @param enableTransition Whether to move smoothly or immediately
1374
- * @category Methods
1369
+ /**
1370
+ * Zoom in/out camera. The value is added to camera zoom.
1371
+ * Limits set with `.minZoom` and `.maxZoom`
1372
+ * @param zoomStep zoom scale
1373
+ * @param enableTransition Whether to move smoothly or immediately
1374
+ * @category Methods
1375
1375
  */
1376
1376
  }, {
1377
1377
  key: "zoom",
@@ -1379,12 +1379,12 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1379
1379
  var enableTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1380
1380
  return this.zoomTo(this._zoomEnd + zoomStep, enableTransition);
1381
1381
  }
1382
- /**
1383
- * Zoom in/out camera to given scale. The value overwrites camera zoom.
1384
- * Limits set with .minZoom and .maxZoom
1385
- * @param zoom
1386
- * @param enableTransition
1387
- * @category Methods
1382
+ /**
1383
+ * Zoom in/out camera to given scale. The value overwrites camera zoom.
1384
+ * Limits set with .minZoom and .maxZoom
1385
+ * @param zoom
1386
+ * @param enableTransition
1387
+ * @category Methods
1388
1388
  */
1389
1389
  }, {
1390
1390
  key: "zoomTo",
@@ -1400,9 +1400,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1400
1400
  this._changedZoom = 0;
1401
1401
  return this._createOnRestPromise(resolveImmediately);
1402
1402
  }
1403
- /**
1404
- * @deprecated `pan()` has been renamed to `truck()`
1405
- * @category Methods
1403
+ /**
1404
+ * @deprecated `pan()` has been renamed to `truck()`
1405
+ * @category Methods
1406
1406
  */
1407
1407
  }, {
1408
1408
  key: "pan",
@@ -1411,12 +1411,12 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1411
1411
  console.warn('`pan` has been renamed to `truck`');
1412
1412
  return this.truck(x, y, enableTransition);
1413
1413
  }
1414
- /**
1415
- * Truck and pedestal camera using current azimuthal angle
1416
- * @param x Horizontal translate amount
1417
- * @param y Vertical translate amount
1418
- * @param enableTransition Whether to move smoothly or immediately
1419
- * @category Methods
1414
+ /**
1415
+ * Truck and pedestal camera using current azimuthal angle
1416
+ * @param x Horizontal translate amount
1417
+ * @param y Vertical translate amount
1418
+ * @param enableTransition Whether to move smoothly or immediately
1419
+ * @category Methods
1420
1420
  */
1421
1421
  }, {
1422
1422
  key: "truck",
@@ -1431,11 +1431,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1431
1431
  var to = _v3B.copy(this._targetEnd).add(offset);
1432
1432
  return this.moveTo(to.x, to.y, to.z, enableTransition);
1433
1433
  }
1434
- /**
1435
- * Move forward / backward.
1436
- * @param distance Amount to move forward / backward. Negative value to move backward
1437
- * @param enableTransition Whether to move smoothly or immediately
1438
- * @category Methods
1434
+ /**
1435
+ * Move forward / backward.
1436
+ * @param distance Amount to move forward / backward. Negative value to move backward
1437
+ * @param enableTransition Whether to move smoothly or immediately
1438
+ * @category Methods
1439
1439
  */
1440
1440
  }, {
1441
1441
  key: "forward",
@@ -1447,11 +1447,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1447
1447
  var to = _v3B.copy(this._targetEnd).add(_v3A);
1448
1448
  return this.moveTo(to.x, to.y, to.z, enableTransition);
1449
1449
  }
1450
- /**
1451
- * Move up / down.
1452
- * @param height Amount to move up / down. Negative value to move down
1453
- * @param enableTransition Whether to move smoothly or immediately
1454
- * @category Methods
1450
+ /**
1451
+ * Move up / down.
1452
+ * @param height Amount to move up / down. Negative value to move down
1453
+ * @param enableTransition Whether to move smoothly or immediately
1454
+ * @category Methods
1455
1455
  */
1456
1456
  }, {
1457
1457
  key: "elevate",
@@ -1460,13 +1460,13 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1460
1460
  _v3A.copy(this._camera.up).multiplyScalar(height);
1461
1461
  return this.moveTo(this._targetEnd.x + _v3A.x, this._targetEnd.y + _v3A.y, this._targetEnd.z + _v3A.z, enableTransition);
1462
1462
  }
1463
- /**
1464
- * Move target position to given point.
1465
- * @param x x coord to move center position
1466
- * @param y y coord to move center position
1467
- * @param z z coord to move center position
1468
- * @param enableTransition Whether to move smoothly or immediately
1469
- * @category Methods
1463
+ /**
1464
+ * Move target position to given point.
1465
+ * @param x x coord to move center position
1466
+ * @param y y coord to move center position
1467
+ * @param z z coord to move center position
1468
+ * @param enableTransition Whether to move smoothly or immediately
1469
+ * @category Methods
1470
1470
  */
1471
1471
  }, {
1472
1472
  key: "moveTo",
@@ -1482,14 +1482,14 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1482
1482
  var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold);
1483
1483
  return this._createOnRestPromise(resolveImmediately);
1484
1484
  }
1485
- /**
1486
- * Look in the given point direction.
1487
- * @param x point x.
1488
- * @param y point y.
1489
- * @param z point z.
1490
- * @param enableTransition Whether to move smoothly or immediately.
1491
- * @returns Transition end promise
1492
- * @category Methods
1485
+ /**
1486
+ * Look in the given point direction.
1487
+ * @param x point x.
1488
+ * @param y point y.
1489
+ * @param z point z.
1490
+ * @param enableTransition Whether to move smoothly or immediately.
1491
+ * @returns Transition end promise
1492
+ * @category Methods
1493
1493
  */
1494
1494
  }, {
1495
1495
  key: "lookInDirectionOf",
@@ -1500,18 +1500,18 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1500
1500
  var position = direction.multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);
1501
1501
  return this.setPosition(position.x, position.y, position.z, enableTransition);
1502
1502
  }
1503
- /**
1504
- * Fit the viewport to the box or the bounding box of the object, using the nearest axis. paddings are in unit.
1505
- * set `cover: true` to fill enter screen.
1506
- * e.g.
1507
- * ```
1508
- * cameraControls.fitToBox( myMesh );
1509
- * ```
1510
- * @param box3OrObject Axis aligned bounding box to fit the view.
1511
- * @param enableTransition Whether to move smoothly or immediately.
1512
- * @param options | `<object>` { cover: boolean, paddingTop: number, paddingLeft: number, paddingBottom: number, paddingRight: number }
1513
- * @returns Transition end promise
1514
- * @category Methods
1503
+ /**
1504
+ * Fit the viewport to the box or the bounding box of the object, using the nearest axis. paddings are in unit.
1505
+ * set `cover: true` to fill enter screen.
1506
+ * e.g.
1507
+ * ```
1508
+ * cameraControls.fitToBox( myMesh );
1509
+ * ```
1510
+ * @param box3OrObject Axis aligned bounding box to fit the view.
1511
+ * @param enableTransition Whether to move smoothly or immediately.
1512
+ * @param options | `<object>` { cover: boolean, paddingTop: number, paddingLeft: number, paddingBottom: number, paddingRight: number }
1513
+ * @returns Transition end promise
1514
+ * @category Methods
1515
1515
  */
1516
1516
  }, {
1517
1517
  key: "fitToBox",
@@ -1598,11 +1598,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1598
1598
  }
1599
1599
  return Promise.all(promises);
1600
1600
  }
1601
- /**
1602
- * Fit the viewport to the sphere or the bounding sphere of the object.
1603
- * @param sphereOrMesh
1604
- * @param enableTransition
1605
- * @category Methods
1601
+ /**
1602
+ * Fit the viewport to the sphere or the bounding sphere of the object.
1603
+ * @param sphereOrMesh
1604
+ * @param enableTransition
1605
+ * @category Methods
1606
1606
  */
1607
1607
  }, {
1608
1608
  key: "fitToSphere",
@@ -1624,16 +1624,16 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1624
1624
  promises.push(this.setFocalOffset(0, 0, 0, enableTransition));
1625
1625
  return Promise.all(promises);
1626
1626
  }
1627
- /**
1628
- * Look at the `target` from the `position`.
1629
- * @param positionX
1630
- * @param positionY
1631
- * @param positionZ
1632
- * @param targetX
1633
- * @param targetY
1634
- * @param targetZ
1635
- * @param enableTransition
1636
- * @category Methods
1627
+ /**
1628
+ * Look at the `target` from the `position`.
1629
+ * @param positionX
1630
+ * @param positionY
1631
+ * @param positionZ
1632
+ * @param targetX
1633
+ * @param targetY
1634
+ * @param targetZ
1635
+ * @param enableTransition
1636
+ * @category Methods
1637
1637
  */
1638
1638
  }, {
1639
1639
  key: "setLookAt",
@@ -1657,23 +1657,23 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1657
1657
  var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold) && approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
1658
1658
  return this._createOnRestPromise(resolveImmediately);
1659
1659
  }
1660
- /**
1661
- * Similar to setLookAt, but it interpolates between two states.
1662
- * @param positionAX
1663
- * @param positionAY
1664
- * @param positionAZ
1665
- * @param targetAX
1666
- * @param targetAY
1667
- * @param targetAZ
1668
- * @param positionBX
1669
- * @param positionBY
1670
- * @param positionBZ
1671
- * @param targetBX
1672
- * @param targetBY
1673
- * @param targetBZ
1674
- * @param t
1675
- * @param enableTransition
1676
- * @category Methods
1660
+ /**
1661
+ * Similar to setLookAt, but it interpolates between two states.
1662
+ * @param positionAX
1663
+ * @param positionAY
1664
+ * @param positionAZ
1665
+ * @param targetAX
1666
+ * @param targetAY
1667
+ * @param targetAZ
1668
+ * @param positionBX
1669
+ * @param positionBY
1670
+ * @param positionBZ
1671
+ * @param targetBX
1672
+ * @param targetBY
1673
+ * @param targetBZ
1674
+ * @param t
1675
+ * @param enableTransition
1676
+ * @category Methods
1677
1677
  */
1678
1678
  }, {
1679
1679
  key: "lerpLookAt",
@@ -1704,14 +1704,14 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1704
1704
  var resolveImmediately = !enableTransition || approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && approxEquals(this._target.z, this._targetEnd.z, this.restThreshold) && approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
1705
1705
  return this._createOnRestPromise(resolveImmediately);
1706
1706
  }
1707
- /**
1708
- * Set angle and distance by given position.
1709
- * An alias of `setLookAt()`, without target change. Thus keep gazing at the current target
1710
- * @param positionX
1711
- * @param positionY
1712
- * @param positionZ
1713
- * @param enableTransition
1714
- * @category Methods
1707
+ /**
1708
+ * Set angle and distance by given position.
1709
+ * An alias of `setLookAt()`, without target change. Thus keep gazing at the current target
1710
+ * @param positionX
1711
+ * @param positionY
1712
+ * @param positionZ
1713
+ * @param enableTransition
1714
+ * @category Methods
1715
1715
  */
1716
1716
  }, {
1717
1717
  key: "setPosition",
@@ -1719,14 +1719,14 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1719
1719
  var enableTransition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1720
1720
  return this.setLookAt(positionX, positionY, positionZ, this._targetEnd.x, this._targetEnd.y, this._targetEnd.z, enableTransition);
1721
1721
  }
1722
- /**
1723
- * Set the target position where gaze at.
1724
- * An alias of `setLookAt()`, without position change. Thus keep the same position.
1725
- * @param targetX
1726
- * @param targetY
1727
- * @param targetZ
1728
- * @param enableTransition
1729
- * @category Methods
1722
+ /**
1723
+ * Set the target position where gaze at.
1724
+ * An alias of `setLookAt()`, without position change. Thus keep the same position.
1725
+ * @param targetX
1726
+ * @param targetY
1727
+ * @param targetZ
1728
+ * @param enableTransition
1729
+ * @category Methods
1730
1730
  */
1731
1731
  }, {
1732
1732
  key: "setTarget",
@@ -1738,13 +1738,13 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1738
1738
  this._sphericalEnd.phi = clamp(this._sphericalEnd.phi, this.minPolarAngle, this.maxPolarAngle);
1739
1739
  return promise;
1740
1740
  }
1741
- /**
1742
- * Set focal offset using the screen parallel coordinates. z doesn't affect in Orthographic as with Dolly.
1743
- * @param x
1744
- * @param y
1745
- * @param z
1746
- * @param enableTransition
1747
- * @category Methods
1741
+ /**
1742
+ * Set focal offset using the screen parallel coordinates. z doesn't affect in Orthographic as with Dolly.
1743
+ * @param x
1744
+ * @param y
1745
+ * @param z
1746
+ * @param enableTransition
1747
+ * @category Methods
1748
1748
  */
1749
1749
  }, {
1750
1750
  key: "setFocalOffset",
@@ -1757,13 +1757,13 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1757
1757
  var resolveImmediately = !enableTransition || approxEquals(this._focalOffset.x, this._focalOffsetEnd.x, this.restThreshold) && approxEquals(this._focalOffset.y, this._focalOffsetEnd.y, this.restThreshold) && approxEquals(this._focalOffset.z, this._focalOffsetEnd.z, this.restThreshold);
1758
1758
  return this._createOnRestPromise(resolveImmediately);
1759
1759
  }
1760
- /**
1761
- * Set orbit point without moving the camera.
1762
- * SHOULD NOT RUN DURING ANIMATIONS. `setOrbitPoint()` will immediately fix the positions.
1763
- * @param targetX
1764
- * @param targetY
1765
- * @param targetZ
1766
- * @category Methods
1760
+ /**
1761
+ * Set orbit point without moving the camera.
1762
+ * SHOULD NOT RUN DURING ANIMATIONS. `setOrbitPoint()` will immediately fix the positions.
1763
+ * @param targetX
1764
+ * @param targetY
1765
+ * @param targetZ
1766
+ * @category Methods
1767
1767
  */
1768
1768
  }, {
1769
1769
  key: "setOrbitPoint",
@@ -1784,10 +1784,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1784
1784
  this.setFocalOffset(-_v3A.x, _v3A.y, -_v3A.z, false);
1785
1785
  this.moveTo(targetX, targetY, targetZ, false);
1786
1786
  }
1787
- /**
1788
- * Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
1789
- * @param box3
1790
- * @category Methods
1787
+ /**
1788
+ * Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
1789
+ * @param box3
1790
+ * @category Methods
1791
1791
  */
1792
1792
  }, {
1793
1793
  key: "setBoundary",
@@ -1802,14 +1802,14 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1802
1802
  this._boundary.clampPoint(this._targetEnd, this._targetEnd);
1803
1803
  this._needsUpdate = true;
1804
1804
  }
1805
- /**
1806
- * Set (or unset) the current viewport.
1807
- * Set this when you want to use renderer viewport and .dollyToCursor feature at the same time.
1808
- * @param viewportOrX
1809
- * @param y
1810
- * @param width
1811
- * @param height
1812
- * @category Methods
1805
+ /**
1806
+ * Set (or unset) the current viewport.
1807
+ * Set this when you want to use renderer viewport and .dollyToCursor feature at the same time.
1808
+ * @param viewportOrX
1809
+ * @param y
1810
+ * @param width
1811
+ * @param height
1812
+ * @category Methods
1813
1813
  */
1814
1814
  }, {
1815
1815
  key: "setViewport",
@@ -1828,13 +1828,13 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1828
1828
  this._viewport.copy(viewportOrX);
1829
1829
  }
1830
1830
  }
1831
- /**
1832
- * Calculate the distance to fit the box.
1833
- * @param width box width
1834
- * @param height box height
1835
- * @param depth box depth
1836
- * @returns distance
1837
- * @category Methods
1831
+ /**
1832
+ * Calculate the distance to fit the box.
1833
+ * @param width box width
1834
+ * @param height box height
1835
+ * @param depth box depth
1836
+ * @returns distance
1837
+ * @category Methods
1838
1838
  */
1839
1839
  }, {
1840
1840
  key: "getDistanceToFitBox",
@@ -1847,11 +1847,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1847
1847
  var heightToFit = (cover ? boundingRectAspect > aspect : boundingRectAspect < aspect) ? height : width / aspect;
1848
1848
  return heightToFit * 0.5 / Math.tan(fov * 0.5) + depth * 0.5;
1849
1849
  }
1850
- /**
1851
- * Calculate the distance to fit the sphere.
1852
- * @param radius sphere radius
1853
- * @returns distance
1854
- * @category Methods
1850
+ /**
1851
+ * Calculate the distance to fit the sphere.
1852
+ * @param radius sphere radius
1853
+ * @returns distance
1854
+ * @category Methods
1855
1855
  */
1856
1856
  }, {
1857
1857
  key: "getDistanceToFitSphere",
@@ -1863,11 +1863,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1863
1863
  var fov = 1 < this._camera.aspect ? vFOV : hFOV;
1864
1864
  return radius / Math.sin(fov * 0.5);
1865
1865
  }
1866
- /**
1867
- * Returns the orbit center position, where the camera looking at.
1868
- * @param out The receiving Vector3 instance to copy the result
1869
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1870
- * @category Methods
1866
+ /**
1867
+ * Returns the orbit center position, where the camera looking at.
1868
+ * @param out The receiving Vector3 instance to copy the result
1869
+ * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1870
+ * @category Methods
1871
1871
  */
1872
1872
  }, {
1873
1873
  key: "getTarget",
@@ -1876,11 +1876,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1876
1876
  var _out = !!out && out.isVector3 ? out : new THREE.Vector3();
1877
1877
  return _out.copy(receiveEndValue ? this._targetEnd : this._target);
1878
1878
  }
1879
- /**
1880
- * Returns the camera position.
1881
- * @param out The receiving Vector3 instance to copy the result
1882
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1883
- * @category Methods
1879
+ /**
1880
+ * Returns the camera position.
1881
+ * @param out The receiving Vector3 instance to copy the result
1882
+ * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1883
+ * @category Methods
1884
1884
  */
1885
1885
  }, {
1886
1886
  key: "getPosition",
@@ -1889,11 +1889,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1889
1889
  var _out = !!out && out.isVector3 ? out : new THREE.Vector3();
1890
1890
  return _out.setFromSpherical(receiveEndValue ? this._sphericalEnd : this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(receiveEndValue ? this._targetEnd : this._target);
1891
1891
  }
1892
- /**
1893
- * Returns the spherical coordinates of the orbit.
1894
- * @param out The receiving Spherical instance to copy the result
1895
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1896
- * @category Methods
1892
+ /**
1893
+ * Returns the spherical coordinates of the orbit.
1894
+ * @param out The receiving Spherical instance to copy the result
1895
+ * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1896
+ * @category Methods
1897
1897
  */
1898
1898
  }, {
1899
1899
  key: "getSpherical",
@@ -1902,11 +1902,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1902
1902
  var _out = out || new THREE.Spherical();
1903
1903
  return _out.copy(receiveEndValue ? this._sphericalEnd : this._spherical);
1904
1904
  }
1905
- /**
1906
- * Returns the focal offset, which is how much the camera appears to be translated in screen parallel coordinates.
1907
- * @param out The receiving Vector3 instance to copy the result
1908
- * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1909
- * @category Methods
1905
+ /**
1906
+ * Returns the focal offset, which is how much the camera appears to be translated in screen parallel coordinates.
1907
+ * @param out The receiving Vector3 instance to copy the result
1908
+ * @param receiveEndValue Whether receive the transition end coords or current. default is `true`
1909
+ * @category Methods
1910
1910
  */
1911
1911
  }, {
1912
1912
  key: "getFocalOffset",
@@ -1915,9 +1915,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1915
1915
  var _out = !!out && out.isVector3 ? out : new THREE.Vector3();
1916
1916
  return _out.copy(receiveEndValue ? this._focalOffsetEnd : this._focalOffset);
1917
1917
  }
1918
- /**
1919
- * Normalize camera azimuth angle rotation between 0 and 360 degrees.
1920
- * @category Methods
1918
+ /**
1919
+ * Normalize camera azimuth angle rotation between 0 and 360 degrees.
1920
+ * @category Methods
1921
1921
  */
1922
1922
  }, {
1923
1923
  key: "normalizeRotations",
@@ -1926,10 +1926,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1926
1926
  if (this._sphericalEnd.theta < 0) this._sphericalEnd.theta += PI_2;
1927
1927
  this._spherical.theta += PI_2 * Math.round((this._sphericalEnd.theta - this._spherical.theta) / PI_2);
1928
1928
  }
1929
- /**
1930
- * Reset all rotation and position to defaults.
1931
- * @param enableTransition
1932
- * @category Methods
1929
+ /**
1930
+ * Reset all rotation and position to defaults.
1931
+ * @param enableTransition
1932
+ * @category Methods
1933
1933
  */
1934
1934
  }, {
1935
1935
  key: "reset",
@@ -1944,9 +1944,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1944
1944
  var promises = [this.setLookAt(this._position0.x, this._position0.y, this._position0.z, this._target0.x, this._target0.y, this._target0.z, enableTransition), this.setFocalOffset(this._focalOffset0.x, this._focalOffset0.y, this._focalOffset0.z, enableTransition), this.zoomTo(this._zoom0, enableTransition)];
1945
1945
  return Promise.all(promises);
1946
1946
  }
1947
- /**
1948
- * Set current camera position as the default position.
1949
- * @category Methods
1947
+ /**
1948
+ * Set current camera position as the default position.
1949
+ * @category Methods
1950
1950
  */
1951
1951
  }, {
1952
1952
  key: "saveState",
@@ -1957,10 +1957,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1957
1957
  this._zoom0 = this._zoom;
1958
1958
  this._focalOffset0.copy(this._focalOffset);
1959
1959
  }
1960
- /**
1961
- * Sync camera-up direction.
1962
- * When camera-up vector is changed, `.updateCameraUp()` must be called.
1963
- * @category Methods
1960
+ /**
1961
+ * Sync camera-up direction.
1962
+ * When camera-up vector is changed, `.updateCameraUp()` must be called.
1963
+ * @category Methods
1964
1964
  */
1965
1965
  }, {
1966
1966
  key: "updateCameraUp",
@@ -1968,10 +1968,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1968
1968
  this._yAxisUpSpace.setFromUnitVectors(this._camera.up, _AXIS_Y);
1969
1969
  this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
1970
1970
  }
1971
- /**
1972
- * Apply current camera-up direction to the camera.
1973
- * The orbit system will be re-initialized with the current position.
1974
- * @category Methods
1971
+ /**
1972
+ * Apply current camera-up direction to the camera.
1973
+ * The orbit system will be re-initialized with the current position.
1974
+ * @category Methods
1975
1975
  */
1976
1976
  }, {
1977
1977
  key: "applyCameraUp",
@@ -1988,12 +1988,12 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
1988
1988
  this.updateCameraUp();
1989
1989
  this.setPosition(position.x, position.y, position.z);
1990
1990
  }
1991
- /**
1992
- * Update camera position and directions.
1993
- * This should be called in your tick loop every time, and returns true if re-rendering is needed.
1994
- * @param delta
1995
- * @returns updated
1996
- * @category Methods
1991
+ /**
1992
+ * Update camera position and directions.
1993
+ * This should be called in your tick loop every time, and returns true if re-rendering is needed.
1994
+ * @param delta
1995
+ * @returns updated
1996
+ * @category Methods
1997
1997
  */
1998
1998
  }, {
1999
1999
  key: "update",
@@ -2173,9 +2173,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2173
2173
  this._needsUpdate = false;
2174
2174
  return updated;
2175
2175
  }
2176
- /**
2177
- * Get all state in JSON string
2178
- * @category Methods
2176
+ /**
2177
+ * Get all state in JSON string
2178
+ * @category Methods
2179
2179
  */
2180
2180
  }, {
2181
2181
  key: "toJSON",
@@ -2206,11 +2206,11 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2206
2206
  focalOffset0: this._focalOffset0.toArray()
2207
2207
  });
2208
2208
  }
2209
- /**
2210
- * Reproduce the control state with JSON. enableTransition is where anim or not in a boolean.
2211
- * @param json
2212
- * @param enableTransition
2213
- * @category Methods
2209
+ /**
2210
+ * Reproduce the control state with JSON. enableTransition is where anim or not in a boolean.
2211
+ * @param json
2212
+ * @param enableTransition
2213
+ * @category Methods
2214
2214
  */
2215
2215
  }, {
2216
2216
  key: "fromJSON",
@@ -2244,9 +2244,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2244
2244
  this.setFocalOffset(obj.focalOffset[0], obj.focalOffset[1], obj.focalOffset[2], enableTransition);
2245
2245
  this._needsUpdate = true;
2246
2246
  }
2247
- /**
2248
- * Attach all internal event handlers to enable drag control.
2249
- * @category Methods
2247
+ /**
2248
+ * Attach all internal event handlers to enable drag control.
2249
+ * @category Methods
2250
2250
  */
2251
2251
  }, {
2252
2252
  key: "connect",
@@ -2259,8 +2259,8 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2259
2259
  this._addAllEventListeners(domElement);
2260
2260
  this._getClientRect(this._elementRect);
2261
2261
  }
2262
- /**
2263
- * Detach all internal event handlers to disable drag control.
2262
+ /**
2263
+ * Detach all internal event handlers to disable drag control.
2264
2264
  */
2265
2265
  }, {
2266
2266
  key: "disconnect",
@@ -2272,9 +2272,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2272
2272
  this._domElement = undefined;
2273
2273
  }
2274
2274
  }
2275
- /**
2276
- * Dispose the cameraControls instance itself, remove all eventListeners.
2277
- * @category Methods
2275
+ /**
2276
+ * Dispose the cameraControls instance itself, remove all eventListeners.
2277
+ * @category Methods
2278
2278
  */
2279
2279
  }, {
2280
2280
  key: "dispose",
@@ -2391,8 +2391,8 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2391
2391
  }
2392
2392
  return distance;
2393
2393
  }
2394
- /**
2395
- * Get its client rect and package into given `DOMRect` .
2394
+ /**
2395
+ * Get its client rect and package into given `DOMRect` .
2396
2396
  */
2397
2397
  }, {
2398
2398
  key: "_getClientRect",
@@ -2436,10 +2436,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2436
2436
  }, {
2437
2437
  key: "_removeAllEventListeners",
2438
2438
  value: function _removeAllEventListeners() {}
2439
- /**
2440
- * backward compatible
2441
- * @deprecated use smoothTime (in seconds) instead
2442
- * @category Properties
2439
+ /**
2440
+ * backward compatible
2441
+ * @deprecated use smoothTime (in seconds) instead
2442
+ * @category Properties
2443
2443
  */
2444
2444
  }, {
2445
2445
  key: "dampingFactor",
@@ -2447,18 +2447,18 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2447
2447
  console.warn('.dampingFactor has been deprecated. use smoothTime (in seconds) instead.');
2448
2448
  return 0;
2449
2449
  }
2450
- /**
2451
- * backward compatible
2452
- * @deprecated use smoothTime (in seconds) instead
2453
- * @category Properties
2450
+ /**
2451
+ * backward compatible
2452
+ * @deprecated use smoothTime (in seconds) instead
2453
+ * @category Properties
2454
2454
  */,
2455
2455
  set: function set(_) {
2456
2456
  console.warn('.dampingFactor has been deprecated. use smoothTime (in seconds) instead.');
2457
2457
  }
2458
- /**
2459
- * backward compatible
2460
- * @deprecated use draggingSmoothTime (in seconds) instead
2461
- * @category Properties
2458
+ /**
2459
+ * backward compatible
2460
+ * @deprecated use draggingSmoothTime (in seconds) instead
2461
+ * @category Properties
2462
2462
  */
2463
2463
  }, {
2464
2464
  key: "draggingDampingFactor",
@@ -2466,10 +2466,10 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2466
2466
  console.warn('.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.');
2467
2467
  return 0;
2468
2468
  }
2469
- /**
2470
- * backward compatible
2471
- * @deprecated use draggingSmoothTime (in seconds) instead
2472
- * @category Properties
2469
+ /**
2470
+ * backward compatible
2471
+ * @deprecated use draggingSmoothTime (in seconds) instead
2472
+ * @category Properties
2473
2473
  */,
2474
2474
  set: function set(_) {
2475
2475
  console.warn('.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.');
@@ -2477,44 +2477,44 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2477
2477
  }], [{
2478
2478
  key: "install",
2479
2479
  value:
2480
- /**
2481
- * Injects THREE as the dependency. You can then proceed to use CameraControls.
2482
- *
2483
- * e.g
2484
- * ```javascript
2485
- * CameraControls.install( { THREE: THREE } );
2486
- * ```
2487
- *
2488
- * Note: If you do not wish to use enter three.js to reduce file size(tree-shaking for example), make a subset to install.
2489
- *
2490
- * ```js
2491
- * import {
2492
- * Vector2,
2493
- * Vector3,
2494
- * Vector4,
2495
- * Quaternion,
2496
- * Matrix4,
2497
- * Spherical,
2498
- * Box3,
2499
- * Sphere,
2500
- * Raycaster,
2501
- * MathUtils,
2502
- * } from 'three';
2503
- *
2504
- * const subsetOfTHREE = {
2505
- * Vector2 : Vector2,
2506
- * Vector3 : Vector3,
2507
- * Vector4 : Vector4,
2508
- * Quaternion: Quaternion,
2509
- * Matrix4 : Matrix4,
2510
- * Spherical : Spherical,
2511
- * Box3 : Box3,
2512
- * Sphere : Sphere,
2513
- * Raycaster : Raycaster,
2514
- * };
2515
- * CameraControls.install( { THREE: subsetOfTHREE } );
2516
- * ```
2517
- * @category Statics
2480
+ /**
2481
+ * Injects THREE as the dependency. You can then proceed to use CameraControls.
2482
+ *
2483
+ * e.g
2484
+ * ```javascript
2485
+ * CameraControls.install( { THREE: THREE } );
2486
+ * ```
2487
+ *
2488
+ * Note: If you do not wish to use enter three.js to reduce file size(tree-shaking for example), make a subset to install.
2489
+ *
2490
+ * ```js
2491
+ * import {
2492
+ * Vector2,
2493
+ * Vector3,
2494
+ * Vector4,
2495
+ * Quaternion,
2496
+ * Matrix4,
2497
+ * Spherical,
2498
+ * Box3,
2499
+ * Sphere,
2500
+ * Raycaster,
2501
+ * MathUtils,
2502
+ * } from 'three';
2503
+ *
2504
+ * const subsetOfTHREE = {
2505
+ * Vector2 : Vector2,
2506
+ * Vector3 : Vector3,
2507
+ * Vector4 : Vector4,
2508
+ * Quaternion: Quaternion,
2509
+ * Matrix4 : Matrix4,
2510
+ * Spherical : Spherical,
2511
+ * Box3 : Box3,
2512
+ * Sphere : Sphere,
2513
+ * Raycaster : Raycaster,
2514
+ * };
2515
+ * CameraControls.install( { THREE: subsetOfTHREE } );
2516
+ * ```
2517
+ * @category Statics
2518
2518
  */
2519
2519
  function install(libs) {
2520
2520
  THREE = libs.THREE;
@@ -2541,9 +2541,9 @@ var CameraControls = /*#__PURE__*/function (_EventDispatcher) {
2541
2541
  _rotationMatrix = new THREE.Matrix4();
2542
2542
  _raycaster = new THREE.Raycaster();
2543
2543
  }
2544
- /**
2545
- * list all ACTIONs
2546
- * @category Statics
2544
+ /**
2545
+ * list all ACTIONs
2546
+ * @category Statics
2547
2547
  */
2548
2548
  }, {
2549
2549
  key: "ACTION",