@realsee/vreo 2.2.6 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/PlayController/createHTMLAudioElement.js +11 -6
- package/lib/PlayController/index.js +80 -15
- package/lib/Player/App.js +26 -0
- package/lib/Player/Controller.js +100 -23
- package/lib/Player/custom/SpatialScenePanel/index.js +68 -42
- package/lib/Player/hooks.js +10 -0
- package/lib/Player/index.js +88 -24
- package/lib/Player/modules/Drawer/index.js +17 -0
- package/lib/Player/modules/PopUp/index.js +10 -0
- package/lib/Player/modules/ResizeObserver/index.js +8 -0
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +108 -17
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +24 -2
- package/lib/Player/modules/VideoAgent/index.js +17 -0
- package/lib/Player/modules/Wave/index.js +32 -7
- package/lib/Player/modules/keyframes/BgMusic/index.js +25 -7
- package/lib/Player/modules/keyframes/CameraMovement/index.js +27 -3
- package/lib/Player/modules/keyframes/InfoPanel/index.js +29 -6
- package/lib/Player/modules/keyframes/ModelVideo/index.js +29 -3
- package/lib/Player/modules/keyframes/PanoEffect/index.js +43 -15
- package/lib/Player/modules/keyframes/PanoEffect/lineAnime.js +7 -0
- package/lib/Player/modules/keyframes/PanoTag/index.js +22 -4
- package/lib/Player/modules/keyframes/PanoTextLabel/index.js +47 -22
- package/lib/Player/modules/keyframes/Prompter/index.js +32 -10
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +25 -18
- package/lib/Player/modules/keyframes/VideoEffect/index.js +65 -16
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.js +2 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.js +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.js +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/index.js +60 -19
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.js +5 -2
- package/lib/fivePlugins/CameraMovementPlugin/index.js +72 -19
- package/lib/fivePlugins/CameraMovementPlugin/typings.js +4 -0
- package/lib/fivePlugins/ModelTVVideoPlugin/index.js +60 -11
- package/lib/index.js +1 -0
- package/lib/react/index.js +34 -7
- package/lib/shared-utils/Audio.js +69 -15
- package/lib/shared-utils/AudioLike.js +39 -5
- package/lib/shared-utils/Preloader.js +7 -0
- package/lib/shared-utils/addResizeListener.js +5 -0
- package/lib/shared-utils/animationFrame/BetterTween.js +38 -2
- package/lib/shared-utils/animationFrame/index.js +10 -2
- package/lib/shared-utils/animationFrame/tween.js +11 -2
- package/lib/shared-utils/createTransMatrix.js +17 -2
- package/lib/shared-utils/getFileExpandedName.js +1 -0
- package/lib/shared-utils/getMediaInfo.js +9 -0
- package/lib/shared-utils/setElementDataset.js +2 -0
- package/lib/typings/VreoUnit.js +15 -0
- package/package.json +4 -2
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = exports.CSS3DRenderPlugin = void 0;
|
|
9
|
+
|
|
8
10
|
var THREE = _interopRequireWildcard(require("three"));
|
|
11
|
+
|
|
9
12
|
var _CSS3DRenderer = require("three/examples/jsm/renderers/CSS3DRenderer");
|
|
13
|
+
|
|
10
14
|
var _evenNumber = _interopRequireDefault(require("./evenNumber"));
|
|
15
|
+
|
|
11
16
|
var _centerPoint = _interopRequireDefault(require("./centerPoint"));
|
|
17
|
+
|
|
12
18
|
var _transformPositionToVector = _interopRequireDefault(require("./transformPositionToVector3"));
|
|
19
|
+
|
|
13
20
|
var _createResizeObserver = _interopRequireDefault(require("./createResizeObserver"));
|
|
21
|
+
|
|
14
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
15
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
16
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
17
28
|
/**
|
|
18
29
|
* **CSS3DRenderPlugin** 提供矩形区域(三维空间四个坐标点),你可以在此矩形区域中渲染 DOM 内容。
|
|
19
30
|
* 实现原理参考[CSS3DRenderer](https://threejs.org/docs/index.html?q=CSS3D#examples/en/renderers/CSS3DRenderer)。
|
|
@@ -24,11 +35,14 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
24
35
|
var state = {
|
|
25
36
|
disposeCallbacks: []
|
|
26
37
|
};
|
|
38
|
+
|
|
27
39
|
var create3DDomContainer = function create3DDomContainer() {
|
|
28
40
|
var _five$model, _five$model2, _config$autoRender;
|
|
41
|
+
|
|
29
42
|
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
43
|
params[_key] = arguments[_key];
|
|
31
44
|
}
|
|
45
|
+
|
|
32
46
|
var points = params[0].map(function (point) {
|
|
33
47
|
return point instanceof THREE.Vector3 ? point : (0, _transformPositionToVector["default"])(point);
|
|
34
48
|
});
|
|
@@ -45,40 +59,43 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
45
59
|
var autoRender = (_config$autoRender = config === null || config === void 0 ? void 0 : config.autoRender) !== null && _config$autoRender !== void 0 ? _config$autoRender : true;
|
|
46
60
|
var behindFiveContainer = (config === null || config === void 0 ? void 0 : config.behindFiveContainer) || fiveElement.parentElement || document.body;
|
|
47
61
|
var container = (config === null || config === void 0 ? void 0 : config.container) || document.createElement('div');
|
|
48
|
-
container.classList.add('__Vreo-plugin--CSS3DRenderPlugin');
|
|
62
|
+
container.classList.add('__Vreo-plugin--CSS3DRenderPlugin'); // 获取css3DObject, 如果mode为behind的话,一起获取mesh
|
|
49
63
|
|
|
50
|
-
// 获取css3DObject, 如果mode为behind的话,一起获取mesh
|
|
51
64
|
var _createObject = createObject(points, {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
ratio: ratio,
|
|
66
|
+
dpr: dpr,
|
|
67
|
+
container: container,
|
|
68
|
+
mode: mode
|
|
69
|
+
}),
|
|
70
|
+
css3DObject = _createObject.css3DObject,
|
|
71
|
+
mesh = _createObject.mesh; // ======= INIT START =======
|
|
72
|
+
|
|
73
|
+
|
|
61
74
|
var resizeObserver;
|
|
62
75
|
var frontModeUnInited = mode === 'front' && !state.frontMode;
|
|
63
76
|
var behindModeUnInited = mode === 'behind' && !state.behindMode;
|
|
64
77
|
var inited = !(frontModeUnInited || behindModeUnInited);
|
|
65
78
|
var stopRenderFlag = false;
|
|
66
79
|
var requestAnimationFrameId = null;
|
|
80
|
+
|
|
67
81
|
if (behindModeUnInited) {
|
|
68
82
|
state.behindMode = {
|
|
69
83
|
scene: new THREE.Scene(),
|
|
70
84
|
css3DRenderer: new _CSS3DRenderer.CSS3DRenderer()
|
|
71
85
|
};
|
|
72
86
|
}
|
|
87
|
+
|
|
73
88
|
if (frontModeUnInited) {
|
|
74
89
|
state.frontMode = {
|
|
75
90
|
scene: new THREE.Scene(),
|
|
76
91
|
css3DRenderer: new _CSS3DRenderer.CSS3DRenderer()
|
|
77
92
|
};
|
|
78
93
|
}
|
|
94
|
+
|
|
79
95
|
var _ref = mode === 'behind' ? state.behindMode : state.frontMode,
|
|
80
|
-
|
|
81
|
-
|
|
96
|
+
scene = _ref.scene,
|
|
97
|
+
css3DRenderer = _ref.css3DRenderer;
|
|
98
|
+
|
|
82
99
|
var render = function () {
|
|
83
100
|
if (!inited) {
|
|
84
101
|
var css3DRendererSetSize = function css3DRendererSetSize() {
|
|
@@ -92,22 +109,27 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
92
109
|
});
|
|
93
110
|
css3DRenderer.setSize(rendererWidth, rendererHeight);
|
|
94
111
|
};
|
|
112
|
+
|
|
95
113
|
css3DRendererSetSize();
|
|
96
114
|
resizeObserver = (0, _createResizeObserver["default"])(css3DRendererSetSize, fiveElement);
|
|
97
115
|
css3DRenderer.domElement.style.position = 'absolute';
|
|
98
116
|
css3DRenderer.domElement.style.top = '0';
|
|
99
117
|
css3DRenderer.domElement.style.userSelect = 'none';
|
|
100
118
|
css3DRenderer.domElement.style.pointerEvents = 'none';
|
|
119
|
+
|
|
101
120
|
var renderEveryFrame = function renderEveryFrame() {
|
|
102
121
|
if (stopRenderFlag) return;
|
|
103
122
|
requestAnimationFrameId = requestAnimationFrame(renderEveryFrame);
|
|
104
123
|
css3DRenderer.render(scene, five.camera);
|
|
105
124
|
};
|
|
125
|
+
|
|
106
126
|
return function () {
|
|
107
127
|
var _resizeObserver, _resizeObserver$obser;
|
|
128
|
+
|
|
108
129
|
scene.add(css3DObject);
|
|
109
130
|
(_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 ? void 0 : (_resizeObserver$obser = _resizeObserver.observe) === null || _resizeObserver$obser === void 0 ? void 0 : _resizeObserver$obser.call(_resizeObserver);
|
|
110
131
|
renderEveryFrame();
|
|
132
|
+
|
|
111
133
|
if (mode === 'behind' && mesh) {
|
|
112
134
|
five.scene.add(mesh);
|
|
113
135
|
disposers.push(function () {
|
|
@@ -121,15 +143,18 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
121
143
|
};
|
|
122
144
|
}
|
|
123
145
|
}();
|
|
146
|
+
|
|
124
147
|
if (frontModeUnInited) {
|
|
125
148
|
var wrapper = fiveElement.parentElement || document.body;
|
|
126
149
|
wrapper.appendChild(css3DRenderer.domElement);
|
|
127
150
|
}
|
|
151
|
+
|
|
128
152
|
if (behindModeUnInited) {
|
|
129
153
|
var _wrapper = behindFiveContainer;
|
|
154
|
+
|
|
130
155
|
_wrapper.appendChild(css3DRenderer.domElement);
|
|
131
|
-
}
|
|
132
|
-
|
|
156
|
+
} // ======= INIT END =======
|
|
157
|
+
|
|
133
158
|
|
|
134
159
|
var dispose = function dispose() {
|
|
135
160
|
stopRenderFlag = true;
|
|
@@ -138,25 +163,32 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
138
163
|
});
|
|
139
164
|
scene.remove(css3DObject);
|
|
140
165
|
if (typeof requestAnimationFrameId === 'number') cancelAnimationFrame(requestAnimationFrameId);
|
|
166
|
+
|
|
141
167
|
if (scene.children.length === 0) {
|
|
142
168
|
css3DRenderer.domElement.remove();
|
|
143
169
|
if (mode === 'front') state.frontMode = undefined;
|
|
144
170
|
if (mode === 'behind') state.behindMode = undefined;
|
|
171
|
+
|
|
145
172
|
if (!state.behindMode && !state.frontMode) {
|
|
146
173
|
var _resizeObserver2, _resizeObserver2$unob;
|
|
174
|
+
|
|
147
175
|
(_resizeObserver2 = resizeObserver) === null || _resizeObserver2 === void 0 ? void 0 : (_resizeObserver2$unob = _resizeObserver2.unobserve) === null || _resizeObserver2$unob === void 0 ? void 0 : _resizeObserver2$unob.call(_resizeObserver2);
|
|
148
176
|
}
|
|
149
177
|
}
|
|
178
|
+
|
|
150
179
|
return true;
|
|
151
180
|
};
|
|
181
|
+
|
|
152
182
|
var idx = state.disposeCallbacks.findIndex(function (item) {
|
|
153
183
|
return item === dispose;
|
|
154
184
|
});
|
|
185
|
+
|
|
155
186
|
if (idx !== -1) {
|
|
156
187
|
state.disposeCallbacks.splice(idx, 1);
|
|
157
188
|
} else {
|
|
158
189
|
state.disposeCallbacks.push(dispose);
|
|
159
190
|
}
|
|
191
|
+
|
|
160
192
|
if (autoRender) render();
|
|
161
193
|
return {
|
|
162
194
|
container: container,
|
|
@@ -165,11 +197,12 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
165
197
|
render: autoRender ? undefined : render
|
|
166
198
|
};
|
|
167
199
|
};
|
|
200
|
+
|
|
168
201
|
var createObject = function createObject(points, config) {
|
|
169
202
|
var ratio = config.ratio,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
203
|
+
dpr = config.dpr,
|
|
204
|
+
element = config.container,
|
|
205
|
+
mode = config.mode;
|
|
173
206
|
var planeWidth = points[0].distanceTo(points[1]);
|
|
174
207
|
var planeHeight = points[1].distanceTo(points[2]);
|
|
175
208
|
var domWidthPx = (0, _evenNumber["default"])(planeWidth / ratio * dpr);
|
|
@@ -181,9 +214,10 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
181
214
|
element.style.pointerEvents = 'none';
|
|
182
215
|
var centerPosition = (0, _centerPoint["default"])(points[0], points[2]);
|
|
183
216
|
var vector01 = points[1].clone().sub(points[0]); // 点0 -> 点1 的向量
|
|
184
|
-
var vector12 = points[2].clone().sub(points[1]); // 点1 -> 点2 的向量
|
|
185
217
|
|
|
218
|
+
var vector12 = points[2].clone().sub(points[1]); // 点1 -> 点2 的向量
|
|
186
219
|
// 旋转
|
|
220
|
+
|
|
187
221
|
var rotateXAngle = new THREE.Vector3(0, 1, 0).angleTo(new THREE.Vector3(0, vector12.y, vector12.z));
|
|
188
222
|
var rotateYAngle = new THREE.Vector3(1, 0, 0).angleTo(new THREE.Vector3(vector01.x, 0, vector01.z));
|
|
189
223
|
var rotateZAngle = vector01.angleTo(new THREE.Vector3(vector01.x, 0, vector01.z));
|
|
@@ -192,15 +226,19 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
192
226
|
* [0,0,1] => [0,1,0] 为rolate Worldy正方向
|
|
193
227
|
* [0,1,1] => [-1,0,0] 为rolate Worldz正方向
|
|
194
228
|
*/
|
|
229
|
+
|
|
195
230
|
var rotateX = (vector12.z > 0 ? -1 : 1) * rotateXAngle;
|
|
196
231
|
var rotateY = (vector01.z < 0 ? 1 : -1) * rotateYAngle;
|
|
197
232
|
var rotateZ = (vector01.x > 0 && vector01.y < 0 || vector01.x < 0 && vector01.y > 0 ? -1 : 1) * rotateZAngle;
|
|
198
233
|
css3DObject.rotateOnWorldAxis(new THREE.Vector3(1, 0, 0), rotateX); // x
|
|
234
|
+
|
|
199
235
|
css3DObject.rotateOnWorldAxis(new THREE.Vector3(0, 1, 0), rotateY); // y
|
|
236
|
+
|
|
200
237
|
css3DObject.rotateOnWorldAxis(new THREE.Vector3(0, 0, 1), rotateZ); // z
|
|
201
238
|
|
|
202
239
|
css3DObject.position.set(centerPosition.x, centerPosition.y, centerPosition.z);
|
|
203
240
|
var mesh;
|
|
241
|
+
|
|
204
242
|
if (mode === 'behind') {
|
|
205
243
|
var material = new THREE.MeshBasicMaterial({
|
|
206
244
|
opacity: 0,
|
|
@@ -214,11 +252,13 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
214
252
|
mesh.rotation.copy(css3DObject.rotation);
|
|
215
253
|
mesh.scale.copy(css3DObject.scale);
|
|
216
254
|
}
|
|
255
|
+
|
|
217
256
|
return {
|
|
218
257
|
css3DObject: css3DObject,
|
|
219
258
|
mesh: mesh
|
|
220
259
|
};
|
|
221
260
|
};
|
|
261
|
+
|
|
222
262
|
return {
|
|
223
263
|
create3DDomContainer: create3DDomContainer,
|
|
224
264
|
disposeAll: function disposeAll() {
|
|
@@ -229,6 +269,7 @@ var CSS3DRenderPlugin = function CSS3DRenderPlugin(five) {
|
|
|
229
269
|
}
|
|
230
270
|
};
|
|
231
271
|
};
|
|
272
|
+
|
|
232
273
|
exports.CSS3DRenderPlugin = CSS3DRenderPlugin;
|
|
233
274
|
var _default = CSS3DRenderPlugin;
|
|
234
275
|
exports["default"] = _default;
|
|
@@ -4,12 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _three = require("three");
|
|
9
|
+
|
|
8
10
|
var transformPositionToVector3 = function transformPositionToVector3(_ref) {
|
|
9
11
|
var x = _ref.x,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
y = _ref.y,
|
|
13
|
+
z = _ref.z;
|
|
12
14
|
return new _three.Vector3(x, y, z);
|
|
13
15
|
};
|
|
16
|
+
|
|
14
17
|
var _default = transformPositionToVector3;
|
|
15
18
|
exports["default"] = _default;
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.CameraMovementPlugin = void 0;
|
|
7
|
+
|
|
8
8
|
var _five = require("@realsee/five");
|
|
9
|
+
|
|
9
10
|
var _typings = require("./typings");
|
|
10
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
11
|
+
|
|
11
12
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
+
|
|
12
14
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
|
+
|
|
13
16
|
var PI = Math.PI;
|
|
14
17
|
var PI_2 = PI * 2;
|
|
18
|
+
|
|
15
19
|
function progressNumber(from, to, pst) {
|
|
16
20
|
if (from === to) return from;
|
|
17
21
|
return from + (to - from) * pst;
|
|
18
22
|
}
|
|
23
|
+
|
|
19
24
|
function progressLongitude(fromLongitude, toLongitude, rotation, progress) {
|
|
20
25
|
var clockwise = rotation === _typings.Rotation.Clockwise;
|
|
21
26
|
var delta = clockwise ? fromLongitude - toLongitude : toLongitude - fromLongitude;
|
|
@@ -25,69 +30,87 @@ function progressLongitude(fromLongitude, toLongitude, rotation, progress) {
|
|
|
25
30
|
var progressLongitude = fromLongitude + deltaMod3 * progress;
|
|
26
31
|
return progressLongitude % PI_2;
|
|
27
32
|
}
|
|
28
|
-
|
|
29
33
|
/**
|
|
30
34
|
* **运镜插件** 模拟类似于电影运镜效果。
|
|
31
35
|
*/
|
|
36
|
+
|
|
37
|
+
|
|
32
38
|
var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
33
39
|
var move = function move(args, duration) {
|
|
34
40
|
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
35
41
|
preload: true
|
|
36
42
|
};
|
|
37
43
|
return new Promise( /*#__PURE__*/function () {
|
|
38
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
44
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(resolve, reject) {
|
|
39
45
|
var _opts$asyncEndCallbac;
|
|
46
|
+
|
|
40
47
|
var panoIndex, start, movePanoOptions;
|
|
41
|
-
return
|
|
48
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
42
49
|
while (1) {
|
|
43
50
|
switch (_context.prev = _context.next) {
|
|
44
51
|
case 0:
|
|
45
52
|
if (opts.asyncStartCallback) {
|
|
46
53
|
opts.asyncStartCallback();
|
|
47
54
|
}
|
|
55
|
+
|
|
48
56
|
if (!(five.panoIndex === undefined)) {
|
|
49
57
|
_context.next = 3;
|
|
50
58
|
break;
|
|
51
59
|
}
|
|
60
|
+
|
|
52
61
|
return _context.abrupt("return", reject(false));
|
|
62
|
+
|
|
53
63
|
case 3:
|
|
54
64
|
if (!(args.mode && args.mode !== five.currentMode)) {
|
|
55
65
|
_context.next = 7;
|
|
56
66
|
break;
|
|
57
67
|
}
|
|
68
|
+
|
|
58
69
|
_context.next = 6;
|
|
59
70
|
return five.changeMode(args.mode, args, duration);
|
|
71
|
+
|
|
60
72
|
case 6:
|
|
61
73
|
return _context.abrupt("return", resolve(true));
|
|
74
|
+
|
|
62
75
|
case 7:
|
|
63
76
|
if (!(args.mode === _five.Five.Mode.Floorplan)) {
|
|
64
77
|
_context.next = 9;
|
|
65
78
|
break;
|
|
66
79
|
}
|
|
80
|
+
|
|
67
81
|
return _context.abrupt("return", resolve(true));
|
|
82
|
+
|
|
68
83
|
case 9:
|
|
69
84
|
if (!(opts.preload && args.panoIndex !== undefined && args.panoIndex !== five.panoIndex)) {
|
|
70
85
|
_context.next = 12;
|
|
71
86
|
break;
|
|
72
87
|
}
|
|
88
|
+
|
|
73
89
|
_context.next = 12;
|
|
74
90
|
return five.preloadPano(args.panoIndex);
|
|
91
|
+
|
|
75
92
|
case 12:
|
|
76
93
|
(_opts$asyncEndCallbac = opts.asyncEndCallback) === null || _opts$asyncEndCallbac === void 0 ? void 0 : _opts$asyncEndCallbac.call(opts);
|
|
94
|
+
|
|
77
95
|
if (!(args.panoIndex === undefined && args.fov === undefined && args.latitude === undefined && args.longitude === undefined)) {
|
|
78
96
|
_context.next = 15;
|
|
79
97
|
break;
|
|
80
98
|
}
|
|
99
|
+
|
|
81
100
|
return _context.abrupt("return", resolve(true));
|
|
101
|
+
|
|
82
102
|
case 15:
|
|
83
103
|
panoIndex = args.panoIndex !== undefined ? args.panoIndex : five.panoIndex;
|
|
104
|
+
|
|
84
105
|
if (!(panoIndex !== undefined)) {
|
|
85
106
|
_context.next = 25;
|
|
86
107
|
break;
|
|
87
108
|
}
|
|
109
|
+
|
|
88
110
|
start = performance.now();
|
|
89
111
|
_context.next = 20;
|
|
90
112
|
return five.ready();
|
|
113
|
+
|
|
91
114
|
case 20:
|
|
92
115
|
movePanoOptions = Object.assign({}, args, {
|
|
93
116
|
duration: duration - (performance.now() - start),
|
|
@@ -104,11 +127,14 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
|
104
127
|
});
|
|
105
128
|
_context.next = 23;
|
|
106
129
|
return five.moveToPano(panoIndex, movePanoOptions);
|
|
130
|
+
|
|
107
131
|
case 23:
|
|
108
132
|
_context.next = 26;
|
|
109
133
|
break;
|
|
134
|
+
|
|
110
135
|
case 25:
|
|
111
136
|
reject(false);
|
|
137
|
+
|
|
112
138
|
case 26:
|
|
113
139
|
case "end":
|
|
114
140
|
return _context.stop();
|
|
@@ -116,49 +142,56 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
|
116
142
|
}
|
|
117
143
|
}, _callee);
|
|
118
144
|
}));
|
|
145
|
+
|
|
119
146
|
return function (_x, _x2) {
|
|
120
147
|
return _ref.apply(this, arguments);
|
|
121
148
|
};
|
|
122
149
|
}());
|
|
123
150
|
};
|
|
151
|
+
|
|
124
152
|
var rotate = /*#__PURE__*/function () {
|
|
125
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
|
153
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(args, duration) {
|
|
126
154
|
var _opts$asyncStartCallb, _opts$asyncEndCallbac2;
|
|
155
|
+
|
|
127
156
|
var opts,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return
|
|
157
|
+
from,
|
|
158
|
+
to,
|
|
159
|
+
timeEnd,
|
|
160
|
+
start,
|
|
161
|
+
animeDuration,
|
|
162
|
+
onFiveRenderFrame,
|
|
163
|
+
_args2 = arguments;
|
|
164
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
136
165
|
while (1) {
|
|
137
166
|
switch (_context2.prev = _context2.next) {
|
|
138
167
|
case 0:
|
|
139
168
|
opts = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
|
|
140
|
-
(_opts$asyncStartCallb = opts.asyncStartCallback) === null || _opts$asyncStartCallb === void 0 ? void 0 : _opts$asyncStartCallb.call(opts);
|
|
169
|
+
(_opts$asyncStartCallb = opts.asyncStartCallback) === null || _opts$asyncStartCallb === void 0 ? void 0 : _opts$asyncStartCallb.call(opts); // 先切换模型再出旋转效果
|
|
141
170
|
|
|
142
|
-
// 先切换模型再出旋转效果
|
|
143
171
|
if (!(args.mode && five.currentMode !== args.mode)) {
|
|
144
172
|
_context2.next = 5;
|
|
145
173
|
break;
|
|
146
174
|
}
|
|
175
|
+
|
|
147
176
|
_context2.next = 5;
|
|
148
177
|
return five.changeMode(args.mode, args.mode === _five.Five.Mode.Panorama ? {
|
|
149
178
|
latitude: 0
|
|
150
179
|
} : undefined);
|
|
180
|
+
|
|
151
181
|
case 5:
|
|
152
182
|
if (!(args.mode === _five.Five.Mode.Panorama && five.currentMode === _five.Five.Mode.Panorama && args.panoIndex !== undefined && args.panoIndex !== five.panoIndex)) {
|
|
153
183
|
_context2.next = 11;
|
|
154
184
|
break;
|
|
155
185
|
}
|
|
186
|
+
|
|
156
187
|
if (!opts.preload) {
|
|
157
188
|
_context2.next = 9;
|
|
158
189
|
break;
|
|
159
190
|
}
|
|
191
|
+
|
|
160
192
|
_context2.next = 9;
|
|
161
193
|
return five.preloadPano(args.panoIndex);
|
|
194
|
+
|
|
162
195
|
case 9:
|
|
163
196
|
_context2.next = 11;
|
|
164
197
|
return new Promise(function (resolve, reject) {
|
|
@@ -174,30 +207,38 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
|
174
207
|
effect: 'fade'
|
|
175
208
|
});
|
|
176
209
|
});
|
|
210
|
+
|
|
177
211
|
case 11:
|
|
178
212
|
_context2.next = 13;
|
|
179
213
|
return five.ready();
|
|
214
|
+
|
|
180
215
|
case 13:
|
|
181
|
-
(_opts$asyncEndCallbac2 = opts.asyncEndCallback) === null || _opts$asyncEndCallbac2 === void 0 ? void 0 : _opts$asyncEndCallbac2.call(opts);
|
|
216
|
+
(_opts$asyncEndCallbac2 = opts.asyncEndCallback) === null || _opts$asyncEndCallbac2 === void 0 ? void 0 : _opts$asyncEndCallbac2.call(opts); // 计算to
|
|
182
217
|
|
|
183
|
-
// 计算to
|
|
184
218
|
from = five.getCurrentState();
|
|
219
|
+
|
|
185
220
|
to = function () {
|
|
186
221
|
return args;
|
|
187
222
|
}();
|
|
223
|
+
|
|
188
224
|
timeEnd = false; // 开始时间
|
|
225
|
+
|
|
189
226
|
start = performance.now();
|
|
190
227
|
animeDuration = duration;
|
|
228
|
+
|
|
191
229
|
if (args.rotation === _typings.Rotation.Loop) {
|
|
192
230
|
animeDuration = args.rotateSpeed ? Math.ceil(Math.abs(to.longitude - from.longitude) / args.rotateSpeed * 1000) : duration;
|
|
193
231
|
animeDuration = Math.min(duration, animeDuration);
|
|
194
232
|
}
|
|
233
|
+
|
|
195
234
|
onFiveRenderFrame = function onFiveRenderFrame() {
|
|
196
235
|
if (timeEnd) {
|
|
197
236
|
five.off('renderFrame', onFiveRenderFrame);
|
|
198
237
|
return;
|
|
199
238
|
}
|
|
239
|
+
|
|
200
240
|
var targetState = {};
|
|
241
|
+
|
|
201
242
|
if (args.rotation !== _typings.Rotation.Loop) {
|
|
202
243
|
var progress = (performance.now() - start) / duration;
|
|
203
244
|
targetState = {
|
|
@@ -207,9 +248,13 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
|
207
248
|
};
|
|
208
249
|
} else {
|
|
209
250
|
var _progress = (performance.now() - start) / animeDuration; // 可能大于1
|
|
251
|
+
|
|
252
|
+
|
|
210
253
|
var times = Math.floor(_progress);
|
|
211
254
|
var progress2 = _progress - times; // 一定小于1
|
|
255
|
+
|
|
212
256
|
var isNegative = times % 2 === 1; // 是否为反向旋转, 0: 正, 1: 反, 2: 正, 3: 反 以此类推
|
|
257
|
+
|
|
213
258
|
var resultProgress = isNegative ? 1 - progress2 : progress2;
|
|
214
259
|
targetState = {
|
|
215
260
|
fov: progressNumber(from.fov, to.fov, resultProgress),
|
|
@@ -217,20 +262,25 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
|
217
262
|
longitude: progressNumber(from.longitude, to.longitude, resultProgress)
|
|
218
263
|
};
|
|
219
264
|
}
|
|
265
|
+
|
|
220
266
|
five.setState(targetState, true);
|
|
221
267
|
};
|
|
268
|
+
|
|
222
269
|
five.on('renderFrame', onFiveRenderFrame);
|
|
223
270
|
_context2.next = 24;
|
|
224
271
|
return new Promise(function (resolve) {
|
|
225
272
|
setTimeout(function () {
|
|
226
273
|
timeEnd = true;
|
|
227
|
-
five.off('renderFrame', onFiveRenderFrame);
|
|
274
|
+
five.off('renderFrame', onFiveRenderFrame); // 总时间到了之后强制结束,同时也是 Loop 模式的结束方式
|
|
275
|
+
|
|
228
276
|
// 总时间到了之后强制结束,同时也是 Loop 模式的结束方式
|
|
229
277
|
resolve(true);
|
|
230
278
|
}, duration);
|
|
231
279
|
});
|
|
280
|
+
|
|
232
281
|
case 24:
|
|
233
282
|
return _context2.abrupt("return", _context2.sent);
|
|
283
|
+
|
|
234
284
|
case 25:
|
|
235
285
|
case "end":
|
|
236
286
|
return _context2.stop();
|
|
@@ -238,13 +288,16 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
|
238
288
|
}
|
|
239
289
|
}, _callee2);
|
|
240
290
|
}));
|
|
291
|
+
|
|
241
292
|
return function rotate(_x3, _x4) {
|
|
242
293
|
return _ref2.apply(this, arguments);
|
|
243
294
|
};
|
|
244
295
|
}();
|
|
296
|
+
|
|
245
297
|
return {
|
|
246
298
|
move: move,
|
|
247
299
|
rotate: rotate
|
|
248
300
|
};
|
|
249
301
|
};
|
|
302
|
+
|
|
250
303
|
exports.CameraMovementPlugin = CameraMovementPlugin;
|
|
@@ -4,16 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Rotation = exports.CameraMovementEffect = void 0;
|
|
7
|
+
|
|
7
8
|
/* eslint-disable prettier/prettier */
|
|
8
9
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
9
10
|
var CameraMovementEffect;
|
|
10
11
|
exports.CameraMovementEffect = CameraMovementEffect;
|
|
12
|
+
|
|
11
13
|
(function (CameraMovementEffect) {
|
|
12
14
|
CameraMovementEffect["Move"] = "Move";
|
|
13
15
|
CameraMovementEffect["Rotate"] = "Rotate";
|
|
14
16
|
})(CameraMovementEffect || (exports.CameraMovementEffect = CameraMovementEffect = {}));
|
|
17
|
+
|
|
15
18
|
var Rotation;
|
|
16
19
|
exports.Rotation = Rotation;
|
|
20
|
+
|
|
17
21
|
(function (Rotation) {
|
|
18
22
|
Rotation["Clockwise"] = "Clockwise";
|
|
19
23
|
Rotation["Anticlockwise"] = "Anticlockwise";
|