@realsee/dnalogel 2.0.0-alpha.35-beta2 → 2.0.0-alpha.35
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/PanoSpatialTagPlugin/Plugin.d.ts +2 -0
- package/dist/PanoSpatialTagPlugin/index.js +40 -45
- package/dist/index.es.js +40 -45
- package/dist/index.js +40 -45
- package/dist/index.umd.js +40 -45
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/PanoFloorplanRadarPluginController.html +2 -2
- 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/ModelFloorplanErrorType.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +1 -1
- 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/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- 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/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.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/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/interfaces/TopviewFloorplanPluginParameterType.html +9 -9
- package/docs/modules.html +20 -20
- package/libs/PanoSpatialTagPlugin/Components/tag.js +2 -2
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +2 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +38 -43
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -11980,7 +11980,7 @@
|
|
|
11980
11980
|
div3 = internal.element("div");
|
|
11981
11981
|
div2 = internal.element("div");
|
|
11982
11982
|
internal.attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-eb8bdm");
|
|
11983
|
-
internal.set_style(div0, "transform", "translate(" + /*contentWidth*/ ctx[7] / 2 * /*contentZoom*/ ctx[3] * 3 + "px, " + /*contentHeight*/ ctx[8] / 2 * (/*upsideDown*/ ctx[1] ? -1 : 1) * /*contentZoom*/ ctx[3] * 3 + "px)");
|
|
11983
|
+
internal.set_style(div0, "transform", "translate(" + /*contentWidth*/ ctx[7] / 2 * /*contentZoom*/ ctx[3] * 3 + "px, " + /*contentHeight*/ ctx[8] / 2 * (/*upsideDown*/ ctx[1] ? -1 : 1) * /*contentZoom*/ ctx[3] * 3 + "px) scale(" + 1 / /*contentZoom*/ ctx[3] + ")");
|
|
11984
11984
|
internal.attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-eb8bdm");
|
|
11985
11985
|
internal.set_style(i0, "width", /*lineWidthZoom*/ ctx[4] + "rem");
|
|
11986
11986
|
internal.attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-eb8bdm");
|
|
@@ -12020,7 +12020,7 @@
|
|
|
12020
12020
|
},
|
|
12021
12021
|
p(ctx, [dirty]) {
|
|
12022
12022
|
if (dirty & /*contentWidth, contentZoom, contentHeight, upsideDown*/ 394) {
|
|
12023
|
-
internal.set_style(div0, "transform", "translate(" + /*contentWidth*/ ctx[7] / 2 * /*contentZoom*/ ctx[3] * 3 + "px, " + /*contentHeight*/ ctx[8] / 2 * (/*upsideDown*/ ctx[1] ? -1 : 1) * /*contentZoom*/ ctx[3] * 3 + "px)");
|
|
12023
|
+
internal.set_style(div0, "transform", "translate(" + /*contentWidth*/ ctx[7] / 2 * /*contentZoom*/ ctx[3] * 3 + "px, " + /*contentHeight*/ ctx[8] / 2 * (/*upsideDown*/ ctx[1] ? -1 : 1) * /*contentZoom*/ ctx[3] * 3 + "px) scale(" + 1 / /*contentZoom*/ ctx[3] + ")");
|
|
12024
12024
|
}
|
|
12025
12025
|
|
|
12026
12026
|
if (dirty & /*lineWidthZoom*/ 16) {
|
|
@@ -12444,13 +12444,11 @@
|
|
|
12444
12444
|
const MESH_SIZE = 0.001;
|
|
12445
12445
|
const RAY_TOLERANT_DISTANCE = 0.01;
|
|
12446
12446
|
const BLUR_IMAGE_URL = 'https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png';
|
|
12447
|
-
const MIN_DISTANCE = 1.2;
|
|
12448
|
-
const MAX_DISTANCE = 3.5;
|
|
12449
12447
|
/**
|
|
12450
12448
|
* 空间游走标签插件
|
|
12451
12449
|
*/
|
|
12452
12450
|
const PanoSpatialTagPlugin = (five$1, params) => {
|
|
12453
|
-
var _a, _b, _c, _d, _e, _f;
|
|
12451
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
12454
12452
|
let wrapper = params === null || params === void 0 ? void 0 : params.container;
|
|
12455
12453
|
let centerY = 1.4;
|
|
12456
12454
|
const wait = (_a = params === null || params === void 0 ? void 0 : params.wait) !== null && _a !== void 0 ? _a : 200;
|
|
@@ -12458,6 +12456,8 @@
|
|
|
12458
12456
|
const minRad = (_c = params === null || params === void 0 ? void 0 : params.minRad) !== null && _c !== void 0 ? _c : Math.PI / 4;
|
|
12459
12457
|
const nearTolerance = (_d = params === null || params === void 0 ? void 0 : params.nearTolerance) !== null && _d !== void 0 ? _d : 100;
|
|
12460
12458
|
const upsideHeight = (_e = params === null || params === void 0 ? void 0 : params.upsideHeight) !== null && _e !== void 0 ? _e : 1.6;
|
|
12459
|
+
const minDistance = (_f = params === null || params === void 0 ? void 0 : params.minDistance) !== null && _f !== void 0 ? _f : 1.2;
|
|
12460
|
+
const maxDistance = (_g = params === null || params === void 0 ? void 0 : params.maxDistance) !== null && _g !== void 0 ? _g : 3.5;
|
|
12461
12461
|
// const foldPercent = params?.foldPercent ?? 20
|
|
12462
12462
|
const css3DRender = CSS3DRenderPlugin(five$1);
|
|
12463
12463
|
const container = document.createElement('div');
|
|
@@ -12512,7 +12512,7 @@
|
|
|
12512
12512
|
frustum.setFromProjectionMatrix(projScreenMatrix);
|
|
12513
12513
|
state.tags.forEach(tag => {
|
|
12514
12514
|
const distance = camera.position.clone().setY(centerY).distanceTo(tag.position);
|
|
12515
|
-
if (distance <
|
|
12515
|
+
if (distance < minDistance || distance > maxDistance)
|
|
12516
12516
|
return tag.destroying = true;
|
|
12517
12517
|
if (!frustum.containsPoint(tag.position))
|
|
12518
12518
|
return tag.destroying = true;
|
|
@@ -12524,16 +12524,16 @@
|
|
|
12524
12524
|
state.tags.forEach(tag => {
|
|
12525
12525
|
if (tag.destroying) {
|
|
12526
12526
|
tag.app.$set({
|
|
12527
|
-
contentZoom: 0.1 + camera.position.distanceTo(tag.position) /
|
|
12528
|
-
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) /
|
|
12527
|
+
contentZoom: 0.1 + camera.position.distanceTo(tag.position) / maxDistance,
|
|
12528
|
+
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) / maxDistance),
|
|
12529
12529
|
destroying: tag.destroying,
|
|
12530
12530
|
});
|
|
12531
12531
|
}
|
|
12532
12532
|
else {
|
|
12533
12533
|
tag.app.$set({
|
|
12534
|
-
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) /
|
|
12535
|
-
lineHeightZoom: 0.4 + (camera.position.distanceTo(tag.position) -
|
|
12536
|
-
contentZoom: 0.1 + camera.position.distanceTo(tag.position) /
|
|
12534
|
+
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) / maxDistance),
|
|
12535
|
+
lineHeightZoom: 0.4 + (camera.position.distanceTo(tag.position) - minDistance) / maxDistance * 0.6,
|
|
12536
|
+
contentZoom: 0.1 + camera.position.distanceTo(tag.position) / maxDistance,
|
|
12537
12537
|
});
|
|
12538
12538
|
}
|
|
12539
12539
|
});
|
|
@@ -12607,7 +12607,7 @@
|
|
|
12607
12607
|
if (state.tags.find(tag => point.id === tag.id && !tag.destroying))
|
|
12608
12608
|
return result;
|
|
12609
12609
|
const distance = camera.position.clone().setY(centerY).distanceTo(point.position);
|
|
12610
|
-
if (distance <
|
|
12610
|
+
if (distance < minDistance || distance > maxDistance)
|
|
12611
12611
|
return result;
|
|
12612
12612
|
if (!frustum.containsPoint(point.position))
|
|
12613
12613
|
return result;
|
|
@@ -12692,9 +12692,9 @@
|
|
|
12692
12692
|
props: {
|
|
12693
12693
|
id,
|
|
12694
12694
|
content: state.render(state.template, replacement),
|
|
12695
|
-
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(position) /
|
|
12696
|
-
lineHeightZoom: 0.4 + (camera.position.distanceTo(position) -
|
|
12697
|
-
contentZoom: 0.1 + camera.position.distanceTo(position) /
|
|
12695
|
+
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(position) / maxDistance),
|
|
12696
|
+
lineHeightZoom: 0.4 + (camera.position.distanceTo(position) - minDistance) / maxDistance * 0.6,
|
|
12697
|
+
contentZoom: 0.1 + camera.position.distanceTo(position) / maxDistance,
|
|
12698
12698
|
upsideDown: position.y > upsideHeight,
|
|
12699
12699
|
folded: state.folded,
|
|
12700
12700
|
events: state.events,
|
|
@@ -12805,6 +12805,22 @@
|
|
|
12805
12805
|
tag.app.$set({ folded: true });
|
|
12806
12806
|
});
|
|
12807
12807
|
};
|
|
12808
|
+
const onResize = () => {
|
|
12809
|
+
five$1.once('renderFrame', updateOrigins);
|
|
12810
|
+
};
|
|
12811
|
+
const onModelLoaded = () => {
|
|
12812
|
+
if (!wrapper)
|
|
12813
|
+
wrapper = five$1.getElement().parentElement;
|
|
12814
|
+
if (wrapper)
|
|
12815
|
+
wrapper.appendChild(container);
|
|
12816
|
+
state.forbidden = false;
|
|
12817
|
+
centerY = five$1.model.bounding.getCenter(new THREE__namespace.Vector3()).y;
|
|
12818
|
+
updateTags();
|
|
12819
|
+
five$1.on('panoWillArrive', onPanoWillArrive);
|
|
12820
|
+
five$1.on('panoArrived', onPanoArrived);
|
|
12821
|
+
five$1.on('modeChange', onModeChange);
|
|
12822
|
+
five$1.on('cameraUpdate', onCameraUpdate);
|
|
12823
|
+
};
|
|
12808
12824
|
const dispose = () => {
|
|
12809
12825
|
blurImage = null;
|
|
12810
12826
|
css3DRender.disposeAll();
|
|
@@ -12815,41 +12831,20 @@
|
|
|
12815
12831
|
});
|
|
12816
12832
|
state.origins = [];
|
|
12817
12833
|
state.tags = [];
|
|
12834
|
+
five$1.off('modelLoaded', onModelLoaded);
|
|
12835
|
+
five$1.off('renderFrame', updateOrigins);
|
|
12818
12836
|
five$1.off('panoWillArrive', onPanoWillArrive);
|
|
12819
12837
|
five$1.off('panoArrived', onPanoArrived);
|
|
12820
12838
|
five$1.off('modeChange', onModeChange);
|
|
12821
12839
|
five$1.off('cameraUpdate', onCameraUpdate);
|
|
12822
|
-
|
|
12840
|
+
five$1.off('dispose', dispose);
|
|
12841
|
+
window.removeEventListener('resize', onResize, false);
|
|
12823
12842
|
};
|
|
12824
|
-
window.addEventListener('resize',
|
|
12825
|
-
if ((
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
wrapper.appendChild(container);
|
|
12830
|
-
state.forbidden = false;
|
|
12831
|
-
centerY = five$1.model.bounding.getCenter(new THREE__namespace.Vector3()).y;
|
|
12832
|
-
updateTags();
|
|
12833
|
-
five$1.on('panoWillArrive', onPanoWillArrive);
|
|
12834
|
-
five$1.on('panoArrived', onPanoArrived);
|
|
12835
|
-
five$1.on('modeChange', onModeChange);
|
|
12836
|
-
five$1.on('cameraUpdate', onCameraUpdate);
|
|
12837
|
-
}
|
|
12838
|
-
else {
|
|
12839
|
-
five$1.once('modelLoaded', () => {
|
|
12840
|
-
if (!wrapper)
|
|
12841
|
-
wrapper = five$1.getElement().parentElement;
|
|
12842
|
-
if (wrapper)
|
|
12843
|
-
wrapper.appendChild(container);
|
|
12844
|
-
centerY = five$1.model.bounding.getCenter(new THREE__namespace.Vector3()).y;
|
|
12845
|
-
state.forbidden = false;
|
|
12846
|
-
updateTags();
|
|
12847
|
-
five$1.on('panoWillArrive', onPanoWillArrive);
|
|
12848
|
-
five$1.on('panoArrived', onPanoArrived);
|
|
12849
|
-
five$1.on('modeChange', onModeChange);
|
|
12850
|
-
five$1.on('cameraUpdate', onCameraUpdate);
|
|
12851
|
-
});
|
|
12852
|
-
}
|
|
12843
|
+
window.addEventListener('resize', onResize, false);
|
|
12844
|
+
if ((_h = five$1 === null || five$1 === void 0 ? void 0 : five$1.model) === null || _h === void 0 ? void 0 : _h.loaded)
|
|
12845
|
+
onModelLoaded();
|
|
12846
|
+
else
|
|
12847
|
+
five$1.once('modelLoaded', onModelLoaded);
|
|
12853
12848
|
five$1.on('dispose', dispose);
|
|
12854
12849
|
return {
|
|
12855
12850
|
load,
|