@realsee/dnalogel 2.2.5-alpha.0 → 2.2.6
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/CSS3DRender.d.ts +34 -47
- package/dist/CSS3DRenderPlugin/Controller.d.ts +5 -5
- package/dist/CSS3DRenderPlugin/index.d.ts +1 -2
- package/dist/CSS3DRenderPlugin/utils/{three/CSS3DObject.d.ts → CSS3DObjectPlus.d.ts} +11 -25
- package/dist/CSS3DRenderPlugin/utils/evenNumber.d.ts +3 -0
- package/dist/CSS3DRenderPlugin/utils/index.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +1 -0
- package/dist/Object3DHelperPlugin/Controller.d.ts +0 -2
- package/dist/index.cjs.js +46 -46
- package/dist/index.js +4897 -5028
- package/dist/index.umd.js +38 -38
- package/dist/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +2 -2
- package/dist/shared-utils/three/{transfromToMeshBasicMaterial.d.ts → transformToMeshBasicMaterial.d.ts} +0 -0
- package/docs/assets/highlight.css +0 -7
- package/docs/assets/search.js +1 -1
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +39 -39
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +12 -12
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/LinkType.html +7 -7
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +5 -6
- package/docs/functions/CameraMovementPlugin.html +5 -6
- package/docs/functions/CruisePlugin.html +5 -6
- package/docs/functions/GuideLinePlugin.html +6 -7
- package/docs/functions/ItemLabelPlugin.html +5 -6
- package/docs/functions/MapviewFloorplanPlugin.html +5 -6
- package/docs/functions/ModelChassisCompassPlugin.html +5 -6
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -6
- package/docs/functions/ModelFloorplanPlugin.html +5 -6
- package/docs/functions/ModelItemLabelPlugin.html +5 -6
- package/docs/functions/ModelRoomLabelPlugin.html +5 -6
- package/docs/functions/ModelTVVideoPlugin.html +5 -6
- package/docs/functions/ModelViewPlugin.html +5 -6
- package/docs/functions/Object3DHelperPlugin.html +5 -6
- package/docs/functions/PanoCompassPlugin.html +5 -6
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -6
- package/docs/functions/PanoDoorLabelPlugin.html +5 -6
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -6
- package/docs/functions/PanoMeasurePlugin.html +5 -6
- package/docs/functions/PanoRulerPlugin.html +5 -6
- package/docs/functions/PanoRulerProPlugin.html +5 -6
- package/docs/functions/PanoSpatialTagPlugin.html +5 -6
- package/docs/functions/PanoTagPlugin.html +5 -6
- package/docs/functions/TopviewFloorplanPlugin.html +5 -6
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +6 -7
- package/docs/index.html +5 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +8 -8
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +6 -7
- package/docs/interfaces/PanoMeasureParameterType.html +11 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +6 -7
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +6 -7
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/PointJson.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +6 -7
- package/docs/interfaces/Rooms.html +6 -7
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +5 -7
- package/docs/types/ArrayPosition.html +6 -7
- package/docs/types/CSS3DRenderExportType.html +7 -8
- package/docs/types/CSS3DRenderPluginExportType.html +6 -7
- package/docs/types/CSS3DRenderPluginParameterType.html +6 -7
- package/docs/types/Color.html +6 -7
- package/docs/types/ContentTypeConfigKey.html +6 -7
- package/docs/types/ContentTypeConfigKeyArray.html +6 -7
- package/docs/types/Create3DDomContainerReturnType.html +6 -7
- package/docs/types/Create3DElementReturnType.html +7 -8
- package/docs/types/CruisePluginExportType.html +6 -7
- package/docs/types/Direction-1.html +6 -7
- package/docs/types/Direction4.html +6 -7
- package/docs/types/FloorplanRuleLabels.html +6 -7
- package/docs/types/FloorplanServerRuleLabels.html +6 -7
- package/docs/types/GuideLinePluginExportType.html +6 -7
- package/docs/types/HelperEventMap.html +6 -7
- package/docs/types/MapviewFloorplanPluginParameterType.html +6 -7
- package/docs/types/MapviewFloorplanPluginReturnType.html +6 -7
- package/docs/types/MediaData.html +6 -7
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -8
- package/docs/types/ModelFloorplanPluginParameterType.html +6 -7
- package/docs/types/ModelFloorplanPluginReturnType.html +6 -7
- package/docs/types/ModelRoomLabelPluginParameters.html +6 -7
- package/docs/types/ModelRoomLabelPluginReturnType.html +6 -7
- package/docs/types/MoveArgs.html +6 -7
- package/docs/types/MoveOpts.html +6 -7
- package/docs/types/Object3DHelperEventMap.html +6 -7
- package/docs/types/ObjectFit.html +6 -7
- package/docs/types/PaintBrushEventMap.html +6 -7
- package/docs/types/PanoCompassPluginData.html +6 -7
- package/docs/types/PanoCompassPluginExportType.html +6 -7
- package/docs/types/PanoCompassPluginParameterType.html +6 -7
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +6 -7
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +6 -7
- package/docs/types/PanoMeasurePluginEvent.html +6 -7
- package/docs/types/PanoMeasureReturnType.html +6 -7
- package/docs/types/PanoSpatialTagPluginId.html +6 -7
- package/docs/types/PanoTagPluginExportInterface.html +6 -7
- package/docs/types/PanoTagPluginParamsInterface.html +6 -7
- package/docs/types/PlaneTag.html +6 -7
- package/docs/types/PointTag.html +6 -7
- package/docs/types/Position.html +6 -7
- package/docs/types/RotateArgs.html +6 -7
- package/docs/types/RotateOpts.html +6 -7
- package/docs/types/RuleLabelsKey.html +6 -7
- package/docs/types/RuleLabelsValue.html +6 -7
- package/docs/types/Tag.html +6 -7
- package/docs/types/Tag2D.html +6 -7
- package/docs/types/Tag3D.html +6 -7
- package/docs/types/TagId.html +6 -7
- package/docs/types/TopviewFloorplanPluginParameterType.html +6 -7
- package/docs/types/TopviewFloorplanPluginReturnType.html +6 -7
- package/docs/variables/FLOOR_TYPE_MAP.html +6 -7
- package/docs/variables/PLUGIN.html +6 -7
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +6 -7
- package/docs/variables/ROOM_TYPE_MAP.html +6 -7
- package/docs/variables/VERSION.html +6 -7
- package/docs/variables/itemLabelPluginServerParams.html +6 -7
- package/docs/variables/modelItemLabelPluginServerParams.html +6 -7
- package/docs/variables/modelRoomLabelPluginServerParams.html +6 -7
- package/libs/CSS3DRenderPlugin/CSS3DRender.d.ts +34 -47
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +251 -187
- package/libs/CSS3DRenderPlugin/Controller.d.ts +5 -5
- package/libs/CSS3DRenderPlugin/Controller.js +57 -48
- package/libs/CSS3DRenderPlugin/index.d.ts +1 -2
- package/libs/CSS3DRenderPlugin/index.js +2 -3
- package/libs/CSS3DRenderPlugin/utils/{three/CSS3DObject.d.ts → CSS3DObjectPlus.d.ts} +11 -25
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +65 -0
- package/libs/CSS3DRenderPlugin/utils/evenNumber.d.ts +3 -0
- package/libs/CSS3DRenderPlugin/utils/evenNumber.js +7 -0
- package/libs/CSS3DRenderPlugin/utils/index.d.ts +1 -1
- package/libs/CruisePlugin/Controller.js +16 -16
- package/libs/ModelChassisCompassPlugin/Plugin.js +1 -1
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +1 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +42 -39
- package/libs/ModelTVVideoPlugin/index.js +1 -2
- package/libs/Object3DHelperPlugin/Controller.d.ts +0 -2
- package/libs/Object3DHelperPlugin/Controller.js +74 -89
- package/libs/PanoSpatialTagPlugin/index.js +1 -2
- package/libs/index.js +98 -107
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +7 -8
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +2 -2
- package/libs/shared-utils/Object3DHelper/Helper/index.js +0 -1
- package/libs/shared-utils/three/index.js +1 -2
- package/libs/shared-utils/three/{transfromToMeshBasicMaterial.d.ts → transformToMeshBasicMaterial.d.ts} +0 -0
- package/libs/shared-utils/three/{transfromToMeshBasicMaterial.js → transformToMeshBasicMaterial.js} +0 -0
- package/package.json +14 -15
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +0 -4
- package/dist/CSS3DRenderPlugin/utils/even.d.ts +0 -9
- package/dist/CSS3DRenderPlugin/utils/generateBehindFiveElement.d.ts +0 -2
- package/dist/CSS3DRenderPlugin/utils/getAllCSS3DObject.d.ts +0 -3
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DGroup.d.ts +0 -12
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +0 -14
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DScene.d.ts +0 -12
- package/dist/CSS3DRenderPlugin/utils/three/OpacityMesh.d.ts +0 -6
- package/dist/CSS3DRenderPlugin/utils/waitFiveModelLoaded.d.ts +0 -2
- package/docs/classes/CSS3DRender.html +0 -533
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +0 -4
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +0 -22
- package/libs/CSS3DRenderPlugin/utils/even.d.ts +0 -9
- package/libs/CSS3DRenderPlugin/utils/even.js +0 -7
- package/libs/CSS3DRenderPlugin/utils/generateBehindFiveElement.d.ts +0 -2
- package/libs/CSS3DRenderPlugin/utils/generateBehindFiveElement.js +0 -29
- package/libs/CSS3DRenderPlugin/utils/getAllCSS3DObject.d.ts +0 -3
- package/libs/CSS3DRenderPlugin/utils/getAllCSS3DObject.js +0 -9
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DGroup.d.ts +0 -12
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DGroup.js +0 -39
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +0 -93
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +0 -14
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.js +0 -46
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DScene.d.ts +0 -12
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DScene.js +0 -39
- package/libs/CSS3DRenderPlugin/utils/three/OpacityMesh.d.ts +0 -6
- package/libs/CSS3DRenderPlugin/utils/three/OpacityMesh.js +0 -18
- package/libs/CSS3DRenderPlugin/utils/waitFiveModelLoaded.d.ts +0 -2
- package/libs/CSS3DRenderPlugin/utils/waitFiveModelLoaded.js +0 -31
|
@@ -1,60 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var e in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
D.call(
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
import { CSS3DRender as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const x = "v2.0.1", m = `CSS3DRenderPlugin@${x}`;
|
|
18
|
-
class N extends S {
|
|
1
|
+
var y = Object.defineProperty, F = Object.defineProperties;
|
|
2
|
+
var P = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var R = Object.getOwnPropertySymbols;
|
|
4
|
+
var S = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var h = (s, n, e) => n in s ? y(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e, v = (s, n) => {
|
|
6
|
+
for (var e in n || (n = {}))
|
|
7
|
+
S.call(n, e) && h(s, e, n[e]);
|
|
8
|
+
if (R)
|
|
9
|
+
for (var e of R(n))
|
|
10
|
+
D.call(n, e) && h(s, e, n[e]);
|
|
11
|
+
return s;
|
|
12
|
+
}, m = (s, n) => F(s, P(n));
|
|
13
|
+
var l = (s, n, e) => (h(s, typeof n != "symbol" ? n + "" : n, e), e);
|
|
14
|
+
import { CSS3DRender as w } from "./CSS3DRender.js";
|
|
15
|
+
const x = "v2.0.1", C = `CSS3DRenderPlugin@${x}`;
|
|
16
|
+
class N extends w {
|
|
19
17
|
constructor(e) {
|
|
20
18
|
super();
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
l(this, "five");
|
|
20
|
+
l(this, "behindFiveContainer");
|
|
21
|
+
l(this, "staticPrefix", "//vrlab-static.ljcdn.com");
|
|
22
|
+
l(this, "create3DDomContainer", (e, t) => {
|
|
25
23
|
if (this.state.disposed)
|
|
26
24
|
return;
|
|
27
|
-
const
|
|
28
|
-
var
|
|
29
|
-
(
|
|
30
|
-
const
|
|
25
|
+
const i = (() => {
|
|
26
|
+
var E;
|
|
27
|
+
(t == null ? void 0 : t.dpr) !== void 0 && console.warn(`${C}: please use "config.devicePixelRatio" replace "config.dpr"`);
|
|
28
|
+
const a = {
|
|
31
29
|
ratio: 216e-5,
|
|
32
|
-
devicePixelRatio: (
|
|
30
|
+
devicePixelRatio: (E = t == null ? void 0 : t.dpr) != null ? E : 1,
|
|
33
31
|
mode: "front",
|
|
34
32
|
autoRender: !0
|
|
35
33
|
};
|
|
36
|
-
return Object.assign(
|
|
37
|
-
})(),
|
|
38
|
-
if (!
|
|
39
|
-
console.error(`${
|
|
34
|
+
return Object.assign(a, t, (t == null ? void 0 : t.mode) === "behind" ? { scene: this.five.scene } : void 0);
|
|
35
|
+
})(), o = this.five.getElement();
|
|
36
|
+
if (!o) {
|
|
37
|
+
console.error(`${C}: five.getElement() is ${o}`);
|
|
40
38
|
return;
|
|
41
39
|
}
|
|
42
|
-
const { autoRender:
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
40
|
+
const { autoRender: d, mode: r } = i, p = r === "front" ? o.parentElement : i.behindFiveContainer;
|
|
41
|
+
this.setContainer(p || document.body, "front");
|
|
42
|
+
const f = this.getBehindFiveElement();
|
|
43
|
+
f && this.setContainer(f, "behind"), this.appendToElement(p || document.body, r);
|
|
44
|
+
const c = this.create3DElement(this.five.camera, e, m(v({}, i), { autoRender: !1 }));
|
|
45
|
+
if (!c)
|
|
46
46
|
return;
|
|
47
|
-
const u = () => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return console.error(`${m}: wrapper is ${o}`);
|
|
51
|
-
n.appendToElement(o), n.render();
|
|
52
|
-
}, p = () => {
|
|
53
|
-
n.css3DObject.mode === "front" && u(), n.css3DObject.mode === "behind" && $(this.five).then(() => {
|
|
54
|
-
u();
|
|
55
|
-
});
|
|
47
|
+
const u = c.render, b = () => {
|
|
48
|
+
var a;
|
|
49
|
+
r === "front" && u(), r === "behind" && ((a = this.five.model) != null && a.loaded ? u() : this.five.once("modelLoaded", () => u()));
|
|
56
50
|
};
|
|
57
|
-
return
|
|
51
|
+
return d && b(), m(v({}, c), { render: d ? void 0 : b });
|
|
58
52
|
});
|
|
59
53
|
this.five = e;
|
|
60
54
|
}
|
|
@@ -62,11 +56,26 @@ class N extends S {
|
|
|
62
56
|
return this.dispose();
|
|
63
57
|
}
|
|
64
58
|
setState(...e) {
|
|
65
|
-
const
|
|
66
|
-
return this.five.needsRender = !0,
|
|
59
|
+
const t = super.setState(...e);
|
|
60
|
+
return this.five.needsRender = !0, t;
|
|
67
61
|
}
|
|
68
62
|
getBehindFiveElement() {
|
|
69
|
-
|
|
63
|
+
var r;
|
|
64
|
+
const { behindFiveContainer: e } = this;
|
|
65
|
+
if (e)
|
|
66
|
+
return e;
|
|
67
|
+
const t = document.createElement("div");
|
|
68
|
+
t.style.position = "absolute", t.style.pointerEvents = "none", t.style.top = "0", t.style.left = "0", t.style.width = "100%", t.style.height = "100%", this.behindFiveContainer = t;
|
|
69
|
+
const i = this.five.getElement();
|
|
70
|
+
if (!i)
|
|
71
|
+
return;
|
|
72
|
+
const o = (r = i == null ? void 0 : i.style.position) != null ? r : getComputedStyle(i);
|
|
73
|
+
(!o || o === "static") && console.warn(
|
|
74
|
+
"if you want to use css3DRenderPlugin behind mode, five element position is static, please set position to relative or absolute"
|
|
75
|
+
);
|
|
76
|
+
const d = i == null ? void 0 : i.parentElement;
|
|
77
|
+
if (d)
|
|
78
|
+
return d.insertBefore(t, i), t;
|
|
70
79
|
}
|
|
71
80
|
}
|
|
72
81
|
export {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FivePlugin } from '@realsee/five';
|
|
2
2
|
import Controller from './Controller';
|
|
3
|
-
export declare const CSS3DRenderPlugin: FivePlugin<void, InstanceType<typeof Controller>>;
|
|
4
|
-
export { CSS3DRender } from './CSS3DRender';
|
|
5
3
|
export * from './typing';
|
|
4
|
+
export declare const CSS3DRenderPlugin: FivePlugin<void, InstanceType<typeof Controller>>;
|
|
6
5
|
export default CSS3DRenderPlugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
2
2
|
import { Matrix4, Quaternion, Vector3 } from 'three';
|
|
3
|
-
import { Subscribe } from '
|
|
4
|
-
import
|
|
3
|
+
import { Subscribe } from '../../shared-utils/Subscribe';
|
|
4
|
+
import type * as THREE from 'three';
|
|
5
5
|
export declare const MinRatio = 0.00216;
|
|
6
6
|
export declare const DefaultRatio = 0.003;
|
|
7
7
|
export declare type Mode = 'front' | 'behind';
|
|
@@ -10,39 +10,25 @@ export declare type CSS3DRenderEventMap = {
|
|
|
10
10
|
applyMatrix4: (matrix: Matrix4) => void;
|
|
11
11
|
applyQuaternion: (quaternion: Quaternion) => void;
|
|
12
12
|
applyScaleMatrix4: (matrix: Matrix4) => void;
|
|
13
|
+
changeMode: <T extends Mode = Mode>(mode: T, prevMode: Mode, scene: T extends 'behind' ? THREE.Scene : undefined) => void;
|
|
13
14
|
};
|
|
14
15
|
export declare class CSS3DObjectPlus<T extends HTMLElement = HTMLElement> extends CSS3DObject {
|
|
15
|
-
version:
|
|
16
|
-
readonly isCSS3DObjectPlus: true;
|
|
17
|
-
container: T;
|
|
16
|
+
version: string;
|
|
18
17
|
width: number;
|
|
19
18
|
height: number;
|
|
20
19
|
domWidthPx: number;
|
|
21
20
|
domHeightPx: number;
|
|
22
21
|
cornerPoints: CornerPoints;
|
|
23
|
-
centerPosition: Vector3;
|
|
24
22
|
ratio: number;
|
|
23
|
+
container: T;
|
|
24
|
+
centerPosition: Vector3;
|
|
25
25
|
mode: 'front' | 'behind';
|
|
26
26
|
readonly hooks: Subscribe<CSS3DRenderEventMap>;
|
|
27
|
-
|
|
28
|
-
constructor(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ratio?: number;
|
|
33
|
-
dpr?: number;
|
|
34
|
-
pointerEvents?: 'none' | 'auto';
|
|
35
|
-
});
|
|
36
|
-
setVisible(visible: boolean): void;
|
|
37
|
-
removeFromParent(): this;
|
|
38
|
-
removeOpacityMesh(): this;
|
|
39
|
-
dispose(): void;
|
|
40
|
-
getOpacityMesh(): OpacityMesh;
|
|
27
|
+
readonly isCSS3DObjectPlus: true;
|
|
28
|
+
constructor(container: T, cornerPoints: CornerPoints, ratio?: number, dpr?: number, mode?: Mode);
|
|
29
|
+
changeMode(mode: 'front'): void;
|
|
30
|
+
changeMode(mode: 'behind', scene: THREE.Scene): void;
|
|
31
|
+
applyScaleMatrix4(matrix: Matrix4): void;
|
|
41
32
|
applyMatrix4(matrix: Matrix4): void;
|
|
42
33
|
applyQuaternion(quaternion: Quaternion): this;
|
|
43
|
-
applyScaleMatrix4(matrix: Matrix4): void;
|
|
44
|
-
/**
|
|
45
|
-
* @description: 生成透明Mesh
|
|
46
|
-
*/
|
|
47
|
-
private createOpacityMesh;
|
|
48
34
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var P = Object.defineProperty;
|
|
2
|
+
var k = (p, h, t) => h in p ? P(p, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[h] = t;
|
|
3
|
+
var s = (p, h, t) => (k(p, typeof h != "symbol" ? h + "" : h, t), t);
|
|
4
|
+
import { CSS3DObject as D } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
5
|
+
import { Vector3 as n } from "three";
|
|
6
|
+
import { evenNumber as f } from "./evenNumber.js";
|
|
7
|
+
import { centerPoint as W } from "./centerPoint.js";
|
|
8
|
+
import { Subscribe as j } from "../../shared-utils/Subscribe.js";
|
|
9
|
+
const w = "1.0.2", v = `CSS3DObjectPlus@${w}`, C = 216e-5, E = 3e-3;
|
|
10
|
+
class z extends D {
|
|
11
|
+
constructor(t, e, o = E, x = 1, M = "front") {
|
|
12
|
+
const l = Math.max(C, o), d = e[0].distanceTo(e[1]), m = e[1].distanceTo(e[2]), c = f(d / o * x), a = f(m / o * x), r = W(...e);
|
|
13
|
+
let u;
|
|
14
|
+
if (l === o)
|
|
15
|
+
t.style.width = `${c}px`, t.style.height = `${a}px`, u = t;
|
|
16
|
+
else {
|
|
17
|
+
const i = document.createElement("div");
|
|
18
|
+
i.style.width = `${c}px`, i.style.height = `${a}px`, i.style.pointerEvents = "none";
|
|
19
|
+
const b = o / l;
|
|
20
|
+
t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${b * c}px`, t.style.height = `${b * a}px`, i.appendChild(t), u = i;
|
|
21
|
+
}
|
|
22
|
+
super(u);
|
|
23
|
+
s(this, "version", w);
|
|
24
|
+
s(this, "width");
|
|
25
|
+
s(this, "height");
|
|
26
|
+
s(this, "domWidthPx");
|
|
27
|
+
s(this, "domHeightPx");
|
|
28
|
+
s(this, "cornerPoints");
|
|
29
|
+
s(this, "ratio");
|
|
30
|
+
s(this, "container");
|
|
31
|
+
s(this, "centerPosition");
|
|
32
|
+
s(this, "mode", "front");
|
|
33
|
+
s(this, "hooks", new j());
|
|
34
|
+
s(this, "isCSS3DObjectPlus", !0);
|
|
35
|
+
if (this.scale.set(l, l, l), this.cornerPoints = e, this.ratio = o, this.container = t, this.mode = M, l === o)
|
|
36
|
+
this.width = d, this.height = m, this.domWidthPx = c, this.domHeightPx = a, this.centerPosition = r;
|
|
37
|
+
else {
|
|
38
|
+
const i = o / l;
|
|
39
|
+
this.width = i * d, this.height = i * m, this.domWidthPx = i * c, this.domHeightPx = i * a, this.centerPosition = new n().subVectors(r, e[0]).multiplyScalar(i).add(e[0]);
|
|
40
|
+
}
|
|
41
|
+
t.classList.add(`${v}__container`);
|
|
42
|
+
const V = new n().subVectors(e[1], e[0]), y = new n().subVectors(e[3], e[0]), $ = new n().crossVectors(V, y).normalize();
|
|
43
|
+
this.lookAt($);
|
|
44
|
+
const g = this.up.clone().applyQuaternion(this.quaternion), S = y.clone(), O = new n().crossVectors(g, S).normalize();
|
|
45
|
+
this.rotateOnWorldAxis(O, g.angleTo(S)), this.position.copy(r);
|
|
46
|
+
}
|
|
47
|
+
changeMode(t, e) {
|
|
48
|
+
if (t === this.mode)
|
|
49
|
+
return;
|
|
50
|
+
const o = this.mode;
|
|
51
|
+
this.mode = t, this.hooks.emit("changeMode", t, o, e);
|
|
52
|
+
}
|
|
53
|
+
applyScaleMatrix4(t) {
|
|
54
|
+
this.scale.applyMatrix4(t), this.hooks.emit("applyScaleMatrix4", t);
|
|
55
|
+
}
|
|
56
|
+
applyMatrix4(t) {
|
|
57
|
+
super.applyMatrix4(t), this.hooks.emit("applyMatrix4", t);
|
|
58
|
+
}
|
|
59
|
+
applyQuaternion(t) {
|
|
60
|
+
return super.applyQuaternion(t), this.hooks.emit("applyQuaternion", t), this;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
z as CSS3DObjectPlus
|
|
65
|
+
};
|
|
@@ -2,7 +2,7 @@ var G = Object.defineProperty, K = Object.defineProperties;
|
|
|
2
2
|
var U = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var E = Object.getOwnPropertySymbols;
|
|
4
4
|
var T = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var x = (g, c, e) => c in g ? G(g, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[c] = e,
|
|
5
|
+
var x = (g, c, e) => c in g ? G(g, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[c] = e, S = (g, c) => {
|
|
6
6
|
for (var e in c || (c = {}))
|
|
7
7
|
T.call(c, e) && x(g, e, c[e]);
|
|
8
8
|
if (E)
|
|
@@ -10,7 +10,7 @@ var x = (g, c, e) => c in g ? G(g, c, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
A.call(c, e) && x(g, e, c[e]);
|
|
11
11
|
return g;
|
|
12
12
|
}, L = (g, c) => K(g, U(c));
|
|
13
|
-
var
|
|
13
|
+
var P = (g, c, e) => (x(g, typeof c != "symbol" ? c + "" : c, e), e);
|
|
14
14
|
var y = (g, c, e) => new Promise((t, i) => {
|
|
15
15
|
var a = (s) => {
|
|
16
16
|
try {
|
|
@@ -47,7 +47,7 @@ const M = "v1.0.6", D = "CruisePlugin", w = `${D}@${M}`, F = () => {
|
|
|
47
47
|
class B extends O {
|
|
48
48
|
constructor(e, t) {
|
|
49
49
|
super(e, t);
|
|
50
|
-
|
|
50
|
+
P(this, "state", {
|
|
51
51
|
visible: !0,
|
|
52
52
|
enabled: !0,
|
|
53
53
|
disposed: !1,
|
|
@@ -62,9 +62,9 @@ class B extends O {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
P(this, "data");
|
|
66
|
+
P(this, "config");
|
|
67
|
+
P(this, "privateState", {
|
|
68
68
|
playing: !1,
|
|
69
69
|
currentPlayQueue: [],
|
|
70
70
|
currentPlayKeyframe: null,
|
|
@@ -72,7 +72,7 @@ class B extends O {
|
|
|
72
72
|
disposers: [],
|
|
73
73
|
modeChanging: !1
|
|
74
74
|
});
|
|
75
|
-
|
|
75
|
+
P(this, "GuideLine");
|
|
76
76
|
this.config = t, Object.assign(window, { [`__${D}_DEBUG__`]: this });
|
|
77
77
|
const i = this.setFiveLinearUpdateCamera.bind(this), a = this.setFiveOriginUpdateCamera.bind(this);
|
|
78
78
|
this.hooks.on("play", i), this.hooks.on("broke", a), this.hooks.on("end", a), this.hooks.on("pause", a), this.privateState.disposers.push(() => {
|
|
@@ -115,7 +115,7 @@ class B extends O {
|
|
|
115
115
|
this.state.playing && this.setState({ playing: !1 }, { userAction: a }), this.setState({ playing: !0 }, { userAction: a, playFromIndex: t, playFromId: i });
|
|
116
116
|
}
|
|
117
117
|
playFromStart(e) {
|
|
118
|
-
return this.playFrom(L(
|
|
118
|
+
return this.playFrom(L(S({}, e), { index: 0 }));
|
|
119
119
|
}
|
|
120
120
|
pause(e) {
|
|
121
121
|
this.setState({ playing: !1 }, e);
|
|
@@ -145,8 +145,8 @@ class B extends O {
|
|
|
145
145
|
return F();
|
|
146
146
|
if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
|
|
147
147
|
return q();
|
|
148
|
-
const i =
|
|
149
|
-
this.state =
|
|
148
|
+
const i = S({}, this.state);
|
|
149
|
+
this.state = S(S({}, this.state), e), e.disposed !== void 0 && e.disposed !== i.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== i.visible && this.handleVisible(e.visible, t == null ? void 0 : t.userAction), e.enabled !== void 0 && e.enabled !== i.enabled && this.handleEnable(e.enabled, t == null ? void 0 : t.userAction), e.playing !== void 0 && e.playing !== i.playing && this.changePlayState(e.playing, t), e.speed !== void 0 && e.speed !== i.speed && this.changeSpeed(e.speed, t == null ? void 0 : t.userAction), $(i, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: (a = t == null ? void 0 : t.userAction) != null ? a : !0 });
|
|
150
150
|
}
|
|
151
151
|
formatData(e) {
|
|
152
152
|
return y(this, null, function* () {
|
|
@@ -161,7 +161,7 @@ class B extends O {
|
|
|
161
161
|
keyframes: i.keyframes.map((a, o) => {
|
|
162
162
|
var r;
|
|
163
163
|
const n = i.keyframes[o + 1], s = (() => !n || n.start === void 0 || a.end === void 0 ? 0 : n.start - a.end)();
|
|
164
|
-
return
|
|
164
|
+
return S({ id: (r = a.uuid) != null ? r : k(), moveIndex: o, stay: s, index: o }, a);
|
|
165
165
|
})
|
|
166
166
|
};
|
|
167
167
|
if (i.panoIndexList) {
|
|
@@ -182,9 +182,9 @@ class B extends O {
|
|
|
182
182
|
i.moveType === void 0 || i.moveType === "justMove" ? a.push({
|
|
183
183
|
moveIndex: r,
|
|
184
184
|
stay: i.stay,
|
|
185
|
-
data:
|
|
186
|
-
}) : i.moveType === "moveAndRotate" && (a.push({ moveIndex: r, stay: i.stay, data: { effect: "Move", panoIndex: s, moveEffect: o } }), d && a.push({ moveIndex: r, stay: i.stay, data:
|
|
187
|
-
}), { keyframesId: k(), keyframes: a.map((s, r) =>
|
|
185
|
+
data: S({ effect: "Move", panoIndex: s, moveEffect: o }, d != null ? d : {})
|
|
186
|
+
}) : i.moveType === "moveAndRotate" && (a.push({ moveIndex: r, stay: i.stay, data: { effect: "Move", panoIndex: s, moveEffect: o } }), d && a.push({ moveIndex: r, stay: i.stay, data: S({ effect: "Rotate", panoIndex: s }, d) }));
|
|
187
|
+
}), { keyframesId: k(), keyframes: a.map((s, r) => S({ id: k(), index: r }, s)) };
|
|
188
188
|
} else
|
|
189
189
|
throw new Error("format error: data no keyframes or no panoIndexList");
|
|
190
190
|
});
|
|
@@ -417,7 +417,7 @@ class B extends O {
|
|
|
417
417
|
}
|
|
418
418
|
changeMode(e, t) {
|
|
419
419
|
return y(this, null, function* () {
|
|
420
|
-
e.mode && e.mode !== this.five.currentMode && (this.privateState.modeChanging = !0, yield this.five.changeMode(e.mode, e, t), this.privateState.modeChanging = !1);
|
|
420
|
+
e.mode && e.mode !== this.five.currentMode && (this.privateState.modeChanging = !0, console.log("this.privateState.modeChanging", this.privateState.modeChanging), yield this.five.changeMode(e.mode, e, t), this.privateState.modeChanging = !1);
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
forceInteruptUpdateCamera() {
|
|
@@ -478,7 +478,7 @@ class B extends O {
|
|
|
478
478
|
!this.privateState.fiveOriginGetProgress || (this.five.controller.cameraMotion.getProgress = this.privateState.fiveOriginGetProgress);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
|
|
481
|
+
P(B, "PluginVersion", M);
|
|
482
482
|
export {
|
|
483
483
|
B as CruisePluginController
|
|
484
484
|
};
|
|
@@ -17,7 +17,7 @@ var M = (t, i, s) => new Promise((l, o) => {
|
|
|
17
17
|
import * as h from "three";
|
|
18
18
|
import { FBXLoader as E } from "three/examples/jsm/loaders/FBXLoader";
|
|
19
19
|
import { bject3d2LocalMatrix as U } from "../shared-utils/object3d2LocalMatrix.js";
|
|
20
|
-
import { transfromToMeshBasicMaterial as C } from "../shared-utils/three/
|
|
20
|
+
import { transfromToMeshBasicMaterial as C } from "../shared-utils/three/transformToMeshBasicMaterial.js";
|
|
21
21
|
const X = (t, i) => {
|
|
22
22
|
var x;
|
|
23
23
|
const s = i.fbx_url || "//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX", l = (x = i.north_rad) != null ? x : void 0, o = {}, m = (e) => M(void 0, null, function* () {
|
|
@@ -7,6 +7,7 @@ export interface ModelEntryDoorGuidePluginData {
|
|
|
7
7
|
}
|
|
8
8
|
export declare type ModelEntryDoorGuidePluginParameterType = {
|
|
9
9
|
animationEnabled?: boolean;
|
|
10
|
+
name?: string;
|
|
10
11
|
} & ModelEntryDoorGuidePluginData;
|
|
11
12
|
export interface ModelEntryDoorGuidePluginExportType {
|
|
12
13
|
enable: (config?: {
|
|
@@ -1,77 +1,80 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C = (t, s, e) => new Promise((x, E) => {
|
|
2
2
|
var y = (r) => {
|
|
3
3
|
try {
|
|
4
4
|
c(e.next(r));
|
|
5
5
|
} catch (m) {
|
|
6
|
-
|
|
6
|
+
E(m);
|
|
7
7
|
}
|
|
8
8
|
}, P = (r) => {
|
|
9
9
|
try {
|
|
10
10
|
c(e.throw(r));
|
|
11
11
|
} catch (m) {
|
|
12
|
-
|
|
12
|
+
E(m);
|
|
13
13
|
}
|
|
14
14
|
}, c = (r) => r.done ? x(r.value) : Promise.resolve(r.value).then(y, P);
|
|
15
15
|
c((e = e.apply(t, s)).next());
|
|
16
16
|
});
|
|
17
|
-
import * as
|
|
18
|
-
import { MeshBasicMaterial as
|
|
19
|
-
import { FBXLoader as
|
|
20
|
-
import { createCanvasTextTexture as
|
|
21
|
-
import { transformPositionToVector3 as
|
|
22
|
-
import { transfromToMeshBasicMaterial as
|
|
23
|
-
const
|
|
24
|
-
var g,
|
|
25
|
-
const e = {}, x = (g = s.animationEnabled) != null ? g : !0,
|
|
26
|
-
var
|
|
27
|
-
const l = (
|
|
17
|
+
import * as z from "three";
|
|
18
|
+
import { MeshBasicMaterial as B, AnimationMixer as S } from "three";
|
|
19
|
+
import { FBXLoader as _ } from "three/examples/jsm/loaders/FBXLoader";
|
|
20
|
+
import { createCanvasTextTexture as H } from "../shared-utils/createCanvasTextTexture.js";
|
|
21
|
+
import { transformPositionToVector3 as L } from "../shared-utils/three/transformPositionToVector3.js";
|
|
22
|
+
import { transfromToMeshBasicMaterial as U } from "../shared-utils/three/transformToMeshBasicMaterial.js";
|
|
23
|
+
const K = (t, s) => {
|
|
24
|
+
var g, G, R;
|
|
25
|
+
const e = {}, x = (g = s.animationEnabled) != null ? g : !0, E = (G = s.position) != null ? G : void 0, y = (R = s.rad) != null ? R : void 0, P = s.fbx_url || "//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx", c = [], r = (n) => C(void 0, null, function* () {
|
|
26
|
+
var u, b, M, f, p, j, h, q;
|
|
27
|
+
const l = (u = n == null ? void 0 : n.position) != null ? u : E;
|
|
28
28
|
if (!l)
|
|
29
|
-
return Promise.reject("ModelEntryDoorGuidePlugin.load(): position is undefined");
|
|
30
|
-
const i =
|
|
31
|
-
if (e.rad =
|
|
32
|
-
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${
|
|
33
|
-
const a = yield new
|
|
34
|
-
a.position.copy(i), a.rotation.z =
|
|
35
|
-
const d = (
|
|
36
|
-
|
|
29
|
+
return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));
|
|
30
|
+
const i = L(l), o = (b = n == null ? void 0 : n.rad) != null ? b : y, D = (M = n == null ? void 0 : n.fbx_url) != null ? M : P;
|
|
31
|
+
if (e.rad = o, o === void 0)
|
|
32
|
+
return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${o}`));
|
|
33
|
+
const a = yield new _().loadAsync(D);
|
|
34
|
+
a.position.copy(i), a.rotation.z = o, a.scale.set(0.8, 0.8, 0.8), U(a, { transparent: !0, side: z.DoubleSide });
|
|
35
|
+
const d = (h = (j = (p = (f = a.children) == null ? void 0 : f[0]) == null ? void 0 : p.children) == null ? void 0 : j[3]) == null ? void 0 : h.clone();
|
|
36
|
+
if (!d)
|
|
37
|
+
return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${d}`));
|
|
38
|
+
const w = (q = s.name) != null ? q : "\u5165\u6237\u95E8";
|
|
39
|
+
return d.material = new B({ transparent: !0, map: H(w) }), d.renderOrder = 3, a.children[0].add(d), e.object = a, !0;
|
|
37
40
|
}), m = () => {
|
|
38
41
|
if (e.animation)
|
|
39
42
|
return;
|
|
40
43
|
if (!e.object)
|
|
41
44
|
return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ", e.object);
|
|
42
|
-
const
|
|
45
|
+
const n = 1, l = new S(e.object);
|
|
43
46
|
c.push(l);
|
|
44
47
|
const i = l.clipAction(e.object.animations[0]);
|
|
45
|
-
i.timeScale =
|
|
46
|
-
let
|
|
48
|
+
i.timeScale = n;
|
|
49
|
+
let o;
|
|
47
50
|
const D = () => {
|
|
48
51
|
let u = 0, b = 0;
|
|
49
|
-
const
|
|
50
|
-
u = requestAnimationFrame(
|
|
51
|
-
const j =
|
|
52
|
-
j <
|
|
52
|
+
const M = 1e3 / 30, f = (p) => {
|
|
53
|
+
u = requestAnimationFrame(f);
|
|
54
|
+
const j = p - b;
|
|
55
|
+
j < M || (b = p, c.forEach((h) => h.update(j / 1e3)), t.needsRender = !0);
|
|
53
56
|
};
|
|
54
|
-
return u = requestAnimationFrame(
|
|
57
|
+
return u = requestAnimationFrame(f), () => {
|
|
55
58
|
cancelAnimationFrame(u);
|
|
56
59
|
};
|
|
57
|
-
},
|
|
58
|
-
|
|
60
|
+
}, w = { play: () => {
|
|
61
|
+
o || (i.play(), o = D(), requestAnimationFrame(() => {
|
|
59
62
|
e.object && e.object.rotation.z !== e.rad && (e.object.rotation.z = e.rad);
|
|
60
63
|
}));
|
|
61
64
|
}, stop: () => {
|
|
62
|
-
i.stop(),
|
|
65
|
+
i.stop(), o == null || o(), o = void 0;
|
|
63
66
|
} };
|
|
64
|
-
e.animation =
|
|
65
|
-
}, F = (
|
|
67
|
+
e.animation = w;
|
|
68
|
+
}, F = (n) => {
|
|
66
69
|
var i;
|
|
67
70
|
if (!e.object)
|
|
68
71
|
return console.error("ModelEntryDoorGuidePlugin.enable(): object is ", e.object);
|
|
69
|
-
((i =
|
|
72
|
+
((i = n == null ? void 0 : n.animationEnable) != null ? i : x) && (e.animation || m(), e.animation.play()), t.scene.add(e.object), t.needsRender = !0;
|
|
70
73
|
}, T = () => {
|
|
71
74
|
!e.object || (e.animation && e.animation.stop(), t.scene.remove(e.object), t.needsRender = !0);
|
|
72
|
-
}, A = (
|
|
73
|
-
return { load: r, enable: (
|
|
75
|
+
}, A = (n) => n === "Floorplan" ? F() : T();
|
|
76
|
+
return { load: r, enable: (n) => (e.enabled || (e.enabled = !0, A(t.currentMode), t.on("modeChange", A), F(n)), !0), disable: () => (e.enabled && (e.enabled = !1, T(), t.off("modeChange", A)), !0) };
|
|
74
77
|
};
|
|
75
78
|
export {
|
|
76
|
-
|
|
79
|
+
K as ModelEntryDoorGuidePlugin
|
|
77
80
|
};
|
|
@@ -11,8 +11,6 @@ export declare class Object3DHelperController extends BasePlugin.Controller<Obje
|
|
|
11
11
|
name: string;
|
|
12
12
|
state: Object3DHelperState;
|
|
13
13
|
objectHelperMap: Map<THREE.Object3D, Object3DHelper>;
|
|
14
|
-
private css3DObjectParentMap;
|
|
15
|
-
private css3DRender;
|
|
16
14
|
constructor(five: Five);
|
|
17
15
|
/**
|
|
18
16
|
* @description Show guide line
|