@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,68 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.reflect.construct.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
7
23
|
});
|
|
8
24
|
exports.TreasureObject = void 0;
|
|
9
25
|
|
|
10
|
-
var
|
|
26
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
27
|
|
|
12
|
-
var
|
|
28
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
29
|
|
|
14
|
-
var
|
|
30
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
31
|
|
|
16
|
-
var
|
|
32
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
33
|
|
|
18
|
-
var
|
|
34
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
19
35
|
|
|
20
|
-
var
|
|
36
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
21
37
|
|
|
22
|
-
|
|
38
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
23
39
|
|
|
24
|
-
|
|
40
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
25
41
|
|
|
26
|
-
|
|
42
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
27
43
|
|
|
28
|
-
|
|
44
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
45
|
|
|
30
|
-
|
|
46
|
+
require("core-js/modules/es.array.map.js");
|
|
31
47
|
|
|
32
|
-
|
|
48
|
+
require("core-js/modules/es.object.to-string.js");
|
|
33
49
|
|
|
34
|
-
|
|
50
|
+
require("core-js/modules/es.promise.js");
|
|
35
51
|
|
|
36
|
-
|
|
52
|
+
require("core-js/modules/es.array.for-each.js");
|
|
37
53
|
|
|
38
|
-
|
|
54
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
require("core-js/modules/es.string.sub.js");
|
|
41
57
|
|
|
42
|
-
|
|
58
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
var TWEEN = _interopRequireWildcard(require("@tweenjs/tween.js"));
|
|
45
61
|
|
|
46
|
-
|
|
62
|
+
var _TreasureFaceAnime = require("./TreasureFaceAnime");
|
|
47
63
|
|
|
48
|
-
|
|
64
|
+
var _TreasureOpenAnime = require("./TreasureOpenAnime");
|
|
49
65
|
|
|
50
|
-
|
|
66
|
+
var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
|
|
51
67
|
|
|
52
|
-
|
|
68
|
+
var _to = _interopRequireDefault(require("../../shared-utils/to"));
|
|
53
69
|
|
|
54
|
-
function
|
|
70
|
+
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); }
|
|
55
71
|
|
|
56
|
-
function
|
|
72
|
+
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; }
|
|
57
73
|
|
|
58
|
-
function
|
|
74
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
59
75
|
|
|
60
76
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
61
77
|
|
|
62
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
63
|
-
|
|
64
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
65
|
-
|
|
66
78
|
function copyMaterial(orginMatrial) {
|
|
67
79
|
var material = new THREE.MeshBasicMaterial({
|
|
68
80
|
map: orginMatrial.map,
|
|
@@ -73,30 +85,25 @@ function copyMaterial(orginMatrial) {
|
|
|
73
85
|
}
|
|
74
86
|
|
|
75
87
|
var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
76
|
-
|
|
88
|
+
(0, _inherits2["default"])(TreasureObject, _THREE$Object3D);
|
|
77
89
|
|
|
78
90
|
var _super = _createSuper(TreasureObject);
|
|
79
91
|
|
|
80
92
|
function TreasureObject(params) {
|
|
81
93
|
var _this;
|
|
82
94
|
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
(0, _classCallCheck2["default"])(this, TreasureObject);
|
|
85
96
|
_this = _super.call(this);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
_defineProperty(_assertThisInitialized(_this), "opened", false);
|
|
90
|
-
|
|
91
|
-
_defineProperty(_assertThisInitialized(_this), "modelGroupPromise", Promise.resolve({
|
|
97
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "name", 'treasureObject');
|
|
98
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "opened", false);
|
|
99
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "modelGroupPromise", Promise.resolve({
|
|
92
100
|
modelGroup: new THREE.Group(),
|
|
93
101
|
originGroup: new THREE.Group()
|
|
94
102
|
}));
|
|
95
|
-
|
|
96
|
-
_defineProperty(_assertThisInitialized(_this), "onFiveWantsTapGesture", function (raycaster) {
|
|
103
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onFiveWantsTapGesture", function (raycaster) {
|
|
97
104
|
var _this$params$clickCal, _this$params;
|
|
98
105
|
|
|
99
|
-
var intersects = raycaster.intersectObject(
|
|
106
|
+
var intersects = raycaster.intersectObject((0, _assertThisInitialized2["default"])(_this), true);
|
|
100
107
|
var isClickTreasure = !!intersects && intersects.length > 0;
|
|
101
108
|
if (!isClickTreasure) return;
|
|
102
109
|
(_this$params$clickCal = (_this$params = _this.params).clickCallback) === null || _this$params$clickCal === void 0 ? void 0 : _this$params$clickCal.call(_this$params, _this.treasureID);
|
|
@@ -107,11 +114,9 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
107
114
|
|
|
108
115
|
return false;
|
|
109
116
|
});
|
|
110
|
-
|
|
111
|
-
_defineProperty(_assertThisInitialized(_this), "onFivePanoArrived", function () {
|
|
117
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onFivePanoArrived", function () {
|
|
112
118
|
if (_this.position.distanceTo(_this.five.camera.position) < 3) _this.rotateToCamera();
|
|
113
119
|
});
|
|
114
|
-
|
|
115
120
|
_this.params = params;
|
|
116
121
|
_this.five = params.five;
|
|
117
122
|
_this.treasureID = params.id;
|
|
@@ -125,15 +130,15 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
125
130
|
return _this;
|
|
126
131
|
}
|
|
127
132
|
|
|
128
|
-
|
|
133
|
+
(0, _createClass2["default"])(TreasureObject, [{
|
|
129
134
|
key: "load",
|
|
130
135
|
value: function () {
|
|
131
|
-
var _load =
|
|
136
|
+
var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
132
137
|
var _this2 = this;
|
|
133
138
|
|
|
134
139
|
var _yield$this$modelGrou, modelGroup, originGroup;
|
|
135
140
|
|
|
136
|
-
return
|
|
141
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
137
142
|
while (1) {
|
|
138
143
|
switch (_context.prev = _context.next) {
|
|
139
144
|
case 0:
|
|
@@ -188,13 +193,13 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
188
193
|
}, {
|
|
189
194
|
key: "show",
|
|
190
195
|
value: function () {
|
|
191
|
-
var _show =
|
|
196
|
+
var _show = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params) {
|
|
192
197
|
var _params$duration,
|
|
193
198
|
_this3 = this;
|
|
194
199
|
|
|
195
200
|
var _yield$this$modelGrou2, modelGroup;
|
|
196
201
|
|
|
197
|
-
return
|
|
202
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
198
203
|
while (1) {
|
|
199
204
|
switch (_context2.prev = _context2.next) {
|
|
200
205
|
case 0:
|
|
@@ -231,13 +236,13 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
231
236
|
}, {
|
|
232
237
|
key: "hide",
|
|
233
238
|
value: function () {
|
|
234
|
-
var _hide =
|
|
239
|
+
var _hide = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(params) {
|
|
235
240
|
var _params$duration2,
|
|
236
241
|
_this4 = this;
|
|
237
242
|
|
|
238
243
|
var _yield$this$modelGrou3, modelGroup;
|
|
239
244
|
|
|
240
|
-
return
|
|
245
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
241
246
|
while (1) {
|
|
242
247
|
switch (_context3.prev = _context3.next) {
|
|
243
248
|
case 0:
|
|
@@ -328,10 +333,10 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
328
333
|
}, {
|
|
329
334
|
key: "getModelPromise",
|
|
330
335
|
value: function () {
|
|
331
|
-
var _getModelPromise =
|
|
336
|
+
var _getModelPromise = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
332
337
|
var originGroup, modelGroup, _yield$to, _yield$to2, boxTextureError, boxTexture;
|
|
333
338
|
|
|
334
|
-
return
|
|
339
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
335
340
|
while (1) {
|
|
336
341
|
switch (_context4.prev = _context4.next) {
|
|
337
342
|
case 0:
|
|
@@ -358,7 +363,7 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
358
363
|
|
|
359
364
|
case 8:
|
|
360
365
|
_yield$to = _context4.sent;
|
|
361
|
-
_yield$to2 =
|
|
366
|
+
_yield$to2 = (0, _slicedToArray2["default"])(_yield$to, 2);
|
|
362
367
|
boxTextureError = _yield$to2[0];
|
|
363
368
|
boxTexture = _yield$to2[1];
|
|
364
369
|
|
|
@@ -395,7 +400,6 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
395
400
|
return getModelPromise;
|
|
396
401
|
}()
|
|
397
402
|
}]);
|
|
398
|
-
|
|
399
403
|
return TreasureObject;
|
|
400
404
|
}(THREE.Object3D);
|
|
401
405
|
|
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
7
23
|
});
|
|
8
24
|
exports.TreasurePluginOpenAnime = void 0;
|
|
9
25
|
|
|
26
|
+
require("core-js/modules/es.array.filter.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.array.index-of.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.function.name.js");
|
|
31
|
+
|
|
32
|
+
require("core-js/modules/es.array.for-each.js");
|
|
33
|
+
|
|
34
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
35
|
+
|
|
36
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
37
|
+
|
|
38
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
39
|
+
|
|
40
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
41
|
+
|
|
10
42
|
var THREE = _interopRequireWildcard(require("three"));
|
|
11
43
|
|
|
12
44
|
var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
|
|
@@ -17,14 +49,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
49
|
|
|
18
50
|
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; }
|
|
19
51
|
|
|
20
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
-
|
|
22
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
|
-
|
|
24
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
25
|
-
|
|
26
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
-
|
|
28
52
|
/** 打开宝箱的动画实例
|
|
29
53
|
* @description
|
|
30
54
|
* 因为宝箱没有关闭的场景,对于一个宝箱来讲,打开后,要么销毁,要么保留当时的状态。所以不做关闭方面的兼容处理
|
|
@@ -33,13 +57,10 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
33
57
|
function TreasurePluginOpenAnime(params) {
|
|
34
58
|
var _this = this;
|
|
35
59
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_defineProperty(this, "clock", new THREE.Clock());
|
|
41
|
-
|
|
42
|
-
_defineProperty(this, "onPlayFinished", function () {
|
|
60
|
+
(0, _classCallCheck2["default"])(this, TreasurePluginOpenAnime);
|
|
61
|
+
(0, _defineProperty2["default"])(this, "hasPlayed", false);
|
|
62
|
+
(0, _defineProperty2["default"])(this, "clock", new THREE.Clock());
|
|
63
|
+
(0, _defineProperty2["default"])(this, "onPlayFinished", function () {
|
|
43
64
|
var _this$animationDispos;
|
|
44
65
|
|
|
45
66
|
// 销毁打开盒子动画的定时任务
|
|
@@ -63,7 +84,6 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
63
84
|
return (_this$params$onComple = (_this$params = _this.params).onComplete) === null || _this$params$onComple === void 0 ? void 0 : _this$params$onComple.call(_this$params);
|
|
64
85
|
});
|
|
65
86
|
});
|
|
66
|
-
|
|
67
87
|
this.five = params.five;
|
|
68
88
|
this.params = params;
|
|
69
89
|
this.treasureGroup = params.treasureGroup;
|
|
@@ -73,7 +93,7 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
73
93
|
this.action.clampWhenFinished = true;
|
|
74
94
|
}
|
|
75
95
|
|
|
76
|
-
|
|
96
|
+
(0, _createClass2["default"])(TreasurePluginOpenAnime, [{
|
|
77
97
|
key: "dispose",
|
|
78
98
|
value: function dispose() {
|
|
79
99
|
var _this$animationDispos2;
|
|
@@ -101,7 +121,6 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
101
121
|
return true;
|
|
102
122
|
}
|
|
103
123
|
}]);
|
|
104
|
-
|
|
105
124
|
return TreasurePluginOpenAnime;
|
|
106
125
|
}();
|
|
107
126
|
|