@realsee/dnalogel 0.1.0 → 0.1.4
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/data/8054djM0oR6ky3Ey8e.d.ts +55 -0
- package/data/8054djM0oR6ky3Ey8e.js +348 -0
- package/data/PrXel3aqGbp34JQn.js +10 -2
- package/data/XJ6NMLWnkAY3Rdx8.d.ts +843 -0
- package/data/XJ6NMLWnkAY3Rdx8.js +7987 -0
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +85 -0
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +509 -0
- package/data/vLykj3NWrllMrG06.d.ts +2 -0
- package/data/vLykj3NWrllMrG06.js +197 -2
- package/data/zxMawr9raSg8LYjG.d.ts +53 -0
- package/data/zxMawr9raSg8LYjG.js +588 -0
- package/package.json +3 -3
- package/plugins/AutoPreloadPlugin/index.d.ts +23 -0
- package/plugins/AutoPreloadPlugin/index.js +85 -0
- package/plugins/CSS3DRenderPlugin/index.d.ts +11 -11
- package/plugins/CSS3DRenderPlugin/index.js +170 -120
- package/plugins/ModelChassisCompassPlugin/index.d.ts +7 -3
- package/plugins/ModelChassisCompassPlugin/index.js +13 -26
- package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +13 -1
- package/plugins/ModelEntryDoorGuidePlugin/index.js +212 -2
- package/plugins/ModelRoomLabelPlugin/Controller.d.ts +35 -0
- package/plugins/ModelRoomLabelPlugin/Controller.js +147 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +8 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +48 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +7 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +149 -0
- package/plugins/ModelRoomLabelPlugin/index.d.ts +8 -0
- package/plugins/ModelRoomLabelPlugin/index.js +16 -0
- package/plugins/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/plugins/ModelRoomLabelPlugin/typings.js +5 -0
- package/plugins/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/plugins/ModelRoomLabelPlugin/utils/parseData.js +29 -0
- package/plugins/PanoMaskSelectorPlugin/compare.d.ts +1 -0
- package/plugins/PanoMaskSelectorPlugin/compare.js +15 -0
- package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +7 -0
- package/plugins/PanoMaskSelectorPlugin/createBox.js +61 -0
- package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +3 -0
- package/plugins/PanoMaskSelectorPlugin/createTextures.js +29 -0
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +1 -0
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +8 -0
- package/plugins/PanoMaskSelectorPlugin/index.d.ts +49 -0
- package/plugins/PanoMaskSelectorPlugin/index.js +272 -0
- package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +1 -0
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +8 -0
- package/plugins/TreasurePlugin/Controller.d.ts +53 -12
- package/plugins/TreasurePlugin/Controller.js +129 -60
- package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +8 -6
- package/plugins/TreasurePlugin/TreasureFaceAnime.js +4 -4
- package/plugins/TreasurePlugin/TreasureObject.d.ts +30 -12
- package/plugins/TreasurePlugin/TreasureObject.js +269 -53
- package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +4 -2
- package/plugins/TreasurePlugin/TreasureOpenAnime.js +10 -5
- package/plugins/TreasurePlugin/constants.d.ts +32 -11
- package/plugins/TreasurePlugin/constants.js +52 -17
- package/plugins/TreasurePlugin/index.d.ts +5 -5
- package/plugins/TreasurePlugin/index.js +8 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +4 -2
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +2 -1
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +5 -2
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +1 -1
- package/plugins/floorplan/typings/floorplanData.d.ts +5 -1
- package/plugins/floorplan/utils/formatData.js +1 -22
- package/plugins/floorplan/utils/formatPosition.d.ts +4 -4
- package/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/shared-utils/createCanvasTextTexture.js +29 -0
- package/shared-utils/isNil.d.ts +10 -0
- package/shared-utils/isNil.js +24 -0
- package/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/shared-utils/three/getExtraModelLoader.js +31 -0
- package/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/shared-utils/three/getTextureLoader.js +34 -0
- package/shared-utils/three/loadFbxObj.d.ts +1 -2
- package/shared-utils/three/loadFbxObj.js +6 -2
- package/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/shared-utils/three/{vecror3.js → transformPositionToVector3.js} +2 -2
- package/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/shared-utils/three/transfromToMeshBasicMaterial.js +27 -0
- package/shared-utils/to.d.ts +0 -1
- package/shared-utils/to.js +45 -7
- package/typedoc/plugins.d.ts +3 -1
- package/typedoc/plugins.js +63 -13
- package/typedoc/typings.d.ts +1 -1
- package/typings/math.type.d.ts +2 -2
- package/data/wYnRjQ4KZoV1yPoG.d.ts +0 -114
- package/data/wYnRjQ4KZoV1yPoG.js +0 -512
- package/plugins/PanoCursorRaycasterPlugin/utils/vecror3.d.ts +0 -7
- package/plugins/PanoCursorRaycasterPlugin/utils/vecror3.js +0 -18
- package/plugins/TreasurePlugin/treasureDataMap.d.ts +0 -7
- package/plugins/TreasurePlugin/treasureDataMap.js +0 -20
- package/plugins/TreasurePlugin/utils/loadTreasureTextures.d.ts +0 -7
- package/plugins/TreasurePlugin/utils/loadTreasureTextures.js +0 -115
- package/shared-utils/three/vecror3.d.ts +0 -7
|
@@ -38,7 +38,7 @@ var _default = /*#__PURE__*/React.memo(function Main(props) {
|
|
|
38
38
|
if (opacity.toString() === oldOpacity) return;
|
|
39
39
|
|
|
40
40
|
if (props.duration === 0) {
|
|
41
|
-
mainRef.current.style.transition = '
|
|
41
|
+
mainRef.current.style.transition = 'none';
|
|
42
42
|
mainRef.current.style.opacity = opacity.toString();
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
@@ -104,7 +104,11 @@ export interface FloorplanData {
|
|
|
104
104
|
/** 能够映射到雷达图上的三维物体 */
|
|
105
105
|
export interface FloorplanExtraObject3D {
|
|
106
106
|
id: string;
|
|
107
|
-
position:
|
|
107
|
+
position: {
|
|
108
|
+
x: number;
|
|
109
|
+
y: number;
|
|
110
|
+
z: number;
|
|
111
|
+
};
|
|
108
112
|
icon?: {
|
|
109
113
|
url: string;
|
|
110
114
|
width: number;
|
|
@@ -10,18 +10,6 @@ var _floorplanExtraObject = require("../Assets/floorplanExtraObject");
|
|
|
10
10
|
|
|
11
11
|
var _formatPosition = require("./formatPosition");
|
|
12
12
|
|
|
13
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
-
|
|
15
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
|
|
17
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
-
|
|
19
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
20
|
-
|
|
21
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
22
|
-
|
|
23
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
-
|
|
25
13
|
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); } }
|
|
26
14
|
|
|
27
15
|
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); }); }; }
|
|
@@ -190,16 +178,7 @@ function _formatData() {
|
|
|
190
178
|
|
|
191
179
|
function formatExtraObjects(data, five, floorplanData) {
|
|
192
180
|
var extraObjects = data.map(function (object) {
|
|
193
|
-
var
|
|
194
|
-
x = _object$position[0],
|
|
195
|
-
y = _object$position[1],
|
|
196
|
-
z = _object$position[2];
|
|
197
|
-
|
|
198
|
-
var position = {
|
|
199
|
-
x: x,
|
|
200
|
-
y: y,
|
|
201
|
-
z: z
|
|
202
|
-
};
|
|
181
|
+
var position = object.position;
|
|
203
182
|
var icon = object.icon ? object.icon : {
|
|
204
183
|
url: _floorplanExtraObject.FLOORPLANE_EXTRA_OBJECT_IMAGE,
|
|
205
184
|
width: 45,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Five } from '@realsee/five';
|
|
2
|
-
import {
|
|
2
|
+
import { Vector2Position } from '../../../typings/math.type';
|
|
3
3
|
import { FloorplanData } from '../typings/floorplanData';
|
|
4
4
|
import { FloorplanBounding } from '../typings/floorplanData';
|
|
5
|
-
export declare function pathD(points:
|
|
5
|
+
export declare function pathD(points: Vector2Position[], options?: {
|
|
6
6
|
needZ?: boolean;
|
|
7
7
|
needA?: Record<number, string>;
|
|
8
|
-
format?: (vector:
|
|
8
|
+
format?: (vector: Vector2Position) => Vector2Position;
|
|
9
9
|
}): string;
|
|
10
10
|
/** 把户型图上点点位转换到 SVG 上的点位 */
|
|
11
|
-
export default function formatFloorplanPoint({ x, y }:
|
|
11
|
+
export default function formatFloorplanPoint({ x, y }: Vector2Position, pxmm: number, bounding: FloorplanBounding): {
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
14
14
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = createCanvasTextTexture;
|
|
7
|
+
|
|
8
|
+
var _three = require("three");
|
|
9
|
+
|
|
10
|
+
function createCanvasTextTexture(text, config) {
|
|
11
|
+
var _config$size, _config$fontSize, _config$backgroundCol, _config$fontColor, _config$textAlign;
|
|
12
|
+
|
|
13
|
+
var size = (_config$size = config === null || config === void 0 ? void 0 : config.size) !== null && _config$size !== void 0 ? _config$size : 512;
|
|
14
|
+
var fontSize = (_config$fontSize = config === null || config === void 0 ? void 0 : config.fontSize) !== null && _config$fontSize !== void 0 ? _config$fontSize : size * (35 / 256) * 1.2;
|
|
15
|
+
var backgroundColor = (_config$backgroundCol = config === null || config === void 0 ? void 0 : config.backgroundColor) !== null && _config$backgroundCol !== void 0 ? _config$backgroundCol : 'rgba(0,0,0,0)';
|
|
16
|
+
var fontColor = (_config$fontColor = config === null || config === void 0 ? void 0 : config.fontColor) !== null && _config$fontColor !== void 0 ? _config$fontColor : '#fff';
|
|
17
|
+
var textAlign = (_config$textAlign = config === null || config === void 0 ? void 0 : config.textAlign) !== null && _config$textAlign !== void 0 ? _config$textAlign : 'center';
|
|
18
|
+
var canvas = document.createElement('canvas');
|
|
19
|
+
canvas.setAttribute('width', size + '');
|
|
20
|
+
canvas.setAttribute('height', size + '');
|
|
21
|
+
var context = canvas.getContext('2d');
|
|
22
|
+
context.fillStyle = backgroundColor;
|
|
23
|
+
context.fillRect(0, 0, size, size);
|
|
24
|
+
context.font = "".concat(fontSize, "px \"\u5FAE\u8F6F\u96C5\u9ED1\"");
|
|
25
|
+
context.textAlign = textAlign;
|
|
26
|
+
context.fillStyle = fontColor;
|
|
27
|
+
context.fillText(text, size / 2, size * 0.7);
|
|
28
|
+
return new _three.CanvasTexture(canvas);
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断对象是否为`null`或`undefined`。
|
|
3
|
+
* @param
|
|
4
|
+
* @return
|
|
5
|
+
*/
|
|
6
|
+
export declare function isNil<T>(value: T): value is Extract<T, undefined | null>;
|
|
7
|
+
/**
|
|
8
|
+
* 判断对象不为`null`或`undefined`。
|
|
9
|
+
*/
|
|
10
|
+
export declare function notNil<T>(value: T | null | undefined): value is T;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isNil = isNil;
|
|
7
|
+
exports.notNil = notNil;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 判断对象是否为`null`或`undefined`。
|
|
11
|
+
* @param
|
|
12
|
+
* @return
|
|
13
|
+
*/
|
|
14
|
+
function isNil(value) {
|
|
15
|
+
return !notNil(value);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 判断对象不为`null`或`undefined`。
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
function notNil(value) {
|
|
23
|
+
return value !== null && value !== undefined;
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getExtraModelLoader = getExtraModelLoader;
|
|
7
|
+
|
|
8
|
+
var _loadFbxObj = require("./loadFbxObj");
|
|
9
|
+
|
|
10
|
+
/** 模型资源加载器,用于满足资源共用 */
|
|
11
|
+
function getExtraModelLoader() {
|
|
12
|
+
var cache = new Map();
|
|
13
|
+
|
|
14
|
+
var load = function load(url) {
|
|
15
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'FBX';
|
|
16
|
+
if (type !== 'FBX') return Promise.reject(new Error('不支持的类型'));
|
|
17
|
+
if (cache.has(url)) return cache.get(url);
|
|
18
|
+
var groupPromise = (0, _loadFbxObj.loadFbxObj)(url);
|
|
19
|
+
cache.set(url, groupPromise);
|
|
20
|
+
return groupPromise;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var dispose = function dispose() {
|
|
24
|
+
cache.clear();
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
load: load,
|
|
29
|
+
dispose: dispose
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTextureLoader = getTextureLoader;
|
|
7
|
+
|
|
8
|
+
var _loadTexture = require("./loadTexture");
|
|
9
|
+
|
|
10
|
+
/** 贴图加载器,用于满足资源共用 */
|
|
11
|
+
function getTextureLoader() {
|
|
12
|
+
var cache = new Map();
|
|
13
|
+
|
|
14
|
+
var load = function load(url) {
|
|
15
|
+
if (cache.has(url)) return cache.get(url);
|
|
16
|
+
var texturePromise = (0, _loadTexture.loadTexture)(url);
|
|
17
|
+
cache.set(url, texturePromise);
|
|
18
|
+
return texturePromise;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var dispose = function dispose() {
|
|
22
|
+
cache.forEach(function (texturePromise) {
|
|
23
|
+
return texturePromise.then(function (texture) {
|
|
24
|
+
return texture.dispose();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
cache.clear();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
load: load,
|
|
32
|
+
dispose: dispose
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -5,16 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.loadFbxObj = loadFbxObj;
|
|
7
7
|
|
|
8
|
+
var _FBXLoader = require("three/examples/jsm/loaders/FBXLoader");
|
|
9
|
+
|
|
8
10
|
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); } }
|
|
9
11
|
|
|
10
12
|
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); }); }; }
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
var loader = new _FBXLoader.FBXLoader();
|
|
15
|
+
|
|
16
|
+
function loadFbxObj(_x) {
|
|
13
17
|
return _loadFbxObj.apply(this, arguments);
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
function _loadFbxObj() {
|
|
17
|
-
_loadFbxObj = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(
|
|
21
|
+
_loadFbxObj = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(url) {
|
|
18
22
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
19
23
|
while (1) {
|
|
20
24
|
switch (_context.prev = _context.next) {
|
|
@@ -7,12 +7,12 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _three = require("three");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var transformPositionToVector3 = function transformPositionToVector3(_ref) {
|
|
11
11
|
var x = _ref.x,
|
|
12
12
|
y = _ref.y,
|
|
13
13
|
z = _ref.z;
|
|
14
14
|
return new _three.Vector3(x, y, z);
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
var _default =
|
|
17
|
+
var _default = transformPositionToVector3;
|
|
18
18
|
exports["default"] = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = transfromToMeshBasicMaterial;
|
|
7
|
+
|
|
8
|
+
var _three = require("three");
|
|
9
|
+
|
|
10
|
+
function transfromToMeshBasicMaterial(object, options) {
|
|
11
|
+
object.traverse(function (ele) {
|
|
12
|
+
if (ele.type === 'Mesh') {
|
|
13
|
+
var _ele$parent;
|
|
14
|
+
|
|
15
|
+
var mesh = ele;
|
|
16
|
+
var materialConf = Object.assign({
|
|
17
|
+
map: mesh.material.map || {}
|
|
18
|
+
}, options);
|
|
19
|
+
mesh.material = new _three.MeshBasicMaterial(materialConf);
|
|
20
|
+
mesh.renderOrder = 1;
|
|
21
|
+
|
|
22
|
+
if (((_ele$parent = ele.parent) === null || _ele$parent === void 0 ? void 0 : _ele$parent.type) === 'Mesh') {
|
|
23
|
+
ele.renderOrder = ele.parent.renderOrder + 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
package/shared-utils/to.d.ts
CHANGED
package/shared-utils/to.js
CHANGED
|
@@ -6,19 +6,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
exports.to = to;
|
|
8
8
|
|
|
9
|
+
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); } }
|
|
10
|
+
|
|
11
|
+
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); }); }; }
|
|
12
|
+
|
|
9
13
|
/**
|
|
10
14
|
* 传入一个 Promise
|
|
11
15
|
* 无异常,返回 [null, data]
|
|
12
16
|
* 有异常,则返回 [Error, undefined]
|
|
13
17
|
* 用于替代 try&catch 处理 await 异常的方案
|
|
14
|
-
* @param {Promise} promise 传入一个 Promise
|
|
15
18
|
*/
|
|
16
|
-
function to(
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
function to(_x) {
|
|
20
|
+
return _to.apply(this, arguments);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function _to() {
|
|
24
|
+
_to = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(promise) {
|
|
25
|
+
var data;
|
|
26
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27
|
+
while (1) {
|
|
28
|
+
switch (_context.prev = _context.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
_context.prev = 0;
|
|
31
|
+
_context.next = 3;
|
|
32
|
+
return promise;
|
|
33
|
+
|
|
34
|
+
case 3:
|
|
35
|
+
data = _context.sent;
|
|
36
|
+
return _context.abrupt("return", [null, data]);
|
|
37
|
+
|
|
38
|
+
case 7:
|
|
39
|
+
_context.prev = 7;
|
|
40
|
+
_context.t0 = _context["catch"](0);
|
|
41
|
+
|
|
42
|
+
if (!(_context.t0 instanceof Error)) {
|
|
43
|
+
_context.next = 11;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return _context.abrupt("return", [_context.t0, null]);
|
|
48
|
+
|
|
49
|
+
case 11:
|
|
50
|
+
return _context.abrupt("return", [new Error(''), null]);
|
|
51
|
+
|
|
52
|
+
case 12:
|
|
53
|
+
case "end":
|
|
54
|
+
return _context.stop();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, _callee, null, [[0, 7]]);
|
|
58
|
+
}));
|
|
59
|
+
return _to.apply(this, arguments);
|
|
22
60
|
}
|
|
23
61
|
|
|
24
62
|
var _default = to;
|
package/typedoc/plugins.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export type { FloorplanServerPosition, FloorplanServerImagePosition, FloorplanSe
|
|
|
14
14
|
export type { FloorplanData, FloorplanEntrance, FloorplanBounding, FloorplanPosition, FloorplanRoomItem, FloorplanObserver, FloorplanFloorData, FloorplanOutlineItem, FloorplanImagePosition, FloorplanRoomLabelItem, FloorplanExtraObject, FloorplanExtraObject3D, } from '../plugins/floorplan/typings/floorplanData';
|
|
15
15
|
export { TopviewFloorplanPlugin, TopviewFloorplanPluginParameterType, } from '../plugins/floorplan/TopviewFloorplanPlugin';
|
|
16
16
|
export { TopviewFloorplanPluginController } from '../plugins/floorplan/TopviewFloorplanPlugin/Controller';
|
|
17
|
-
export {
|
|
17
|
+
export { TREASURE_TYPE, TreasurePlugin, TreasurePluginData, TreasurePluginItemData, TreasurePluginItemConfigData, TreasurePluginEvents, TreasurePluginController, TreasurePluginReturnType, TreasurePluginParameterType, TreasureObject, TreasureObjectConfig, TreasureObjectParams, TreasureFaceAnime, TreasureFaceAnimeParams, TreasureOpenAnimeParams, TreasurePluginOpenAnime, } from '../plugins/TreasurePlugin';
|
|
18
|
+
export { ModelRoomLabelPlugin, ModelRoomLabelController, ModelRoomLabelPluginReturnType, ModelRoomLabelPluginParameters, ModelRoomLabelPluginData, RoomLabel, } from '../plugins/ModelRoomLabelPlugin';
|
|
19
|
+
export type { PanoMaskObject, PanoMaskSelectorPluginData, PanoMaskSelectorPluginParameterType, PanoMaskSelectorPluginReturnType, PanoMaskSelectorPlugin, } from '../plugins/PanoMaskSelectorPlugin';
|
package/typedoc/plugins.js
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ModelRoomLabelController", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _ModelRoomLabelPlugin.ModelRoomLabelController;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ModelRoomLabelPlugin", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _ModelRoomLabelPlugin.ModelRoomLabelPlugin;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "ModelRoomLabelPluginData", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _ModelRoomLabelPlugin.ModelRoomLabelPluginData;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "ModelRoomLabelPluginParameters", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _ModelRoomLabelPlugin.ModelRoomLabelPluginParameters;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "ModelRoomLabelPluginReturnType", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _ModelRoomLabelPlugin.ModelRoomLabelPluginReturnType;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "RoomLabel", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _ModelRoomLabelPlugin.RoomLabel;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "TREASURE_TYPE", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _TreasurePlugin.TREASURE_TYPE;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
6
48
|
Object.defineProperty(exports, "TopviewFloorplanPlugin", {
|
|
7
49
|
enumerable: true,
|
|
8
50
|
get: function get() {
|
|
@@ -27,10 +69,10 @@ Object.defineProperty(exports, "TreasureFaceAnime", {
|
|
|
27
69
|
return _TreasurePlugin.TreasureFaceAnime;
|
|
28
70
|
}
|
|
29
71
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
72
|
+
Object.defineProperty(exports, "TreasureFaceAnimeParams", {
|
|
31
73
|
enumerable: true,
|
|
32
74
|
get: function get() {
|
|
33
|
-
return _TreasurePlugin.
|
|
75
|
+
return _TreasurePlugin.TreasureFaceAnimeParams;
|
|
34
76
|
}
|
|
35
77
|
});
|
|
36
78
|
Object.defineProperty(exports, "TreasureObject", {
|
|
@@ -39,16 +81,22 @@ Object.defineProperty(exports, "TreasureObject", {
|
|
|
39
81
|
return _TreasurePlugin.TreasureObject;
|
|
40
82
|
}
|
|
41
83
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
84
|
+
Object.defineProperty(exports, "TreasureObjectConfig", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function get() {
|
|
87
|
+
return _TreasurePlugin.TreasureObjectConfig;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "TreasureObjectParams", {
|
|
43
91
|
enumerable: true,
|
|
44
92
|
get: function get() {
|
|
45
|
-
return _TreasurePlugin.
|
|
93
|
+
return _TreasurePlugin.TreasureObjectParams;
|
|
46
94
|
}
|
|
47
95
|
});
|
|
48
|
-
Object.defineProperty(exports, "
|
|
96
|
+
Object.defineProperty(exports, "TreasureOpenAnimeParams", {
|
|
49
97
|
enumerable: true,
|
|
50
98
|
get: function get() {
|
|
51
|
-
return _TreasurePlugin.
|
|
99
|
+
return _TreasurePlugin.TreasureOpenAnimeParams;
|
|
52
100
|
}
|
|
53
101
|
});
|
|
54
102
|
Object.defineProperty(exports, "TreasurePlugin", {
|
|
@@ -75,6 +123,12 @@ Object.defineProperty(exports, "TreasurePluginEvents", {
|
|
|
75
123
|
return _TreasurePlugin.TreasurePluginEvents;
|
|
76
124
|
}
|
|
77
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "TreasurePluginItemConfigData", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return _TreasurePlugin.TreasurePluginItemConfigData;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
78
132
|
Object.defineProperty(exports, "TreasurePluginItemData", {
|
|
79
133
|
enumerable: true,
|
|
80
134
|
get: function get() {
|
|
@@ -99,15 +153,11 @@ Object.defineProperty(exports, "TreasurePluginReturnType", {
|
|
|
99
153
|
return _TreasurePlugin.TreasurePluginReturnType;
|
|
100
154
|
}
|
|
101
155
|
});
|
|
102
|
-
Object.defineProperty(exports, "TreasureType", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function get() {
|
|
105
|
-
return _TreasurePlugin.TreasureType;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
156
|
|
|
109
157
|
var _TopviewFloorplanPlugin = require("../plugins/floorplan/TopviewFloorplanPlugin");
|
|
110
158
|
|
|
111
159
|
var _Controller = require("../plugins/floorplan/TopviewFloorplanPlugin/Controller");
|
|
112
160
|
|
|
113
|
-
var _TreasurePlugin = require("../plugins/TreasurePlugin");
|
|
161
|
+
var _TreasurePlugin = require("../plugins/TreasurePlugin");
|
|
162
|
+
|
|
163
|
+
var _ModelRoomLabelPlugin = require("../plugins/ModelRoomLabelPlugin");
|
package/typedoc/typings.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { FloorplanData, FloorplanOutlineItem, FloorplanEntrance, FloorplanBounding, FloorplanObserver, FloorplanRoomItem, FloorplanRoomLabelItem, FloorplanPosition, FloorplanImagePosition, } from '../plugins/floorplan/typings/floorplanData';
|
|
2
|
-
export type {
|
|
2
|
+
export type { Vector3Position, Vector3WithArray, Vector2Position, Vector2WithArray, Matrix4_4, } from '../typings/math.type';
|
|
3
3
|
export type { Omit, Overwrite } from '../typings/utils.type';
|
package/typings/math.type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 三维向量
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface Vector3Position {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
7
7
|
z: number;
|
|
@@ -13,7 +13,7 @@ export declare type Vector3WithArray = [number, number, number];
|
|
|
13
13
|
/**
|
|
14
14
|
* 二维向量
|
|
15
15
|
*/
|
|
16
|
-
export interface
|
|
16
|
+
export interface Vector2Position {
|
|
17
17
|
x: number;
|
|
18
18
|
y: number;
|
|
19
19
|
}
|