@realsee/dnalogel 2.1.0-alpha.18 → 2.1.0-alpha.19
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/index.cjs.js +58 -58
- package/dist/index.es.js +5814 -8139
- package/dist/index.js +20871 -0
- package/dist/index.umd.js +50 -50
- package/docs/assets/search.js +1 -1
- package/docs/classes/CruisePluginController.html +15 -15
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/Object3DHelperController.html +22 -0
- package/docs/classes/PaintBrush.html +8 -0
- package/docs/classes/PanoTagPluginController.html +160 -0
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/ContentType.html +15 -0
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/DimensionType.html +1 -0
- 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/LinkType.html +1 -0
- package/docs/enums/PaintBrushTypeEnum.html +1 -0
- package/docs/enums/PointType.html +1 -0
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -0
- package/docs/interfaces/CSS3DRenderPluginState.html +3 -0
- 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/FloorplanServerDoorItem.html +1 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
- 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/Object3DHelperState.html +1 -0
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PaintBrushAction.html +13 -0
- package/docs/interfaces/PaintBrushConfigs.html +1 -0
- package/docs/interfaces/PaintBrushState.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +2 -2
- 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/interfaces/Scissor.html +14 -0
- package/docs/interfaces/TagConfig.html +11 -0
- package/docs/interfaces/Tags.html +5 -0
- package/docs/modules.html +25 -20
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +5 -3
- package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -2
- package/libs/CSS3DRenderPlugin/Controller.js +23 -21
- package/libs/CSS3DRenderPlugin/index.js +3 -4
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +29 -30
- package/libs/CSS3DRenderPlugin/utils/centerPoint.d.ts +1 -1
- package/libs/CSS3DRenderPlugin/utils/centerPoint.js +7 -4
- package/libs/CruisePlugin/Controller.d.ts +3 -1
- package/libs/CruisePlugin/Controller.js +158 -150
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/CruisePlugin/typing.d.ts +5 -0
- package/libs/GuideLinePlugin/Controller.d.ts +6 -1
- package/libs/GuideLinePlugin/Controller.js +53 -37
- package/libs/GuideLinePlugin/index.d.ts +2 -2
- package/libs/GuideLinePlugin/index.js +5 -5
- package/libs/GuideLinePlugin/typing.d.ts +3 -0
- package/libs/GuideLinePlugin/utils/getArrowMaterial.d.ts +2 -2
- package/libs/GuideLinePlugin/utils/getArrowMaterial.js +6 -7
- package/libs/GuideLinePlugin/utils/getLineGeometries.d.ts +8 -6
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +72 -72
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +8 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/Plugin.js +129 -139
- package/libs/ModelTVVideoPlugin/index.js +14 -5
- package/libs/ModelTVVideoPlugin/typings.js +0 -1
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/utils/parseData.js +12 -8
- package/libs/Object3DHelperPlugin/Controller.js +10 -11
- package/libs/Object3DHelperPlugin/index.js +8 -9
- package/libs/Object3DHelperPlugin/mocks/addObject3D.d.ts +2 -0
- package/libs/Object3DHelperPlugin/mocks/objects.d.ts +7 -0
- package/libs/PanoCompassPlugin/Controller.js +13 -14
- package/libs/PanoCompassPlugin/index.js +4 -5
- package/libs/PanoDoorLabelPlugin/BaseController.js +24 -23
- package/libs/PanoDoorLabelPlugin/Controller.js +3 -2
- package/libs/PanoDoorLabelPlugin/index.js +4 -3
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +3 -4
- package/libs/PanoSpatialTagPlugin/index.js +3 -4
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoTagPlugin/Assets/Icon.d.ts +2 -0
- package/libs/PanoTagPlugin/Components/Common/Media.js +1024 -3363
- package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -1
- package/libs/PanoTagPlugin/controller/TagComputer.js +2 -2
- package/libs/PanoTagPlugin/controller/index.js +7 -8
- package/libs/PanoTagPlugin/index.js +13 -14
- package/libs/PanoTagPlugin/mocks/mock1.d.ts +168 -0
- package/libs/PanoTagPlugin/mocks/mock2.d.ts +233 -0
- package/libs/PanoTagPlugin/mocks/mock3.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/mock4.d.ts +56 -0
- package/libs/PanoTagPlugin/mocks/mock5.d.ts +13 -0
- package/libs/PanoTagPlugin/mocks/mock6.d.ts +16 -0
- package/libs/PanoTagPlugin/mocks/mock7.d.ts +22 -0
- package/libs/PanoTagPlugin/utils/constants.d.ts +3 -0
- package/libs/PanoTagPlugin/utils/nullishCoalescing.d.ts +2 -0
- package/libs/{TagComputer.8a257a9e.js → TagComputer.5bd7014b.js} +0 -0
- package/libs/base/BasePlugin.d.ts +8 -2
- package/libs/base/BasePlugin.js +11 -10
- package/libs/base/BasePluginWithData.js +1 -1
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/libs/floorplan/index.js +1 -1
- package/libs/index.d.ts +0 -1
- package/libs/index.js +89 -92
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -1
- package/libs/shared-utils/Object3DHelper/index.js +1 -1
- package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/utils/negateScale.d.ts +2 -0
- package/libs/shared-utils/Preloader.d.ts +6 -0
- package/libs/shared-utils/Subscribe.d.ts +0 -1
- package/libs/shared-utils/Subscribe.js +5 -6
- package/libs/shared-utils/debounce.d.ts +6 -0
- package/libs/shared-utils/formatRad.d.ts +7 -0
- package/libs/shared-utils/getRandomColor.d.ts +1 -0
- package/libs/shared-utils/logger.d.ts +16 -0
- package/libs/shared-utils/math/evenNumber.d.ts +3 -0
- package/libs/shared-utils/math/rad2Deg.d.ts +1 -0
- package/libs/shared-utils/px2rem.d.ts +1 -0
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/libs/shared-utils/three/getNormal.d.ts +2 -0
- package/libs/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/libs/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/libs/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/libs/typings/utils.type.d.ts +2 -0
- package/package.json +6 -4
- package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
- package/libs/shared-utils/three/centerPoint.js +0 -7
|
@@ -3,12 +3,12 @@ var q = (f, e, s) => e in f ? B(f, e, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var l = (f, e, s) => (q(f, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
4
|
import * as m from "three";
|
|
5
5
|
import { CSS3DRenderer as A } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
6
|
-
import H from "../shared-utils/Subscribe.js";
|
|
6
|
+
import { Subscribe as H } from "../shared-utils/Subscribe.js";
|
|
7
7
|
import { evenNumber as _ } from "./utils/evenNumber.js";
|
|
8
8
|
import { anyPositionToVector3 as x } from "./utils/positionToVector3.js";
|
|
9
9
|
import { CSS3DObjectPlus as V } from "./utils/CSS3DObjectPlus.js";
|
|
10
10
|
import "./utils/centerPoint.js";
|
|
11
|
-
const U = "v2.0.
|
|
11
|
+
const U = "v2.0.1", T = "CSS3DRenderer", Z = "__CSS3DOBJECT_CSS3DRENDER_CONTAINER__", D = `${T}@${U}`, L = (f) => `${D}--${f}`, ee = 216e-5, o = {};
|
|
12
12
|
class te {
|
|
13
13
|
constructor() {
|
|
14
14
|
l(this, "hooks", new H());
|
|
@@ -104,7 +104,9 @@ class te {
|
|
|
104
104
|
l(this, "setVisibleById", (e, s) => {
|
|
105
105
|
var i;
|
|
106
106
|
const t = (i = this.store.frontModeCSS3DObjects[e]) != null ? i : this.store.behindModeCSS3DObjects[e];
|
|
107
|
-
|
|
107
|
+
if (!t)
|
|
108
|
+
return console.error("id not found", e);
|
|
109
|
+
t.visible = s, this.state.visible && (t.css3DObject.visible = s, t.mode === "behind" && (t.opacityMesh.visible = s));
|
|
108
110
|
});
|
|
109
111
|
l(this, "setEnabledById", (e, s) => {
|
|
110
112
|
var n, a, h;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as BasePlugin from '../base/BasePlugin';
|
|
2
2
|
import type { Five } from '@realsee/five';
|
|
3
3
|
import { CSS3DRender, CSS3DRenderEventMap, CSS3DRenderState } from './CSS3DRender';
|
|
4
|
-
import { AnyPosition } from './utils';
|
|
4
|
+
import type { AnyPosition } from './utils';
|
|
5
5
|
export declare const PLUGIN_NAME: string;
|
|
6
6
|
export interface Create3DDomContainerParamsType {
|
|
7
7
|
points: AnyPosition[];
|
|
@@ -22,6 +22,7 @@ export interface Create3DDomContainerParamsType {
|
|
|
22
22
|
}
|
|
23
23
|
export default class Controller extends CSS3DRender implements BasePlugin.Controller<CSS3DRenderState, CSS3DRenderEventMap> {
|
|
24
24
|
five: Five;
|
|
25
|
+
readonly staticPrefix: string;
|
|
25
26
|
constructor(five: Five);
|
|
26
27
|
/** @deprecated disposeAll() renamed as dispose() */
|
|
27
28
|
disposeAll(): void;
|
|
@@ -61,7 +62,7 @@ export default class Controller extends CSS3DRender implements BasePlugin.Contro
|
|
|
61
62
|
* } | void
|
|
62
63
|
* ```
|
|
63
64
|
*/
|
|
64
|
-
create3DDomContainer: (points: Create3DDomContainerParamsType['points'], config?: Create3DDomContainerParamsType['config']) =>
|
|
65
|
+
create3DDomContainer: (points: Create3DDomContainerParamsType['points'], config?: Create3DDomContainerParamsType['config']) => {
|
|
65
66
|
render: () => void;
|
|
66
67
|
id: string;
|
|
67
68
|
container: HTMLElement;
|
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
var h = Object.defineProperty;
|
|
2
|
-
var R = (
|
|
3
|
-
var
|
|
2
|
+
var R = (i, r, t) => r in i ? h(i, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[r] = t;
|
|
3
|
+
var n = (i, r, t) => (R(i, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
4
|
import { CSS3DRender as E } from "./CSS3DRender.js";
|
|
5
5
|
import "three";
|
|
6
|
-
import { random as S } from "./utils/random.js";
|
|
7
6
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
7
|
import "../shared-utils/Subscribe.js";
|
|
9
8
|
import "./utils/evenNumber.js";
|
|
10
9
|
import "./utils/positionToVector3.js";
|
|
11
10
|
import "./utils/CSS3DObjectPlus.js";
|
|
12
11
|
import "./utils/centerPoint.js";
|
|
13
|
-
const
|
|
14
|
-
class
|
|
12
|
+
const S = "v2.0.1", c = `CSS3DRenderPlugin@${S}`;
|
|
13
|
+
class A extends E {
|
|
15
14
|
constructor(t) {
|
|
16
15
|
super();
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
n(this, "five");
|
|
17
|
+
n(this, "staticPrefix", "//vrlab-static.ljcdn.com");
|
|
18
|
+
n(this, "create3DDomContainer", (t, e) => {
|
|
19
19
|
if (this.state.disposed)
|
|
20
20
|
return;
|
|
21
|
-
const
|
|
21
|
+
const d = (() => {
|
|
22
22
|
var v;
|
|
23
23
|
(e == null ? void 0 : e.dpr) !== void 0 && console.warn(`${c}: please use "config.devicePixelRatio" replace "config.dpr"`);
|
|
24
|
-
const
|
|
24
|
+
const o = {
|
|
25
25
|
ratio: 216e-5,
|
|
26
26
|
devicePixelRatio: (v = e == null ? void 0 : e.dpr) != null ? v : 1,
|
|
27
27
|
mode: "front",
|
|
28
28
|
autoRender: !0
|
|
29
29
|
};
|
|
30
|
-
return Object.assign(
|
|
31
|
-
})(),
|
|
32
|
-
if (!
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
return Object.assign(o, e, (e == null ? void 0 : e.mode) === "behind" ? { scene: this.five.scene } : void 0);
|
|
31
|
+
})(), a = this.five.getElement();
|
|
32
|
+
if (!a) {
|
|
33
|
+
console.error(`${c}: five.getElement() is ${a}`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const { autoRender: p, mode: s } = d, f = s === "front" ? a.parentElement : d.behindFiveContainer;
|
|
35
37
|
this.appendToElement(f || document.body, s);
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
+
const l = this.create3DElement(this.five.camera, t, { ...d, autoRender: !1 });
|
|
39
|
+
if (!l)
|
|
38
40
|
return;
|
|
39
|
-
const
|
|
40
|
-
var
|
|
41
|
-
s === "front" &&
|
|
41
|
+
const m = l.render, u = () => {
|
|
42
|
+
var o;
|
|
43
|
+
s === "front" && m(), s === "behind" && ((o = this.five.model) != null && o.loaded ? m() : this.five.once("modelLoaded", () => m()));
|
|
42
44
|
};
|
|
43
|
-
return p && u(), { ...
|
|
45
|
+
return p && u(), { ...l, render: p ? void 0 : u };
|
|
44
46
|
});
|
|
45
47
|
this.five = t;
|
|
46
48
|
}
|
|
@@ -54,5 +56,5 @@ class O extends E {
|
|
|
54
56
|
}
|
|
55
57
|
export {
|
|
56
58
|
c as PLUGIN_NAME,
|
|
57
|
-
|
|
59
|
+
A as default
|
|
58
60
|
};
|
|
@@ -7,9 +7,8 @@ import "./utils/evenNumber.js";
|
|
|
7
7
|
import "./utils/positionToVector3.js";
|
|
8
8
|
import "./utils/CSS3DObjectPlus.js";
|
|
9
9
|
import "./utils/centerPoint.js";
|
|
10
|
-
|
|
11
|
-
const s = (o) => new r(o);
|
|
10
|
+
const f = (o) => new r(o);
|
|
12
11
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
f as CSS3DRenderPlugin,
|
|
13
|
+
f as default
|
|
15
14
|
};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (
|
|
4
|
-
import { CSS3DObject as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
t.style.width = `${c}px`, t.style.height = `${d}px`, u = t;
|
|
1
|
+
var P = Object.defineProperty;
|
|
2
|
+
var W = (c, o, t) => o in c ? P(c, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[o] = t;
|
|
3
|
+
var i = (c, o, t) => (W(c, typeof o != "symbol" ? o + "" : o, t), t);
|
|
4
|
+
import { CSS3DObject as D } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
5
|
+
import { Vector3 as m } from "three";
|
|
6
|
+
import { evenNumber as V } from "./evenNumber.js";
|
|
7
|
+
import { centerPoint as E } from "./centerPoint.js";
|
|
8
|
+
const f = "1.0.1", H = `CSS3DObjectPlus@${f}`, j = 216e-5, v = 3e-3;
|
|
9
|
+
class T extends D {
|
|
10
|
+
constructor(t, e, h = v, u = 1) {
|
|
11
|
+
const l = Math.max(j, h), p = e[0].distanceTo(e[1]), a = e[1].distanceTo(e[2]), n = V(p / h * u), d = V(a / h * u), x = E(...e);
|
|
12
|
+
let g;
|
|
13
|
+
if (l === h)
|
|
14
|
+
t.style.width = `${n}px`, t.style.height = `${d}px`, g = t;
|
|
16
15
|
else {
|
|
17
16
|
const s = document.createElement("div");
|
|
18
|
-
s.style.width = `${
|
|
19
|
-
const
|
|
20
|
-
t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${
|
|
17
|
+
s.style.width = `${n}px`, s.style.height = `${d}px`, s.style.pointerEvents = "none";
|
|
18
|
+
const b = h / l;
|
|
19
|
+
t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${b * n}px`, t.style.height = `${b * d}px`, s.appendChild(t), g = s;
|
|
21
20
|
}
|
|
22
|
-
super(
|
|
21
|
+
super(g);
|
|
23
22
|
i(this, "version", f);
|
|
24
23
|
i(this, "width");
|
|
25
24
|
i(this, "height");
|
|
@@ -29,21 +28,21 @@ class T extends z {
|
|
|
29
28
|
i(this, "ratio");
|
|
30
29
|
i(this, "container");
|
|
31
30
|
i(this, "centerPosition");
|
|
32
|
-
if (this.scale.set(
|
|
33
|
-
this.width = p, this.height =
|
|
31
|
+
if (this.scale.set(l, l, l), this.cornerPoints = e, this.ratio = h, this.container = t, l === h)
|
|
32
|
+
this.width = p, this.height = a, this.domWidthPx = n, this.domHeightPx = d, this.centerPosition = x;
|
|
34
33
|
else {
|
|
35
|
-
const s = h /
|
|
36
|
-
this.width = s * p, this.height = s *
|
|
34
|
+
const s = h / l;
|
|
35
|
+
this.width = s * p, this.height = s * a, this.domWidthPx = s * n, this.domHeightPx = s * d, this.centerPosition = new m().subVectors(x, e[0]).multiplyScalar(s).add(e[0]);
|
|
37
36
|
}
|
|
38
|
-
t.classList.add(`${
|
|
39
|
-
const S = new
|
|
40
|
-
this.
|
|
41
|
-
const
|
|
42
|
-
this.
|
|
37
|
+
t.classList.add(`${H}__container`);
|
|
38
|
+
const S = new m().subVectors(e[1], e[0]), r = new m().subVectors(e[3], e[0]), $ = new m().crossVectors(S, r).normalize();
|
|
39
|
+
this.lookAt($);
|
|
40
|
+
const y = this.up.clone().applyQuaternion(this.quaternion), w = r.clone(), O = new m().crossVectors(y, w).normalize();
|
|
41
|
+
this.rotateOnWorldAxis(O, y.angleTo(w)), this.position.copy(x);
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
export {
|
|
46
45
|
T as CSS3DObjectPlus,
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
v as DefaultRatio,
|
|
47
|
+
j as MinRatio
|
|
49
48
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Vector3 } from 'three';
|
|
2
|
-
export declare function centerPoint(
|
|
2
|
+
export declare function centerPoint(...args: Vector3[]): Vector3;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { Vector3 as
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
import { Vector3 as r } from "three";
|
|
2
|
+
function c(...t) {
|
|
3
|
+
const e = new r();
|
|
4
|
+
return t.forEach((n) => {
|
|
5
|
+
e.add(n);
|
|
6
|
+
}), e.divideScalar(t.length), e;
|
|
4
7
|
}
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
c as centerPoint
|
|
7
10
|
};
|
|
@@ -2,14 +2,16 @@ import type { Five } from '@realsee/five';
|
|
|
2
2
|
import type { BaseOptions } from '../base/BasePlugin';
|
|
3
3
|
import * as BasePluginWithData from '../base/BasePluginWithData';
|
|
4
4
|
import type { PluginState, EventMap, PluginServerData, PluginData } from './typing';
|
|
5
|
+
import type { Config } from '../base/BasePlugin';
|
|
5
6
|
export declare const pluginFlag: (name: string) => string;
|
|
6
7
|
export default class CruisePluginController extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
|
|
7
8
|
static PluginVersion: string;
|
|
8
9
|
state: PluginState;
|
|
9
10
|
protected data?: PluginData;
|
|
11
|
+
private config?;
|
|
10
12
|
private privateState;
|
|
11
13
|
private GuideLine?;
|
|
12
|
-
constructor(five: Five);
|
|
14
|
+
constructor(five: Five, config?: Config);
|
|
13
15
|
/**
|
|
14
16
|
* @description Load Data and State
|
|
15
17
|
*/
|