@realsee/dnalogel 0.1.2 → 0.1.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/components/ARVideoFigure/ARVideoFigureMesh.js +56 -32
- package/components/ARVideoFigure/ARVideoFigureScene.js +30 -19
- package/components/ARVideoFigure/ImgBgTransparent.js +22 -6
- package/components/ARVideoFigure/ImgBgTransparentMesh.js +40 -30
- package/components/ARVideoFigure/fragmentShader.js +2 -0
- package/components/ARVideoFigure/index.js +22 -6
- package/components/ARVideoFigure/vertexShader.js +2 -0
- package/components/GLTFView/index.d.ts +72 -0
- package/components/GLTFView/index.js +149 -0
- package/components/GlassFilters/index.js +25 -1
- package/components/ModelView/ModelViewController.js +39 -29
- package/components/ModelView/index.js +4 -2
- package/components/PaintBrush/index.js +15 -1
- package/components/PanoTag/index.js +2 -0
- package/data/1aGKl9JmrlXMXx8d.js +2 -0
- package/data/54djM0oR6ky3Ey8e.d.ts +55 -0
- package/data/54djM0oR6ky3Ey8e.js +350 -0
- package/data/6gyq3v1verxD7JO1.js +2 -0
- package/data/8054djM0oR6ky3Ey8e.d.ts +55 -0
- package/data/8054djM0oR6ky3Ey8e.js +350 -0
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +2 -0
- package/data/PrXel3aqGbp34JQn.js +2 -0
- package/data/XJ6NMLWnkAY3Rdx8.d.ts +843 -0
- package/data/XJ6NMLWnkAY3Rdx8.js +7989 -0
- package/data/YdoNP9K4rwQDwjJr.js +2 -0
- package/data/ZLvK29zj4L29Jowd.d.ts +55 -0
- package/data/ZLvK29zj4L29Jowd.js +372 -0
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +2 -0
- package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +5 -0
- package/data/extrude-walls/ZLvK29zj4L29Jowd.js +14 -0
- package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +5 -0
- package/data/extrude-walls/lo024DEgzanMj5BE.js +14 -0
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +85 -0
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +511 -0
- package/data/lo024DEgzanMj5BE.d.ts +55 -0
- package/data/lo024DEgzanMj5BE.js +966 -0
- package/data/oPzy3ApbjjpD8YdR.js +2 -0
- package/data/qjAxMG4XbPn96wKG.js +2 -0
- package/data/rXel3aPQRRBD4JQn.js +2 -0
- package/data/vLykj3NWrllMrG06.d.ts +2 -0
- package/data/vLykj3NWrllMrG06.js +199 -2
- package/data/wz0QV9KA4ugyo9ME.js +2 -0
- package/data/zxMawr9raSg8LYjG.d.ts +53 -0
- package/data/zxMawr9raSg8LYjG.js +590 -0
- package/examples/FiveStateController/index.js +9 -15
- package/examples/VRHouse/Mobile.js +15 -1
- package/examples/VRHouse/PC.js +15 -1
- package/examples/VRHouse/index.js +15 -1
- package/index.js +4 -2
- package/libs/gltf-viewer/Subscribe.d.ts +76 -0
- package/libs/gltf-viewer/Subscribe.js +231 -0
- package/libs/gltf-viewer/coordsMoveByOffset.d.ts +13 -0
- package/libs/gltf-viewer/coordsMoveByOffset.js +22 -0
- package/libs/gltf-viewer/coordsToDirection.d.ts +5 -0
- package/{components/PBRView/index.js → libs/gltf-viewer/coordsToDirection.js} +29 -19
- package/libs/gltf-viewer/formatRad.d.ts +1 -0
- package/libs/gltf-viewer/formatRad.js +13 -0
- package/libs/gltf-viewer/getFrameTime.d.ts +1 -0
- package/libs/gltf-viewer/getFrameTime.js +28 -0
- package/libs/gltf-viewer/index.d.ts +55 -0
- package/libs/gltf-viewer/index.js +650 -0
- package/libs/gltf-viewer/mouseWheel.d.ts +2 -0
- package/libs/gltf-viewer/mouseWheel.js +59 -0
- package/libs/gltf-viewer/requestAnimationFrame.d.ts +1 -0
- package/libs/gltf-viewer/requestAnimationFrame.js +18 -0
- package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +1 -0
- package/libs/gltf-viewer/requestAnimationFrameInterval.js +31 -0
- package/libs/gltf-viewer/uuid.d.ts +4 -0
- package/libs/gltf-viewer/uuid.js +28 -0
- package/package.json +8 -4
- package/plugins/AutoPreloadPlugin/index.d.ts +23 -0
- package/plugins/AutoPreloadPlugin/index.js +111 -0
- package/plugins/CSS3DRenderPlugin/components/Marker/index.js +24 -16
- package/plugins/CSS3DRenderPlugin/index.d.ts +3 -2
- package/plugins/CSS3DRenderPlugin/index.js +79 -46
- package/plugins/CameraMovementPlugin/index.js +33 -9
- package/plugins/CameraMovementPlugin/typing.js +2 -0
- package/plugins/ModelChassisCompassPlugin/index.d.ts +7 -3
- package/plugins/ModelChassisCompassPlugin/index.js +34 -33
- package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +13 -1
- package/plugins/ModelEntryDoorGuidePlugin/index.js +233 -2
- package/plugins/ModelExtrudeWallsPlugin/index.d.ts +16 -0
- package/plugins/ModelExtrudeWallsPlugin/index.js +252 -0
- package/plugins/ModelRoomLabelPlugin/Controller.d.ts +35 -0
- package/plugins/ModelRoomLabelPlugin/Controller.js +153 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +8 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +66 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +7 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +159 -0
- package/plugins/ModelRoomLabelPlugin/index.d.ts +8 -0
- package/plugins/ModelRoomLabelPlugin/index.js +18 -0
- package/plugins/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/plugins/ModelRoomLabelPlugin/typings.js +7 -0
- package/plugins/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/plugins/ModelRoomLabelPlugin/utils/parseData.js +35 -0
- package/plugins/ModelTVVideoPlugin/index.js +100 -16
- package/plugins/ModelViewPlugin/index.js +25 -1
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +29 -25
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +15 -1
- package/plugins/PanoCursorRaycasterPlugin/index.js +13 -6
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +4 -2
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +15 -1
- package/plugins/PanoDoorLabelPlugin/index.js +2 -0
- package/plugins/PanoIRobotPlugin/index.js +2 -0
- package/plugins/PanoMaskSelectorPlugin/compare.d.ts +1 -0
- package/plugins/PanoMaskSelectorPlugin/compare.js +17 -0
- package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +7 -0
- package/plugins/PanoMaskSelectorPlugin/createBox.js +79 -0
- package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +3 -0
- package/plugins/PanoMaskSelectorPlugin/createTextures.js +45 -0
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +1 -0
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +10 -0
- package/plugins/PanoMaskSelectorPlugin/index.d.ts +49 -0
- package/plugins/PanoMaskSelectorPlugin/index.js +348 -0
- package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +1 -0
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +10 -0
- package/plugins/PanoRulerPlugin/data/roomInfo.js +2 -0
- package/plugins/PanoRulerPlugin/data/roomRules.js +2 -0
- package/plugins/PanoRulerPlugin/index.js +68 -20
- package/plugins/PanoRulerPlugin/typings.js +2 -0
- package/plugins/PanoTVVideoPlugin/index.d.ts +2 -0
- package/plugins/PanoTVVideoPlugin/index.js +108 -26
- package/plugins/TreasurePlugin/Controller.js +58 -52
- package/plugins/TreasurePlugin/TreasureFaceAnime.js +36 -21
- package/plugins/TreasurePlugin/TreasureObject.js +60 -56
- package/plugins/TreasurePlugin/TreasureOpenAnime.js +38 -19
- package/plugins/TreasurePlugin/constants.js +2 -0
- package/plugins/TreasurePlugin/index.js +2 -0
- package/plugins/TreasurePlugin/typings.js +2 -0
- package/plugins/floorplan/Assets/floorplanExtraObject.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +71 -88
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +25 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +19 -4
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +28 -4
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +28 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +20 -6
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +30 -8
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/index.js +4 -2
- package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +14 -22
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +25 -3
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +6 -2
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +19 -3
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +28 -4
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +22 -6
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +29 -19
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +2 -0
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +44 -47
- package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +4 -2
- package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +50 -55
- package/plugins/floorplan/TopviewFloorplanPlugin/index.js +2 -0
- package/plugins/floorplan/TopviewFloorplanPlugin/style.js +2 -0
- package/plugins/floorplan/components/FloorplanImage.js +15 -1
- package/plugins/floorplan/typings/floorplanData.js +2 -0
- package/plugins/floorplan/typings/floorplanServerData.js +2 -0
- package/plugins/floorplan/utils/formatData.js +28 -10
- package/plugins/floorplan/utils/formatPosition.js +10 -8
- package/shared-utils/Preloader.js +6 -0
- package/shared-utils/Subscribe.js +36 -16
- package/shared-utils/animationFrame/BetterTween.js +28 -27
- package/shared-utils/animationFrame/calculateProgress.js +2 -0
- package/shared-utils/animationFrame/formatRad.js +2 -0
- package/shared-utils/animationFrame/index.js +12 -0
- package/shared-utils/animationFrame/tween.js +17 -1
- package/shared-utils/changeModelCanvansOpacity.js +14 -0
- package/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/shared-utils/createCanvasTextTexture.js +31 -0
- package/shared-utils/createFiveContainer.js +23 -17
- package/shared-utils/createLine/index.js +15 -1
- package/shared-utils/debounce.js +4 -0
- package/shared-utils/equal.js +15 -4
- package/shared-utils/filter.js +36 -2
- package/shared-utils/five/changeMode.js +13 -17
- package/shared-utils/five/useFivePlugin.js +2 -0
- package/shared-utils/formatRad.js +2 -0
- package/shared-utils/getPxmm.js +15 -1
- package/shared-utils/getRandomColor.js +10 -0
- package/shared-utils/isNil.js +2 -0
- package/shared-utils/isTruelyObject.js +4 -0
- package/shared-utils/math/evenNumber.js +2 -0
- package/shared-utils/math/planimetry.js +10 -0
- package/shared-utils/math/rad2Deg.js +2 -0
- package/shared-utils/nearlyEqual.js +2 -0
- package/shared-utils/nextFrame.js +2 -0
- package/shared-utils/noop.js +2 -0
- package/shared-utils/object3d2LocalMatrix.js +20 -14
- package/shared-utils/px2rem.js +10 -0
- package/shared-utils/tap.js +2 -0
- package/shared-utils/three/centerPoint.js +2 -0
- package/shared-utils/three/getExtraModelLoader.js +14 -0
- package/shared-utils/three/getNormal.js +4 -0
- package/shared-utils/three/getTextureLoader.js +16 -0
- package/shared-utils/three/loadFbxObj.js +13 -5
- package/shared-utils/three/loadTexture.js +13 -5
- package/shared-utils/three/transformPositionToVector3.js +2 -0
- package/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/shared-utils/three/transfromToMeshBasicMaterial.js +33 -0
- package/shared-utils/throttle.js +4 -0
- package/shared-utils/to.js +8 -4
- package/shared-utils/useDebounce.js +6 -0
- package/shared-utils/useThrottle.js +6 -0
- package/shared-utils/uuid.js +8 -0
- package/shared-utils/vectorTocoordinates.js +2 -0
- package/typedoc/components.js +2 -0
- package/typedoc/plugins.d.ts +2 -0
- package/typedoc/plugins.js +41 -1
- package/typedoc/shared-utils.js +2 -0
- package/typedoc/typings.js +2 -0
- package/typings/math.type.js +2 -0
- package/typings/utils.type.js +2 -0
- package/components/PBRView/index.d.ts +0 -14
- package/data/wYnRjQ4KZoV1yPoG.d.ts +0 -114
- package/data/wYnRjQ4KZoV1yPoG.js +0 -512
|
@@ -1,31 +1,107 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.define-property.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
+
|
|
9
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
|
+
|
|
11
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
12
|
|
|
5
13
|
Object.defineProperty(exports, "__esModule", {
|
|
6
14
|
value: true
|
|
7
15
|
});
|
|
8
16
|
exports["default"] = exports.PanoTVVideoPlugin = void 0;
|
|
9
17
|
|
|
10
|
-
var
|
|
18
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
19
|
|
|
12
|
-
|
|
20
|
+
require("core-js/modules/es.object.to-string.js");
|
|
13
21
|
|
|
14
|
-
|
|
22
|
+
require("core-js/modules/es.promise.js");
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
require("core-js/modules/es.array.iterator.js");
|
|
25
|
+
|
|
26
|
+
require("core-js/modules/es.string.iterator.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/web.url.js");
|
|
31
|
+
|
|
32
|
+
require("core-js/modules/web.url-search-params.js");
|
|
33
|
+
|
|
34
|
+
require("core-js/modules/es.object.assign.js");
|
|
35
|
+
|
|
36
|
+
require("core-js/modules/es.array.map.js");
|
|
37
|
+
|
|
38
|
+
require("core-js/modules/es.array.for-each.js");
|
|
39
|
+
|
|
40
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
41
|
+
|
|
42
|
+
require("core-js/modules/es.array-buffer.slice.js");
|
|
43
|
+
|
|
44
|
+
require("core-js/modules/es.typed-array.float32-array.js");
|
|
45
|
+
|
|
46
|
+
require("core-js/modules/es.typed-array.copy-within.js");
|
|
47
|
+
|
|
48
|
+
require("core-js/modules/es.typed-array.every.js");
|
|
49
|
+
|
|
50
|
+
require("core-js/modules/es.typed-array.fill.js");
|
|
51
|
+
|
|
52
|
+
require("core-js/modules/es.typed-array.filter.js");
|
|
53
|
+
|
|
54
|
+
require("core-js/modules/es.typed-array.find.js");
|
|
55
|
+
|
|
56
|
+
require("core-js/modules/es.typed-array.find-index.js");
|
|
57
|
+
|
|
58
|
+
require("core-js/modules/es.typed-array.for-each.js");
|
|
59
|
+
|
|
60
|
+
require("core-js/modules/es.typed-array.includes.js");
|
|
61
|
+
|
|
62
|
+
require("core-js/modules/es.typed-array.index-of.js");
|
|
63
|
+
|
|
64
|
+
require("core-js/modules/es.typed-array.iterator.js");
|
|
65
|
+
|
|
66
|
+
require("core-js/modules/es.typed-array.join.js");
|
|
17
67
|
|
|
18
|
-
|
|
68
|
+
require("core-js/modules/es.typed-array.last-index-of.js");
|
|
19
69
|
|
|
20
|
-
|
|
70
|
+
require("core-js/modules/es.typed-array.map.js");
|
|
21
71
|
|
|
22
|
-
|
|
72
|
+
require("core-js/modules/es.typed-array.reduce.js");
|
|
23
73
|
|
|
24
|
-
|
|
74
|
+
require("core-js/modules/es.typed-array.reduce-right.js");
|
|
25
75
|
|
|
26
|
-
|
|
76
|
+
require("core-js/modules/es.typed-array.reverse.js");
|
|
27
77
|
|
|
28
|
-
|
|
78
|
+
require("core-js/modules/es.typed-array.set.js");
|
|
79
|
+
|
|
80
|
+
require("core-js/modules/es.typed-array.slice.js");
|
|
81
|
+
|
|
82
|
+
require("core-js/modules/es.typed-array.some.js");
|
|
83
|
+
|
|
84
|
+
require("core-js/modules/es.typed-array.sort.js");
|
|
85
|
+
|
|
86
|
+
require("core-js/modules/es.typed-array.subarray.js");
|
|
87
|
+
|
|
88
|
+
require("core-js/modules/es.typed-array.to-locale-string.js");
|
|
89
|
+
|
|
90
|
+
require("core-js/modules/es.typed-array.to-string.js");
|
|
91
|
+
|
|
92
|
+
require("core-js/modules/es.typed-array.uint32-array.js");
|
|
93
|
+
|
|
94
|
+
require("core-js/modules/es.function.name.js");
|
|
95
|
+
|
|
96
|
+
require("core-js/modules/es.array.concat.js");
|
|
97
|
+
|
|
98
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
99
|
+
|
|
100
|
+
var _five = require("@realsee/five");
|
|
101
|
+
|
|
102
|
+
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); }
|
|
103
|
+
|
|
104
|
+
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; }
|
|
29
105
|
|
|
30
106
|
var PanoTVVideoPlugin = function PanoTVVideoPlugin(five, parameters) {
|
|
31
107
|
var state = {
|
|
@@ -39,7 +115,7 @@ var PanoTVVideoPlugin = function PanoTVVideoPlugin(five, parameters) {
|
|
|
39
115
|
};
|
|
40
116
|
var videoMeshes = [];
|
|
41
117
|
|
|
42
|
-
var
|
|
118
|
+
var createImageTexture = function createImageTexture(source) {
|
|
43
119
|
var texture = new THREE.TextureLoader().load(source);
|
|
44
120
|
texture.minFilter = THREE.LinearFilter;
|
|
45
121
|
texture.magFilter = THREE.LinearFilter;
|
|
@@ -47,7 +123,7 @@ var PanoTVVideoPlugin = function PanoTVVideoPlugin(five, parameters) {
|
|
|
47
123
|
return texture;
|
|
48
124
|
};
|
|
49
125
|
|
|
50
|
-
var
|
|
126
|
+
var createVideoTexture = function createVideoTexture(source, video) {
|
|
51
127
|
return new Promise(function (resolve, reject) {
|
|
52
128
|
var xhr = new XMLHttpRequest();
|
|
53
129
|
|
|
@@ -85,6 +161,10 @@ var PanoTVVideoPlugin = function PanoTVVideoPlugin(five, parameters) {
|
|
|
85
161
|
});
|
|
86
162
|
};
|
|
87
163
|
|
|
164
|
+
var getVideoTexture = function getVideoTexture() {
|
|
165
|
+
return state.videoTexture;
|
|
166
|
+
};
|
|
167
|
+
|
|
88
168
|
var getPoints = function getPoints(panoIndex) {
|
|
89
169
|
if (!state.rectPoints) return [];
|
|
90
170
|
var rectPoints_ = state.rectPoints[panoIndex];
|
|
@@ -198,14 +278,14 @@ var PanoTVVideoPlugin = function PanoTVVideoPlugin(five, parameters) {
|
|
|
198
278
|
points = data.points;
|
|
199
279
|
state.videoSource = video_src;
|
|
200
280
|
state.rectPoints = points;
|
|
201
|
-
state.imageTexture =
|
|
281
|
+
state.imageTexture = createImageTexture(video_poster_src);
|
|
202
282
|
if (videoElement) state.videoElement = videoElement;
|
|
203
283
|
var panoIndex = five.state.panoIndex;
|
|
204
284
|
var meshes = videoMeshes[panoIndex] = createPanoVideoMeshes(panoIndex);
|
|
205
285
|
meshes.forEach(function (mesh) {
|
|
206
286
|
return five.scene.add(mesh);
|
|
207
287
|
});
|
|
208
|
-
|
|
288
|
+
createVideoTexture(state.videoSource, state.videoElement).then(function (videoTexture_) {
|
|
209
289
|
if (videoTexture_.videoSource !== state.videoSource) return;
|
|
210
290
|
state.videoTexture = videoTexture_;
|
|
211
291
|
|
|
@@ -294,22 +374,23 @@ var PanoTVVideoPlugin = function PanoTVVideoPlugin(five, parameters) {
|
|
|
294
374
|
five.on('modeChange', function (mode) {
|
|
295
375
|
if (!state.enabled) return;
|
|
296
376
|
if (mode === _five.Five.Mode.Panorama) return;
|
|
297
|
-
videoMeshes.forEach(function (
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
377
|
+
videoMeshes.forEach(function (meshes, index) {
|
|
378
|
+
if (meshes) {
|
|
379
|
+
meshes.forEach(function (mesh) {
|
|
380
|
+
mesh.geometry.dispose();
|
|
381
|
+
mesh.material.dispose();
|
|
382
|
+
five.scene.remove(mesh);
|
|
383
|
+
});
|
|
384
|
+
videoMeshes[index] = undefined;
|
|
385
|
+
if (state.videoTexture) state.videoTexture.image.pause();
|
|
386
|
+
}
|
|
306
387
|
});
|
|
307
388
|
});
|
|
308
389
|
five.on('wantsTapGesture', function (raycaster) {
|
|
309
390
|
if (!state.enabled) return;
|
|
310
391
|
var meshArray = [];
|
|
311
392
|
videoMeshes.forEach(function (meshes) {
|
|
312
|
-
if (meshes) meshArray.push.apply(meshArray,
|
|
393
|
+
if (meshes) meshArray.push.apply(meshArray, (0, _toConsumableArray2["default"])(meshes));
|
|
313
394
|
});
|
|
314
395
|
|
|
315
396
|
if (raycaster.intersectObjects(meshArray).length) {
|
|
@@ -342,7 +423,8 @@ var PanoTVVideoPlugin = function PanoTVVideoPlugin(five, parameters) {
|
|
|
342
423
|
return {
|
|
343
424
|
enable: enable,
|
|
344
425
|
disable: disable,
|
|
345
|
-
load: load
|
|
426
|
+
load: load,
|
|
427
|
+
getVideoTexture: getVideoTexture
|
|
346
428
|
};
|
|
347
429
|
};
|
|
348
430
|
|
|
@@ -1,81 +1,92 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.define-property.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
+
|
|
9
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
|
+
|
|
11
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
12
|
|
|
5
13
|
Object.defineProperty(exports, "__esModule", {
|
|
6
14
|
value: true
|
|
7
15
|
});
|
|
8
16
|
exports.TreasurePluginController = void 0;
|
|
9
17
|
|
|
10
|
-
var
|
|
18
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _isNil = require("../../shared-utils/isNil");
|
|
20
|
+
require("core-js/modules/es.array.for-each.js");
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
require("core-js/modules/es.object.values.js");
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
require("core-js/modules/es.function.name.js");
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
require("core-js/modules/es.array.iterator.js");
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
require("core-js/modules/es.object.to-string.js");
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
require("core-js/modules/es.promise.js");
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
require("core-js/modules/es.string.iterator.js");
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
require("core-js/modules/es.array.map.js");
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
require("core-js/modules/es.array.filter.js");
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
require("core-js/modules/es.array.find.js");
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
require("core-js/modules/es.array.find-index.js");
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
require("core-js/modules/es.array.slice.js");
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
49
55
|
|
|
50
|
-
|
|
56
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
var _five = require("@realsee/five");
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
var _isNil = require("../../shared-utils/isNil");
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
var _constants = require("./constants");
|
|
61
67
|
|
|
62
|
-
|
|
68
|
+
var _TreasureObject = require("./TreasureObject");
|
|
63
69
|
|
|
64
|
-
var
|
|
65
|
-
function TreasurePluginController(five) {
|
|
66
|
-
var _this = this;
|
|
70
|
+
var _getTextureLoader = require("../../shared-utils/three/getTextureLoader");
|
|
67
71
|
|
|
68
|
-
|
|
72
|
+
var _getExtraModelLoader = require("../../shared-utils/three/getExtraModelLoader");
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
var _to = _interopRequireDefault(require("../../shared-utils/to"));
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
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); }
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
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; }
|
|
75
79
|
|
|
76
|
-
|
|
80
|
+
var TreasurePluginController = /*#__PURE__*/function () {
|
|
81
|
+
function TreasurePluginController(five) {
|
|
82
|
+
var _this = this;
|
|
77
83
|
|
|
78
|
-
|
|
84
|
+
(0, _classCallCheck2["default"])(this, TreasurePluginController);
|
|
85
|
+
(0, _defineProperty2["default"])(this, "hooks", new _five.Subscribe());
|
|
86
|
+
(0, _defineProperty2["default"])(this, "treasures", []);
|
|
87
|
+
(0, _defineProperty2["default"])(this, "textureLoader", (0, _getTextureLoader.getTextureLoader)());
|
|
88
|
+
(0, _defineProperty2["default"])(this, "modelLoader", (0, _getExtraModelLoader.getExtraModelLoader)());
|
|
89
|
+
(0, _defineProperty2["default"])(this, "dispose", function () {
|
|
79
90
|
_this.modelLoader.dispose();
|
|
80
91
|
|
|
81
92
|
_this.textureLoader.dispose();
|
|
@@ -86,14 +97,12 @@ var TreasurePluginController = /*#__PURE__*/function () {
|
|
|
86
97
|
return treasure.dispose();
|
|
87
98
|
});
|
|
88
99
|
});
|
|
89
|
-
|
|
90
|
-
_defineProperty(this, "onTreasureClick", function (id) {
|
|
100
|
+
(0, _defineProperty2["default"])(this, "onTreasureClick", function (id) {
|
|
91
101
|
_this.hooks.emit('tap', {
|
|
92
102
|
id: id
|
|
93
103
|
});
|
|
94
104
|
});
|
|
95
|
-
|
|
96
|
-
_defineProperty(this, "getTreasureObjectParams", function (data) {
|
|
105
|
+
(0, _defineProperty2["default"])(this, "getTreasureObjectParams", function (data) {
|
|
97
106
|
var config = _this.getConfig(data);
|
|
98
107
|
|
|
99
108
|
var position = new THREE.Vector3().fromArray(Object.values(data.position));
|
|
@@ -108,13 +117,11 @@ var TreasurePluginController = /*#__PURE__*/function () {
|
|
|
108
117
|
onOpenAnimationEnded: _this.onTreasureOpenAnimationEnded
|
|
109
118
|
};
|
|
110
119
|
});
|
|
111
|
-
|
|
112
|
-
_defineProperty(this, "onTreasureOpenAnimationEnded", function (id) {
|
|
120
|
+
(0, _defineProperty2["default"])(this, "onTreasureOpenAnimationEnded", function (id) {
|
|
113
121
|
_this.hooks.emit('openAnimationEnded', {
|
|
114
122
|
id: id
|
|
115
123
|
});
|
|
116
124
|
});
|
|
117
|
-
|
|
118
125
|
this.five = five; // ========== self group ==========
|
|
119
126
|
|
|
120
127
|
this.selfGroup = new THREE.Group();
|
|
@@ -123,15 +130,15 @@ var TreasurePluginController = /*#__PURE__*/function () {
|
|
|
123
130
|
this.five.once('dispose', this.dispose);
|
|
124
131
|
}
|
|
125
132
|
|
|
126
|
-
|
|
133
|
+
(0, _createClass2["default"])(TreasurePluginController, [{
|
|
127
134
|
key: "load",
|
|
128
135
|
value: function () {
|
|
129
|
-
var _load =
|
|
136
|
+
var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data, options) {
|
|
130
137
|
var _this$treasures;
|
|
131
138
|
|
|
132
139
|
var _yield$to, _yield$to2, error, treasures, appendTreasuresAfterLoaded, _this$selfGroup;
|
|
133
140
|
|
|
134
|
-
return
|
|
141
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
135
142
|
while (1) {
|
|
136
143
|
switch (_context.prev = _context.next) {
|
|
137
144
|
case 0:
|
|
@@ -142,7 +149,7 @@ var TreasurePluginController = /*#__PURE__*/function () {
|
|
|
142
149
|
|
|
143
150
|
case 2:
|
|
144
151
|
_yield$to = _context.sent;
|
|
145
|
-
_yield$to2 =
|
|
152
|
+
_yield$to2 = (0, _slicedToArray2["default"])(_yield$to, 2);
|
|
146
153
|
error = _yield$to2[0];
|
|
147
154
|
treasures = _yield$to2[1];
|
|
148
155
|
|
|
@@ -154,12 +161,12 @@ var TreasurePluginController = /*#__PURE__*/function () {
|
|
|
154
161
|
throw error;
|
|
155
162
|
|
|
156
163
|
case 8:
|
|
157
|
-
(_this$treasures = this.treasures).push.apply(_this$treasures,
|
|
164
|
+
(_this$treasures = this.treasures).push.apply(_this$treasures, (0, _toConsumableArray2["default"])(treasures));
|
|
158
165
|
|
|
159
166
|
appendTreasuresAfterLoaded = (options === null || options === void 0 ? void 0 : options.appendTreasuresAfterLoaded) || true;
|
|
160
167
|
|
|
161
168
|
if (appendTreasuresAfterLoaded) {
|
|
162
|
-
(_this$selfGroup = this.selfGroup).add.apply(_this$selfGroup,
|
|
169
|
+
(_this$selfGroup = this.selfGroup).add.apply(_this$selfGroup, (0, _toConsumableArray2["default"])(treasures));
|
|
163
170
|
|
|
164
171
|
this.five.needsRender = true;
|
|
165
172
|
}
|
|
@@ -237,7 +244,6 @@ var TreasurePluginController = /*#__PURE__*/function () {
|
|
|
237
244
|
};
|
|
238
245
|
}
|
|
239
246
|
}]);
|
|
240
|
-
|
|
241
247
|
return TreasurePluginController;
|
|
242
248
|
}();
|
|
243
249
|
|
|
@@ -1,43 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.define-property.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
+
|
|
9
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
|
+
|
|
11
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
12
|
|
|
5
13
|
Object.defineProperty(exports, "__esModule", {
|
|
6
14
|
value: true
|
|
7
15
|
});
|
|
8
16
|
exports.TreasureFaceAnime = void 0;
|
|
9
17
|
|
|
10
|
-
var
|
|
18
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
19
|
|
|
12
|
-
|
|
20
|
+
require("core-js/modules/web.timers.js");
|
|
13
21
|
|
|
14
|
-
|
|
22
|
+
require("core-js/modules/es.array.map.js");
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
require("core-js/modules/es.array.iterator.js");
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
require("core-js/modules/es.object.to-string.js");
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
require("core-js/modules/es.promise.js");
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
require("core-js/modules/es.string.iterator.js");
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
27
35
|
|
|
28
|
-
var
|
|
29
|
-
function TreasureFaceAnime(params) {
|
|
30
|
-
var _this = this;
|
|
36
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
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); }
|
|
45
|
+
|
|
46
|
+
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; }
|
|
47
|
+
|
|
48
|
+
var TreasureFaceAnime = /*#__PURE__*/function () {
|
|
49
|
+
function TreasureFaceAnime(params) {
|
|
50
|
+
var _this = this;
|
|
51
|
+
|
|
52
|
+
(0, _classCallCheck2["default"])(this, TreasureFaceAnime);
|
|
53
|
+
(0, _defineProperty2["default"])(this, "paused", true);
|
|
54
|
+
(0, _defineProperty2["default"])(this, "faceAnimeStep", 0);
|
|
55
|
+
(0, _defineProperty2["default"])(this, "play", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
39
56
|
var faceMaterial, faceTextures;
|
|
40
|
-
return
|
|
57
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
41
58
|
while (1) {
|
|
42
59
|
switch (_context.prev = _context.next) {
|
|
43
60
|
case 0:
|
|
@@ -84,7 +101,6 @@ var TreasureFaceAnime = /*#__PURE__*/function () {
|
|
|
84
101
|
}
|
|
85
102
|
}, _callee);
|
|
86
103
|
})));
|
|
87
|
-
|
|
88
104
|
this.five = params.five;
|
|
89
105
|
this.treasureGroup = params.treasureGroup;
|
|
90
106
|
this.faceTexturesPromise = Promise.all(params.textureUrls.map(params.loadTexture));
|
|
@@ -95,7 +111,7 @@ var TreasureFaceAnime = /*#__PURE__*/function () {
|
|
|
95
111
|
this.initialFaceTexture.encoding = THREE.sRGBEncoding;
|
|
96
112
|
}
|
|
97
113
|
|
|
98
|
-
|
|
114
|
+
(0, _createClass2["default"])(TreasureFaceAnime, [{
|
|
99
115
|
key: "pause",
|
|
100
116
|
value: function pause() {
|
|
101
117
|
this.paused = true;
|
|
@@ -121,7 +137,6 @@ var TreasureFaceAnime = /*#__PURE__*/function () {
|
|
|
121
137
|
this.faceAnimeTimer = void 0;
|
|
122
138
|
}
|
|
123
139
|
}]);
|
|
124
|
-
|
|
125
140
|
return TreasureFaceAnime;
|
|
126
141
|
}();
|
|
127
142
|
|