@realsee/dnalogel 2.0.0-alpha.42 → 2.0.0-alpha.43
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/dist/CSS3DRenderPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/CameraMovementPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/CameraMovementPlugin/index.js +15 -40
- package/dist/ItemLabelPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/index.js +5 -30
- package/dist/ModelEntryDoorGuidePlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
- package/dist/ModelItemLabelPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelRoomLabelPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.js +3 -28
- package/dist/ModelViewPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoCompassPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoCompassPlugin/index.js +64 -99
- package/dist/PanoCursorRaycasterPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoRulerPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.js +3 -28
- package/dist/PanoRulerProPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoRulerProPlugin/index.js +29 -58
- package/dist/PanoSpatialTagPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/floorplan/ModelFloorplanPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/floorplan/ModelFloorplanPlugin/index.js +115 -156
- package/dist/floorplan/PanoFloorplanRadarPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +71 -110
- package/dist/floorplan/TopviewFloorplanPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +114 -159
- package/dist/index.es.js +341 -416
- package/dist/index.js +341 -416
- package/dist/index.umd.js +341 -416
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +1 -1
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginState.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/modules.html +18 -18
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +15 -24
- package/libs/ModelChassisCompassPlugin/Plugin.js +5 -14
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +8 -17
- package/libs/ModelTVVideoPlugin/Plugin.js +3 -12
- package/libs/PanoCompassPlugin/controller.js +56 -73
- package/libs/PanoCompassPlugin/index.d.ts +1 -1
- package/libs/PanoRulerPlugin/Plugin.js +3 -12
- package/libs/PanoRulerProPlugin/Controller.js +29 -42
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +29 -42
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +43 -60
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +58 -79
- package/libs/floorplan/utils/correctFiveState.js +20 -31
- package/libs/floorplan/utils/formatData.js +28 -43
- package/libs/shared-utils/five/changeMode.js +28 -39
- package/libs/shared-utils/three/loadFbxObj.js +9 -20
- package/libs/shared-utils/three/loadTexture.js +6 -17
- package/libs/shared-utils/to.js +10 -21
- package/package.json +14 -14
package/dist/index.es.js
CHANGED
|
@@ -995,31 +995,6 @@ var FLOOR_PLAN_ATTACHED_TO;
|
|
|
995
995
|
FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["BOUNDING_CENTER"] = 3] = "BOUNDING_CENTER";
|
|
996
996
|
})(FLOOR_PLAN_ATTACHED_TO || (FLOOR_PLAN_ATTACHED_TO = {}));
|
|
997
997
|
|
|
998
|
-
/******************************************************************************
|
|
999
|
-
Copyright (c) Microsoft Corporation.
|
|
1000
|
-
|
|
1001
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1002
|
-
purpose with or without fee is hereby granted.
|
|
1003
|
-
|
|
1004
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1005
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1006
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1007
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1008
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1009
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1010
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1011
|
-
***************************************************************************** */
|
|
1012
|
-
|
|
1013
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1014
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1015
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1016
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1017
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1018
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1019
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
998
|
/**
|
|
1024
999
|
* 检查一个值是否是狭义上的对象
|
|
1025
1000
|
* @param {any} value 要检查的值
|
|
@@ -4523,26 +4498,22 @@ class Main$1 extends SvelteComponent {
|
|
|
4523
4498
|
|
|
4524
4499
|
const FLOORPLAN_EXTRA_OBJECT_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC';
|
|
4525
4500
|
|
|
4526
|
-
function formatOutlines(outlines) {
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
const
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
url: item.url,
|
|
4534
|
-
svgUrl: item.svg_url,
|
|
4535
|
-
};
|
|
4536
|
-
if (item.svg_url) {
|
|
4537
|
-
const svgContent = yield fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
4538
|
-
outlineItem.svgContent = svgContent;
|
|
4539
|
-
}
|
|
4540
|
-
return outlineItem;
|
|
4541
|
-
});
|
|
4501
|
+
async function formatOutlines(outlines) {
|
|
4502
|
+
const headers = new Headers({ 'Content-Type': 'text/plain' });
|
|
4503
|
+
const getOutlineItem = async function (item) {
|
|
4504
|
+
const outlineItem = {
|
|
4505
|
+
index: item.index,
|
|
4506
|
+
url: item.url,
|
|
4507
|
+
svgUrl: item.svg_url,
|
|
4542
4508
|
};
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4509
|
+
if (item.svg_url) {
|
|
4510
|
+
const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
4511
|
+
outlineItem.svgContent = svgContent;
|
|
4512
|
+
}
|
|
4513
|
+
return outlineItem;
|
|
4514
|
+
};
|
|
4515
|
+
const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
|
|
4516
|
+
return svgOutlineItems;
|
|
4546
4517
|
}
|
|
4547
4518
|
function formatRoom(data) {
|
|
4548
4519
|
const floorplanRoomItem = {
|
|
@@ -4588,21 +4559,19 @@ function formatFloorplanEntrance(data) {
|
|
|
4588
4559
|
};
|
|
4589
4560
|
return floorplanEntrance;
|
|
4590
4561
|
}
|
|
4591
|
-
function formatData(data) {
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
return floorplanData;
|
|
4605
|
-
});
|
|
4562
|
+
async function formatData(data) {
|
|
4563
|
+
const outlines = await formatOutlines(data.outlines);
|
|
4564
|
+
const bounding = data.computed_data.bounding;
|
|
4565
|
+
const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
|
|
4566
|
+
const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
|
|
4567
|
+
const floorplanData = {
|
|
4568
|
+
outlines,
|
|
4569
|
+
entrance,
|
|
4570
|
+
bounding,
|
|
4571
|
+
floorDatas,
|
|
4572
|
+
observers: data.computed_data.observers.map(formateFloorplanObserver),
|
|
4573
|
+
};
|
|
4574
|
+
return floorplanData;
|
|
4606
4575
|
}
|
|
4607
4576
|
function formatExtraObjects(data, five, floorplanData) {
|
|
4608
4577
|
const extraObjects = data.map((object) => {
|
|
@@ -4697,37 +4666,35 @@ function nearlyEqual(num1, num2, accuracy = 4) {
|
|
|
4697
4666
|
/** 等待 five changeMode 结束
|
|
4698
4667
|
* @description Promise 的状态只代表 mode 与预期是否一致,不保证参数的一致性
|
|
4699
4668
|
*/
|
|
4700
|
-
function changeMode(five, changeModeParams) {
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
five.
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
const
|
|
4712
|
-
|
|
4713
|
-
|
|
4669
|
+
async function changeMode(five, changeModeParams) {
|
|
4670
|
+
await new Promise((resolve, reject) => {
|
|
4671
|
+
// 虽然 changeMode 是异步函数,但不代表异步流程结束代表切换 Mode 动画结束
|
|
4672
|
+
five.changeMode(...changeModeParams).catch((error) => reject(error));
|
|
4673
|
+
five.once('initAnimationEnded', () => {
|
|
4674
|
+
const fiveCurrentState = five.getCurrentState();
|
|
4675
|
+
const correctMode = changeModeParams[0];
|
|
4676
|
+
if (fiveCurrentState.mode !== correctMode)
|
|
4677
|
+
reject(new Error('mode 与预期不符'));
|
|
4678
|
+
/** 检测当前的 current pose 和传入的 pose 是否一致 */
|
|
4679
|
+
const checkPose = () => {
|
|
4680
|
+
const correctPose = changeModeParams[1];
|
|
4681
|
+
if (!correctPose)
|
|
4682
|
+
return true;
|
|
4683
|
+
return Object.keys(correctPose).every((key) => {
|
|
4684
|
+
const fivePoseItem = fiveCurrentState[key];
|
|
4685
|
+
if (fivePoseItem === undefined)
|
|
4714
4686
|
return true;
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
const checkPoseResult = checkPose();
|
|
4727
|
-
if (!checkPoseResult)
|
|
4728
|
-
reject(new Error('five pose 与预期不符'));
|
|
4729
|
-
resolve();
|
|
4730
|
-
});
|
|
4687
|
+
const correctPoseItem = correctPose[key];
|
|
4688
|
+
if (typeof fivePoseItem === 'number' && typeof correctPoseItem === 'number') {
|
|
4689
|
+
return nearlyEqual(fivePoseItem, correctPoseItem, 2);
|
|
4690
|
+
}
|
|
4691
|
+
return fivePoseItem === correctPoseItem;
|
|
4692
|
+
});
|
|
4693
|
+
};
|
|
4694
|
+
const checkPoseResult = checkPose();
|
|
4695
|
+
if (!checkPoseResult)
|
|
4696
|
+
reject(new Error('five pose 与预期不符'));
|
|
4697
|
+
resolve();
|
|
4731
4698
|
});
|
|
4732
4699
|
});
|
|
4733
4700
|
}
|
|
@@ -5074,24 +5041,22 @@ class Controller$3 extends Controller$4 {
|
|
|
5074
5041
|
five.once('dispose', this.dispose);
|
|
5075
5042
|
this.addEventListener();
|
|
5076
5043
|
}
|
|
5077
|
-
load(serverData, state, userAction = true) {
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
this.render();
|
|
5094
|
-
});
|
|
5044
|
+
async load(serverData, state, userAction = true) {
|
|
5045
|
+
function isPluginServerData(serverData) {
|
|
5046
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
5047
|
+
}
|
|
5048
|
+
const _data = serverData;
|
|
5049
|
+
if (_data && !_data.version)
|
|
5050
|
+
console.warn('传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数');
|
|
5051
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
5052
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
5053
|
+
const prevData = this.data;
|
|
5054
|
+
this.data = await formatData(_serverData);
|
|
5055
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
5056
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
5057
|
+
if (state)
|
|
5058
|
+
this.updateState(state, userAction);
|
|
5059
|
+
this.render();
|
|
5095
5060
|
}
|
|
5096
5061
|
/** 更新户型图位置 */
|
|
5097
5062
|
updatePosition() {
|
|
@@ -5116,25 +5081,21 @@ class Controller$3 extends Controller$4 {
|
|
|
5116
5081
|
this.render();
|
|
5117
5082
|
return this;
|
|
5118
5083
|
}
|
|
5119
|
-
show(options = {}) {
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
this._show({ userAction });
|
|
5127
|
-
});
|
|
5084
|
+
async show(options = {}) {
|
|
5085
|
+
// 已经展示完成了,不做任何操作
|
|
5086
|
+
if (this.state.visible)
|
|
5087
|
+
return;
|
|
5088
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
5089
|
+
this.updateState({ visible: true }, userAction);
|
|
5090
|
+
this._show({ userAction });
|
|
5128
5091
|
}
|
|
5129
|
-
hide(options = {}) {
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
this._hide({ userAction });
|
|
5137
|
-
});
|
|
5092
|
+
async hide(options = {}) {
|
|
5093
|
+
this.isHiddenByHideFunc = true;
|
|
5094
|
+
if (!this.state.visible)
|
|
5095
|
+
return;
|
|
5096
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
5097
|
+
this.updateState({ visible: false }, userAction);
|
|
5098
|
+
this._hide({ userAction });
|
|
5138
5099
|
}
|
|
5139
5100
|
enable(options = {}) {
|
|
5140
5101
|
if (this.state.enabled)
|
|
@@ -5164,42 +5125,36 @@ class Controller$3 extends Controller$4 {
|
|
|
5164
5125
|
state.visible ? this._show(options) : this._hide(options);
|
|
5165
5126
|
}
|
|
5166
5127
|
}
|
|
5167
|
-
formatData(serverData) {
|
|
5168
|
-
return
|
|
5169
|
-
return yield formatData(serverData.data);
|
|
5170
|
-
});
|
|
5128
|
+
async formatData(serverData) {
|
|
5129
|
+
return await formatData(serverData.data);
|
|
5171
5130
|
}
|
|
5172
|
-
_show(options) {
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
this.render();
|
|
5190
|
-
});
|
|
5131
|
+
async _show(options) {
|
|
5132
|
+
if (!this.state.enabled)
|
|
5133
|
+
return;
|
|
5134
|
+
this.isHiddenByHideFunc = false;
|
|
5135
|
+
const { userAction } = options;
|
|
5136
|
+
this.hooks.emit('show', { userAction });
|
|
5137
|
+
if (this.five.getCurrentState().mode !== 'Topview') {
|
|
5138
|
+
await changeMode(this.five, ['Topview', undefined, undefined, userAction]);
|
|
5139
|
+
}
|
|
5140
|
+
this.five.model.show(this.floorIndex);
|
|
5141
|
+
this.updatePosition();
|
|
5142
|
+
this.updateSize();
|
|
5143
|
+
const renderDuration = 500;
|
|
5144
|
+
const modelOpacity = this.state.config.modelOpacity;
|
|
5145
|
+
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
5146
|
+
this.hooks.emit('showAnimationEnded', { userAction });
|
|
5147
|
+
this.render();
|
|
5191
5148
|
}
|
|
5192
|
-
_hide(options) {
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
this.render();
|
|
5202
|
-
});
|
|
5149
|
+
async _hide(options) {
|
|
5150
|
+
if (!this.state.enabled)
|
|
5151
|
+
return;
|
|
5152
|
+
const { userAction } = options;
|
|
5153
|
+
this.hooks.emit('hide', { userAction });
|
|
5154
|
+
const modelOpacity = 1;
|
|
5155
|
+
const renderDuration = 0;
|
|
5156
|
+
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
5157
|
+
this.render();
|
|
5203
5158
|
}
|
|
5204
5159
|
_enable(options) {
|
|
5205
5160
|
const { userAction } = options;
|
|
@@ -6252,55 +6207,49 @@ class Controller$2 extends Controller$4 {
|
|
|
6252
6207
|
// =============== init Listener ===============
|
|
6253
6208
|
five.once('dispose', this.dispose);
|
|
6254
6209
|
}
|
|
6255
|
-
load(serverData, state, userAction = true) {
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
this.render();
|
|
6284
|
-
});
|
|
6210
|
+
async load(serverData, state, userAction = true) {
|
|
6211
|
+
// const loadImage = async () => {
|
|
6212
|
+
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
6213
|
+
// // 当有 svgString 时,没有加载过程
|
|
6214
|
+
// if (floorplanData.outlines[floorIndex]?.svgContent) return
|
|
6215
|
+
// // 如果当前楼层图片不存在,不存在加载过程
|
|
6216
|
+
// const nowFloorImageSrc = floorplanData.outlines[floorIndex]?.url
|
|
6217
|
+
// if (!nowFloorImageSrc) return
|
|
6218
|
+
// // 图片加载完成时再 render
|
|
6219
|
+
// await new Promise<void>((resolve) => {
|
|
6220
|
+
// const nowFloorImage = new Image()
|
|
6221
|
+
// nowFloorImage.src = nowFloorImageSrc
|
|
6222
|
+
// nowFloorImage.onload = () => resolve()
|
|
6223
|
+
// })
|
|
6224
|
+
// }
|
|
6225
|
+
// await loadImage()
|
|
6226
|
+
function isPluginServerData(serverData) {
|
|
6227
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
6228
|
+
}
|
|
6229
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
6230
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
6231
|
+
const prevData = this.data;
|
|
6232
|
+
this.data = await formatData(_serverData);
|
|
6233
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
6234
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
6235
|
+
if (state)
|
|
6236
|
+
this.updateState(state, userAction);
|
|
6237
|
+
this.render();
|
|
6285
6238
|
}
|
|
6286
|
-
show(options = {}) {
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
this._show({ userAction });
|
|
6294
|
-
});
|
|
6239
|
+
async show(options = {}) {
|
|
6240
|
+
// 已经展示完成了,不做任何操作
|
|
6241
|
+
if (this.state.visible)
|
|
6242
|
+
return;
|
|
6243
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6244
|
+
this.updateState({ visible: true }, userAction);
|
|
6245
|
+
this._show({ userAction });
|
|
6295
6246
|
}
|
|
6296
|
-
hide(options = {}) {
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
this._hide({ userAction });
|
|
6303
|
-
});
|
|
6247
|
+
async hide(options = {}) {
|
|
6248
|
+
if (!this.state.visible)
|
|
6249
|
+
return;
|
|
6250
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6251
|
+
this.updateState({ visible: false }, userAction);
|
|
6252
|
+
this._hide({ userAction });
|
|
6304
6253
|
}
|
|
6305
6254
|
enable(options = {}) {
|
|
6306
6255
|
if (this.state.enabled)
|
|
@@ -6345,10 +6294,8 @@ class Controller$2 extends Controller$4 {
|
|
|
6345
6294
|
this.extraObjects = formatExtraObjects(data, this.five, this.data);
|
|
6346
6295
|
this.render();
|
|
6347
6296
|
}
|
|
6348
|
-
formatData(serverData) {
|
|
6349
|
-
return
|
|
6350
|
-
return yield formatData(serverData.data);
|
|
6351
|
-
});
|
|
6297
|
+
async formatData(serverData) {
|
|
6298
|
+
return await formatData(serverData.data);
|
|
6352
6299
|
}
|
|
6353
6300
|
_enable(options) {
|
|
6354
6301
|
const { userAction } = options;
|
|
@@ -6408,18 +6355,16 @@ const PanoFloorplanRadarPlugin = (five, params) => {
|
|
|
6408
6355
|
* 有异常,则返回 [Error, undefined]
|
|
6409
6356
|
* 用于替代 try&catch 处理 await 异常的方案
|
|
6410
6357
|
*/
|
|
6411
|
-
function to(promise) {
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
}
|
|
6422
|
-
});
|
|
6358
|
+
async function to(promise) {
|
|
6359
|
+
try {
|
|
6360
|
+
const data = await promise;
|
|
6361
|
+
return [null, data];
|
|
6362
|
+
}
|
|
6363
|
+
catch (error) {
|
|
6364
|
+
if (error instanceof Error)
|
|
6365
|
+
return [error, null];
|
|
6366
|
+
return [new Error(''), null];
|
|
6367
|
+
}
|
|
6423
6368
|
}
|
|
6424
6369
|
|
|
6425
6370
|
var FloorplanErrorType;
|
|
@@ -6464,29 +6409,27 @@ function checkShowState(five, showState) {
|
|
|
6464
6409
|
* 2. 内置了相应的动画时间计算
|
|
6465
6410
|
* 3. 纠正成功会返回 true,失败「可能会被用户行为中断」会返回 false
|
|
6466
6411
|
*/
|
|
6467
|
-
function correctFiveState(five, showState, userAction = true) {
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
if (result === true)
|
|
6472
|
-
return;
|
|
6473
|
-
const currentFiveState = five.getCurrentState();
|
|
6474
|
-
// 纠正 mode
|
|
6475
|
-
if (currentFiveState.mode !== showState.mode) {
|
|
6476
|
-
const [changeModeError] = yield to(changeMode(five, [showState.mode, showState, undefined, userAction]));
|
|
6477
|
-
if (changeModeError)
|
|
6478
|
-
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
6479
|
-
return;
|
|
6480
|
-
}
|
|
6481
|
-
// 纠正相机状态
|
|
6482
|
-
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
6483
|
-
const { latitude, longitude, fov } = currentFiveState;
|
|
6484
|
-
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
6485
|
-
const [updateCameraError] = yield to(five.updateCamera(showState, time, userAction));
|
|
6486
|
-
if (updateCameraError)
|
|
6487
|
-
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
6412
|
+
async function correctFiveState(five, showState, userAction = true) {
|
|
6413
|
+
// 当前已满足状态,不需要变更
|
|
6414
|
+
const result = checkShowState(five, showState);
|
|
6415
|
+
if (result === true)
|
|
6488
6416
|
return;
|
|
6489
|
-
|
|
6417
|
+
const currentFiveState = five.getCurrentState();
|
|
6418
|
+
// 纠正 mode
|
|
6419
|
+
if (currentFiveState.mode !== showState.mode) {
|
|
6420
|
+
const [changeModeError] = await to(changeMode(five, [showState.mode, showState, undefined, userAction]));
|
|
6421
|
+
if (changeModeError)
|
|
6422
|
+
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
6423
|
+
return;
|
|
6424
|
+
}
|
|
6425
|
+
// 纠正相机状态
|
|
6426
|
+
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
6427
|
+
const { latitude, longitude, fov } = currentFiveState;
|
|
6428
|
+
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
6429
|
+
const [updateCameraError] = await to(five.updateCamera(showState, time, userAction));
|
|
6430
|
+
if (updateCameraError)
|
|
6431
|
+
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
6432
|
+
return;
|
|
6490
6433
|
}
|
|
6491
6434
|
|
|
6492
6435
|
/** 当前 five 的相机视角是否满足户型图自动隐藏条件
|
|
@@ -6655,7 +6598,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6655
6598
|
enumerable: true,
|
|
6656
6599
|
configurable: true,
|
|
6657
6600
|
writable: true,
|
|
6658
|
-
value: (options = {}) =>
|
|
6601
|
+
value: async (options = {}) => {
|
|
6659
6602
|
if (!this.state.enabled)
|
|
6660
6603
|
return;
|
|
6661
6604
|
// 已经展示完成了,不做任何操作
|
|
@@ -6664,14 +6607,14 @@ class Controller$1 extends Controller$4 {
|
|
|
6664
6607
|
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6665
6608
|
this.updateState({ visible: true }, userAction);
|
|
6666
6609
|
this._show(options);
|
|
6667
|
-
}
|
|
6610
|
+
}
|
|
6668
6611
|
});
|
|
6669
6612
|
/** 隐藏户型图 */
|
|
6670
6613
|
Object.defineProperty(this, "hide", {
|
|
6671
6614
|
enumerable: true,
|
|
6672
6615
|
configurable: true,
|
|
6673
6616
|
writable: true,
|
|
6674
|
-
value: (options = {}) =>
|
|
6617
|
+
value: async (options = {}) => {
|
|
6675
6618
|
if (!this.state.enabled)
|
|
6676
6619
|
return;
|
|
6677
6620
|
this.isHiddenByHideFunc = true;
|
|
@@ -6679,7 +6622,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6679
6622
|
return;
|
|
6680
6623
|
this.updateState({ visible: false }, options.userAction || true);
|
|
6681
6624
|
this._hide(options);
|
|
6682
|
-
}
|
|
6625
|
+
}
|
|
6683
6626
|
});
|
|
6684
6627
|
/** 更新户型图大小 */
|
|
6685
6628
|
Object.defineProperty(this, "updateSize", {
|
|
@@ -6745,11 +6688,11 @@ class Controller$1 extends Controller$4 {
|
|
|
6745
6688
|
enumerable: true,
|
|
6746
6689
|
configurable: true,
|
|
6747
6690
|
writable: true,
|
|
6748
|
-
value: (options) =>
|
|
6749
|
-
var
|
|
6691
|
+
value: async (options) => {
|
|
6692
|
+
var _a;
|
|
6750
6693
|
if (!this.state.enabled)
|
|
6751
6694
|
return;
|
|
6752
|
-
if (!((
|
|
6695
|
+
if (!((_a = this.five.model) === null || _a === void 0 ? void 0 : _a.loaded))
|
|
6753
6696
|
throw new Error(FloorplanErrorType.ModelNotLoaded);
|
|
6754
6697
|
if (!this.data)
|
|
6755
6698
|
throw new Error(FloorplanErrorType.DataNotLoaded);
|
|
@@ -6763,7 +6706,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6763
6706
|
userAction: true,
|
|
6764
6707
|
};
|
|
6765
6708
|
const mergedOptions = Object.assign(Object.assign({}, baseShowOpts), options);
|
|
6766
|
-
const getShowPromise = () =>
|
|
6709
|
+
const getShowPromise = async () => {
|
|
6767
6710
|
this.hooks.emit('show', { userAction: mergedOptions.userAction, auto: mergedOptions.isAutoShow });
|
|
6768
6711
|
let hasRejected = false;
|
|
6769
6712
|
let externalErrorMsg;
|
|
@@ -6771,7 +6714,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6771
6714
|
hasRejected = true;
|
|
6772
6715
|
externalErrorMsg = errorMsg;
|
|
6773
6716
|
};
|
|
6774
|
-
const [correctError] =
|
|
6717
|
+
const [correctError] = await to(correctFiveState(this.five, this.showState, mergedOptions.userAction));
|
|
6775
6718
|
if (correctError)
|
|
6776
6719
|
throw correctError;
|
|
6777
6720
|
// 异步结束要判断当前是不是被中断了
|
|
@@ -6789,7 +6732,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6789
6732
|
const renderDuration = mergedOptions.immediately ? 0 : SHOW_ANIME_DURATION;
|
|
6790
6733
|
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
6791
6734
|
this.render(renderDuration);
|
|
6792
|
-
}
|
|
6735
|
+
};
|
|
6793
6736
|
this.showPromise = getShowPromise()
|
|
6794
6737
|
.then(() => {
|
|
6795
6738
|
this.hooks.emit('showAnimationEnded', {
|
|
@@ -6811,7 +6754,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6811
6754
|
this.showRejection = undefined;
|
|
6812
6755
|
});
|
|
6813
6756
|
return this.showPromise;
|
|
6814
|
-
}
|
|
6757
|
+
}
|
|
6815
6758
|
});
|
|
6816
6759
|
Object.defineProperty(this, "_hide", {
|
|
6817
6760
|
enumerable: true,
|
|
@@ -7045,24 +6988,22 @@ class Controller$1 extends Controller$4 {
|
|
|
7045
6988
|
five.once('dispose', this.dispose);
|
|
7046
6989
|
this.addEventListener();
|
|
7047
6990
|
}
|
|
7048
|
-
load(serverData, state, userAction = true) {
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
this.render();
|
|
7065
|
-
});
|
|
6991
|
+
async load(serverData, state, userAction = true) {
|
|
6992
|
+
function isPluginServerData(serverData) {
|
|
6993
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
6994
|
+
}
|
|
6995
|
+
const _data = serverData;
|
|
6996
|
+
if (_data && !_data.version)
|
|
6997
|
+
console.warn('传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数');
|
|
6998
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
6999
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
7000
|
+
const prevData = this.data;
|
|
7001
|
+
this.data = await formatData(_serverData);
|
|
7002
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
7003
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
7004
|
+
if (state)
|
|
7005
|
+
this.updateState(state, userAction);
|
|
7006
|
+
this.render();
|
|
7066
7007
|
}
|
|
7067
7008
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
7068
7009
|
appendTo(wrapper) {
|
|
@@ -7110,10 +7051,8 @@ class Controller$1 extends Controller$4 {
|
|
|
7110
7051
|
return;
|
|
7111
7052
|
this.render();
|
|
7112
7053
|
}
|
|
7113
|
-
formatData(serverData) {
|
|
7114
|
-
return
|
|
7115
|
-
return yield formatData(serverData.data);
|
|
7116
|
-
});
|
|
7054
|
+
async formatData(serverData) {
|
|
7055
|
+
return await formatData(serverData.data);
|
|
7117
7056
|
}
|
|
7118
7057
|
updateState(state, userAction) {
|
|
7119
7058
|
const prevState = this.state;
|
|
@@ -7341,10 +7280,10 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7341
7280
|
const defaultNorthRad = (_a = params.north_rad) !== null && _a !== void 0 ? _a : undefined;
|
|
7342
7281
|
// 局部状态
|
|
7343
7282
|
const state = {};
|
|
7344
|
-
const load = (data) =>
|
|
7345
|
-
var
|
|
7283
|
+
const load = async (data) => {
|
|
7284
|
+
var _a;
|
|
7346
7285
|
const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
|
|
7347
|
-
const northRad = (
|
|
7286
|
+
const northRad = (_a = data === null || data === void 0 ? void 0 : data.north_rad) !== null && _a !== void 0 ? _a : defaultNorthRad;
|
|
7348
7287
|
if (typeof northRad !== 'number') {
|
|
7349
7288
|
throw new Error('"northRad"配置参数缺失:未配置指南针指向!');
|
|
7350
7289
|
}
|
|
@@ -7353,7 +7292,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7353
7292
|
const zOffset = bounding.max.z - bounding.min.z;
|
|
7354
7293
|
const maxOffset = Math.max(xOffset, zOffset);
|
|
7355
7294
|
const fbxLoader = new FBXLoader();
|
|
7356
|
-
const object =
|
|
7295
|
+
const object = await fbxLoader.loadAsync(fbxUrl);
|
|
7357
7296
|
transfromToMeshBasicMaterial(object, {
|
|
7358
7297
|
transparent: true,
|
|
7359
7298
|
side: THREE.DoubleSide,
|
|
@@ -7367,7 +7306,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7367
7306
|
bject3d2LocalMatrix(object, { position, rotation, scale });
|
|
7368
7307
|
state.object = object;
|
|
7369
7308
|
return true;
|
|
7370
|
-
}
|
|
7309
|
+
};
|
|
7371
7310
|
const onCameraUpdate = ({ latitude }) => {
|
|
7372
7311
|
if (!state.object)
|
|
7373
7312
|
return;
|
|
@@ -7437,25 +7376,25 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
7437
7376
|
const defaultRad = (_c = params.rad) !== null && _c !== void 0 ? _c : undefined;
|
|
7438
7377
|
const defaultFbxUrl = params.fbx_url || '//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx';
|
|
7439
7378
|
const mixers = [];
|
|
7440
|
-
const load = (data) =>
|
|
7441
|
-
var
|
|
7442
|
-
const position = (
|
|
7379
|
+
const load = async (data) => {
|
|
7380
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7381
|
+
const position = (_a = data === null || data === void 0 ? void 0 : data.position) !== null && _a !== void 0 ? _a : defaultModelPosition;
|
|
7443
7382
|
if (!position)
|
|
7444
7383
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): position is undefined`);
|
|
7445
7384
|
const modelPosition = transformPositionToVector3(position);
|
|
7446
|
-
const rad = (
|
|
7447
|
-
const fbxUrl = (
|
|
7385
|
+
const rad = (_b = data === null || data === void 0 ? void 0 : data.rad) !== null && _b !== void 0 ? _b : defaultRad;
|
|
7386
|
+
const fbxUrl = (_c = data === null || data === void 0 ? void 0 : data.fbx_url) !== null && _c !== void 0 ? _c : defaultFbxUrl;
|
|
7448
7387
|
state.rad = rad;
|
|
7449
7388
|
if (rad === undefined)
|
|
7450
7389
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${rad}`);
|
|
7451
7390
|
// 加载模型
|
|
7452
|
-
const object =
|
|
7391
|
+
const object = await new FBXLoader().loadAsync(fbxUrl);
|
|
7453
7392
|
// 设置位置
|
|
7454
7393
|
object.position.copy(modelPosition);
|
|
7455
7394
|
object.rotation.z = rad;
|
|
7456
7395
|
object.scale.set(0.8, 0.8, 0.8);
|
|
7457
7396
|
transfromToMeshBasicMaterial(object, { transparent: true, side: THREE.DoubleSide });
|
|
7458
|
-
const textMesh = (
|
|
7397
|
+
const textMesh = (_g = (_f = (_e = (_d = object.children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.children) === null || _f === void 0 ? void 0 : _f[3]) === null || _g === void 0 ? void 0 : _g.clone();
|
|
7459
7398
|
if (!textMesh)
|
|
7460
7399
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): textMesh is ${textMesh}`);
|
|
7461
7400
|
textMesh.material = new MeshBasicMaterial({ transparent: true, map: createCanvasTextTexture('入户门') });
|
|
@@ -7463,7 +7402,7 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
7463
7402
|
object.children[0].add(textMesh);
|
|
7464
7403
|
state.object = object;
|
|
7465
7404
|
return true;
|
|
7466
|
-
}
|
|
7405
|
+
};
|
|
7467
7406
|
const initAnimation = () => {
|
|
7468
7407
|
if (state.animation)
|
|
7469
7408
|
return;
|
|
@@ -7700,21 +7639,21 @@ const getLongitudeParams = (from, to, rotation) => {
|
|
|
7700
7639
|
*/
|
|
7701
7640
|
const CameraMovementPlugin = (five) => {
|
|
7702
7641
|
const state = {};
|
|
7703
|
-
const move = (args, duration, opts = { preload: true }) =>
|
|
7642
|
+
const move = async (args, duration, opts = { preload: true }) => {
|
|
7704
7643
|
if (state.interruptCallback) {
|
|
7705
7644
|
state.interruptCallback(false);
|
|
7706
7645
|
}
|
|
7707
7646
|
if (opts.asyncStartCallback) {
|
|
7708
|
-
|
|
7647
|
+
await opts.asyncStartCallback();
|
|
7709
7648
|
}
|
|
7710
7649
|
if (args.mode && args.mode !== five.currentMode) {
|
|
7711
|
-
|
|
7650
|
+
await five.changeMode(args.mode);
|
|
7712
7651
|
}
|
|
7713
7652
|
if (opts.preload && args.panoIndex !== undefined && args.panoIndex !== five.panoIndex) {
|
|
7714
|
-
|
|
7653
|
+
await five.preloadPano(args.panoIndex);
|
|
7715
7654
|
}
|
|
7716
7655
|
if (opts.asyncEndCallback) {
|
|
7717
|
-
|
|
7656
|
+
await opts.asyncEndCallback();
|
|
7718
7657
|
}
|
|
7719
7658
|
if (args.panoIndex === undefined &&
|
|
7720
7659
|
args.fov === undefined &&
|
|
@@ -7722,7 +7661,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
7722
7661
|
args.longitude === undefined) {
|
|
7723
7662
|
return true;
|
|
7724
7663
|
}
|
|
7725
|
-
return
|
|
7664
|
+
return await new Promise((resolve, reject) => {
|
|
7726
7665
|
const panoIndex = args.panoIndex !== undefined ? args.panoIndex : five.panoIndex;
|
|
7727
7666
|
if (panoIndex !== undefined) {
|
|
7728
7667
|
five.moveToPano(panoIndex, Object.assign({
|
|
@@ -7735,7 +7674,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
7735
7674
|
reject(false);
|
|
7736
7675
|
}
|
|
7737
7676
|
});
|
|
7738
|
-
}
|
|
7677
|
+
};
|
|
7739
7678
|
const getAnimeParams = (args) => {
|
|
7740
7679
|
const currentFiveState = five.state;
|
|
7741
7680
|
// latitude
|
|
@@ -7751,20 +7690,20 @@ const CameraMovementPlugin = (five) => {
|
|
|
7751
7690
|
to: { latitude: toLatitude, longitude: toLongitude, fov: toFov },
|
|
7752
7691
|
};
|
|
7753
7692
|
};
|
|
7754
|
-
const rotate = (args, duration, opts = {}) =>
|
|
7693
|
+
const rotate = async (args, duration, opts = {}) => {
|
|
7755
7694
|
if (state.interruptCallback) {
|
|
7756
7695
|
state.interruptCallback(false);
|
|
7757
7696
|
}
|
|
7758
7697
|
if (opts.asyncStartCallback) {
|
|
7759
|
-
|
|
7698
|
+
await opts.asyncStartCallback();
|
|
7760
7699
|
}
|
|
7761
7700
|
if (five.currentMode !== Five.Mode.Panorama) {
|
|
7762
|
-
|
|
7701
|
+
await five.changeMode(Five.Mode.Panorama);
|
|
7763
7702
|
}
|
|
7764
7703
|
if (args.panoIndex !== undefined && args.panoIndex !== five.panoIndex) {
|
|
7765
7704
|
if (opts.preload)
|
|
7766
|
-
|
|
7767
|
-
|
|
7705
|
+
await five.preloadPano(args.panoIndex);
|
|
7706
|
+
await new Promise((resolve, reject) => {
|
|
7768
7707
|
if (!args.panoIndex) {
|
|
7769
7708
|
resolve(true);
|
|
7770
7709
|
return;
|
|
@@ -7776,10 +7715,10 @@ const CameraMovementPlugin = (five) => {
|
|
|
7776
7715
|
});
|
|
7777
7716
|
}
|
|
7778
7717
|
if (opts.asyncEndCallback) {
|
|
7779
|
-
|
|
7718
|
+
await opts.asyncEndCallback();
|
|
7780
7719
|
}
|
|
7781
7720
|
const { from, to } = getAnimeParams(args);
|
|
7782
|
-
return
|
|
7721
|
+
return await new Promise((resolve) => {
|
|
7783
7722
|
const onUpdate = ({ progress }) => {
|
|
7784
7723
|
const state = {};
|
|
7785
7724
|
state.longitude = progressNumber(from.longitude, to.longitude, progress);
|
|
@@ -7821,7 +7760,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
7821
7760
|
state.interruptCallback(true);
|
|
7822
7761
|
}, duration);
|
|
7823
7762
|
});
|
|
7824
|
-
}
|
|
7763
|
+
};
|
|
7825
7764
|
return {
|
|
7826
7765
|
move,
|
|
7827
7766
|
rotate,
|
|
@@ -8181,7 +8120,7 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
8181
8120
|
freshRule();
|
|
8182
8121
|
return true;
|
|
8183
8122
|
};
|
|
8184
|
-
const load = (_roomInfo, _roomRules, options) =>
|
|
8123
|
+
const load = async (_roomInfo, _roomRules, options) => {
|
|
8185
8124
|
const roomInfo = _roomInfo || params.roomInfo;
|
|
8186
8125
|
const roomRules = _roomRules || params.roomRules;
|
|
8187
8126
|
if (!roomInfo || !roomRules) {
|
|
@@ -8193,9 +8132,9 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
8193
8132
|
return _load(roomInfo, roomRules);
|
|
8194
8133
|
}
|
|
8195
8134
|
else {
|
|
8196
|
-
return
|
|
8135
|
+
return await new Promise((resolve) => five.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
|
|
8197
8136
|
}
|
|
8198
|
-
}
|
|
8137
|
+
};
|
|
8199
8138
|
if (params.roomInfo && params.roomRules) {
|
|
8200
8139
|
load(params.roomInfo, params.roomRules);
|
|
8201
8140
|
}
|
|
@@ -9105,22 +9044,20 @@ class Controller {
|
|
|
9105
9044
|
if ((_a = params.options) === null || _a === void 0 ? void 0 : _a.className)
|
|
9106
9045
|
this.container.classList.add((_b = params.options) === null || _b === void 0 ? void 0 : _b.className);
|
|
9107
9046
|
}
|
|
9108
|
-
this.five.once('modelLoaded', () =>
|
|
9109
|
-
var
|
|
9110
|
-
(
|
|
9111
|
-
})
|
|
9047
|
+
this.five.once('modelLoaded', async () => {
|
|
9048
|
+
var _a, _b;
|
|
9049
|
+
(_b = (_a = this.five.getElement()) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.append(this.container);
|
|
9050
|
+
});
|
|
9112
9051
|
this.five.once('dispose', () => this.dispose());
|
|
9113
9052
|
}
|
|
9114
|
-
load(serverData) {
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
this.state.loaded = true;
|
|
9123
|
-
});
|
|
9053
|
+
async load(serverData) {
|
|
9054
|
+
if (!this.five.work)
|
|
9055
|
+
return;
|
|
9056
|
+
const data = serverData.data;
|
|
9057
|
+
if (!data)
|
|
9058
|
+
throw new Error('标尺数据依赖不齐全!');
|
|
9059
|
+
this.panoRulerProData = data;
|
|
9060
|
+
this.state.loaded = true;
|
|
9124
9061
|
}
|
|
9125
9062
|
enable() {
|
|
9126
9063
|
if (!this.state.loaded)
|
|
@@ -9138,26 +9075,24 @@ class Controller {
|
|
|
9138
9075
|
this.render();
|
|
9139
9076
|
return true;
|
|
9140
9077
|
}
|
|
9141
|
-
render() {
|
|
9078
|
+
async render() {
|
|
9142
9079
|
var _a;
|
|
9143
|
-
|
|
9144
|
-
if (this.
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
this.
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
}
|
|
9160
|
-
});
|
|
9080
|
+
if (this.state.enabled) {
|
|
9081
|
+
if (!this.panoRulerProData || !this.container)
|
|
9082
|
+
return;
|
|
9083
|
+
this.rulerItems = new RulerItems({
|
|
9084
|
+
target: this.container,
|
|
9085
|
+
props: {
|
|
9086
|
+
five: this.five,
|
|
9087
|
+
rulerDatas: this.panoRulerProData,
|
|
9088
|
+
options: this.state.options,
|
|
9089
|
+
},
|
|
9090
|
+
});
|
|
9091
|
+
}
|
|
9092
|
+
else {
|
|
9093
|
+
(_a = this.rulerItems) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
9094
|
+
this.rulerItems = undefined;
|
|
9095
|
+
}
|
|
9161
9096
|
}
|
|
9162
9097
|
dispose() {
|
|
9163
9098
|
if (this.container) {
|
|
@@ -9226,14 +9161,12 @@ function getRoomInfoInstance() {
|
|
|
9226
9161
|
}
|
|
9227
9162
|
|
|
9228
9163
|
const textureLoader = new THREE.TextureLoader();
|
|
9229
|
-
function loadTexture(url) {
|
|
9230
|
-
return
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
return texture;
|
|
9236
|
-
});
|
|
9164
|
+
async function loadTexture(url) {
|
|
9165
|
+
return new Promise((resolve, reject) => {
|
|
9166
|
+
textureLoader.load(url, resolve, undefined, reject);
|
|
9167
|
+
}).then((texture) => {
|
|
9168
|
+
texture.encoding = THREE.sRGBEncoding;
|
|
9169
|
+
return texture;
|
|
9237
9170
|
});
|
|
9238
9171
|
}
|
|
9239
9172
|
|
|
@@ -9660,19 +9593,17 @@ class PanoCompassController extends Controller$4 {
|
|
|
9660
9593
|
this.init();
|
|
9661
9594
|
}
|
|
9662
9595
|
}
|
|
9663
|
-
load(data, state, userAction = true) {
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
this.setState(state, { userAction });
|
|
9672
|
-
}
|
|
9673
|
-
this.hooks.emit('dataLoaded', this.data);
|
|
9596
|
+
async load(data, state, userAction = true) {
|
|
9597
|
+
const nextData = await this.formatData(data);
|
|
9598
|
+
if (JSON.stringify(this.data) !== JSON.stringify(nextData)) {
|
|
9599
|
+
this.hooks.emit('dataChange', nextData, this.data);
|
|
9600
|
+
this.data = Object.assign({}, nextData);
|
|
9601
|
+
this.init();
|
|
9602
|
+
if (state) {
|
|
9603
|
+
this.setState(state, { userAction });
|
|
9674
9604
|
}
|
|
9675
|
-
|
|
9605
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
9606
|
+
}
|
|
9676
9607
|
}
|
|
9677
9608
|
formatData(serverData) {
|
|
9678
9609
|
if (serverData.version && serverData.data) {
|
|
@@ -9686,64 +9617,58 @@ class PanoCompassController extends Controller$4 {
|
|
|
9686
9617
|
* 初始化
|
|
9687
9618
|
* @todo 逻辑需要细分
|
|
9688
9619
|
*/
|
|
9689
|
-
init() {
|
|
9620
|
+
async init() {
|
|
9690
9621
|
var _a, _b, _c, _d;
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
9709
|
-
}
|
|
9710
|
-
this.group.add(this.entryDoorMesh);
|
|
9622
|
+
const northRad = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.north_rad) !== null && _b !== void 0 ? _b : null;
|
|
9623
|
+
this._clearCompassIfNeed();
|
|
9624
|
+
if (northRad !== null) {
|
|
9625
|
+
this.compassMesh = await this.loadCompassMesh();
|
|
9626
|
+
this.compassMesh.rotateX(-Math.PI / 2);
|
|
9627
|
+
this.compassMesh.rotateZ(northRad - Math.PI / 2);
|
|
9628
|
+
this.group.add(this.compassMesh);
|
|
9629
|
+
}
|
|
9630
|
+
const entrance = (_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.entrance) !== null && _d !== void 0 ? _d : null;
|
|
9631
|
+
this._clearEntryDoorIfNeed();
|
|
9632
|
+
if (entrance !== null) {
|
|
9633
|
+
this.entryDoorMesh = await this.loadEntryDoorMesh();
|
|
9634
|
+
this.roomInfoWrapperInstance = this.loadRoomInfo();
|
|
9635
|
+
this.roomInfoInstance = getRoomInfoInstance();
|
|
9636
|
+
this.entryDoorMesh.rotateX(-Math.PI / 2);
|
|
9637
|
+
if (this.roomInfoWrapperInstance) {
|
|
9638
|
+
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
9711
9639
|
}
|
|
9712
|
-
this.
|
|
9713
|
-
|
|
9714
|
-
|
|
9640
|
+
this.group.add(this.entryDoorMesh);
|
|
9641
|
+
}
|
|
9642
|
+
this.onFivePanoArrived(this.five.panoIndex || 0);
|
|
9643
|
+
this.five.needsRender = true;
|
|
9715
9644
|
}
|
|
9716
|
-
loadCompassMesh() {
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
depthTest: false,
|
|
9726
|
-
});
|
|
9727
|
-
const compassMesh = new THREE.Mesh(compassGeometry, compassMaterial);
|
|
9728
|
-
compassMesh.name = 'pano-compass-mesh';
|
|
9729
|
-
return compassMesh;
|
|
9645
|
+
async loadCompassMesh() {
|
|
9646
|
+
const compassImageUrl = this.state.config.compassImageUrl;
|
|
9647
|
+
const compassTexture = await loadTexture(compassImageUrl);
|
|
9648
|
+
const compassGeometry = new THREE.CircleGeometry(0.7, 32);
|
|
9649
|
+
const compassMaterial = new THREE.MeshBasicMaterial({
|
|
9650
|
+
map: compassTexture,
|
|
9651
|
+
transparent: true,
|
|
9652
|
+
opacity: 0,
|
|
9653
|
+
depthTest: false,
|
|
9730
9654
|
});
|
|
9655
|
+
const compassMesh = new THREE.Mesh(compassGeometry, compassMaterial);
|
|
9656
|
+
compassMesh.name = 'pano-compass-mesh';
|
|
9657
|
+
return compassMesh;
|
|
9731
9658
|
}
|
|
9732
|
-
loadEntryDoorMesh() {
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
depthTest: false,
|
|
9742
|
-
});
|
|
9743
|
-
const entryDoorMesh = new THREE.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
9744
|
-
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
9745
|
-
return entryDoorMesh;
|
|
9659
|
+
async loadEntryDoorMesh() {
|
|
9660
|
+
const entryDoorImageUrl = this.state.config.entryDoorImageUrl;
|
|
9661
|
+
const entryDoorTexture = await loadTexture(entryDoorImageUrl);
|
|
9662
|
+
const entryDoorGeometry = new THREE.PlaneGeometry(0.2, 0.16);
|
|
9663
|
+
const entryDoorMaterial = new THREE.MeshBasicMaterial({
|
|
9664
|
+
map: entryDoorTexture,
|
|
9665
|
+
transparent: true,
|
|
9666
|
+
opacity: 0.8,
|
|
9667
|
+
depthTest: false,
|
|
9746
9668
|
});
|
|
9669
|
+
const entryDoorMesh = new THREE.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
9670
|
+
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
9671
|
+
return entryDoorMesh;
|
|
9747
9672
|
}
|
|
9748
9673
|
loadRoomInfo() {
|
|
9749
9674
|
const points = [
|
|
@@ -15653,7 +15578,7 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15653
15578
|
xhr.send();
|
|
15654
15579
|
});
|
|
15655
15580
|
};
|
|
15656
|
-
const load = (data, videoElement) =>
|
|
15581
|
+
const load = async (data, videoElement) => {
|
|
15657
15582
|
const { video_src, video_poster_src, points } = data;
|
|
15658
15583
|
state.videoSource = video_src;
|
|
15659
15584
|
// TODO 存疑,先处理多一次遍历 o(2n)
|
|
@@ -15663,11 +15588,11 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15663
15588
|
if (videoElement) {
|
|
15664
15589
|
state.videoElement = videoElement;
|
|
15665
15590
|
}
|
|
15666
|
-
state.videoTexture =
|
|
15591
|
+
state.videoTexture = await getVideoTexture(state.videoSource, state.videoElement);
|
|
15667
15592
|
state.enabled = !!data.enable;
|
|
15668
15593
|
if (state.enabled)
|
|
15669
15594
|
enable();
|
|
15670
|
-
}
|
|
15595
|
+
};
|
|
15671
15596
|
const dispose = () => {
|
|
15672
15597
|
disable();
|
|
15673
15598
|
state.videoTexture = undefined;
|