@realsee/dnalogel 2.1.2-alpha.0 → 2.1.2-alpha.10
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/README.md +3 -12
- package/dist/CSS3DRenderPlugin/index..js +88 -0
- package/dist/CSS3DRenderPlugin/index.cjs.js +1 -0
- package/dist/CameraMovementPlugin/index..js +11 -0
- package/dist/CameraMovementPlugin/index.cjs.js +1 -0
- package/dist/CruisePlugin/index..js +527 -0
- package/dist/CruisePlugin/index.cjs.js +1 -0
- package/dist/GuideLinePlugin/index..js +214 -0
- package/dist/GuideLinePlugin/index.cjs.js +1 -0
- package/dist/ItemLabelPlugin/index..js +508 -0
- package/dist/ItemLabelPlugin/index.cjs.js +10 -0
- package/dist/ModelChassisCompassPlugin/index..js +9 -0
- package/dist/ModelChassisCompassPlugin/index.cjs.js +1 -0
- package/dist/ModelEntryDoorGuidePlugin/index..js +9 -0
- package/dist/ModelEntryDoorGuidePlugin/index.cjs.js +1 -0
- package/dist/ModelItemLabelPlugin/index..js +334 -0
- package/dist/ModelItemLabelPlugin/index.cjs.js +10 -0
- package/dist/ModelRoomLabelPlugin/index..js +274 -0
- package/dist/ModelRoomLabelPlugin/index.cjs.js +1 -0
- package/dist/ModelTVVideoPlugin/index..js +12 -0
- package/dist/ModelTVVideoPlugin/index.cjs.js +1 -0
- package/dist/ModelViewPlugin/index..js +8 -0
- package/dist/ModelViewPlugin/index.cjs.js +1 -0
- package/dist/Object3DHelperPlugin/index..js +1414 -0
- package/dist/Object3DHelperPlugin/index.cjs.js +1 -0
- package/dist/PanoCompassPlugin/index..js +258 -0
- package/dist/PanoCompassPlugin/index.cjs.js +1 -0
- package/dist/PanoCursorRaycasterPlugin/index..js +63 -0
- package/dist/PanoCursorRaycasterPlugin/index.cjs.js +1 -0
- package/dist/PanoDoorLabelPlugin/index..js +340 -0
- package/dist/PanoDoorLabelPlugin/index.cjs.js +1 -0
- package/dist/PanoMeasurePlugin/index..js +15 -0
- package/dist/PanoMeasurePlugin/index.cjs.js +1 -0
- package/dist/PanoRulerPlugin/index..js +9 -0
- package/dist/PanoRulerPlugin/index.cjs.js +1 -0
- package/dist/PanoRulerProPlugin/index..js +395 -0
- package/dist/PanoRulerProPlugin/index.cjs.js +1 -0
- package/dist/PanoSpatialTagPlugin/index..js +15 -0
- package/dist/PanoSpatialTagPlugin/index.cjs.js +1 -0
- package/dist/PanoTagPlugin/index..js +4522 -0
- package/dist/PanoTagPlugin/index.cjs.js +17 -0
- package/dist/chunks/cjs/BasePlugin.57e5204f.cjs.js +1 -0
- package/dist/chunks/cjs/BasePluginWithData.0a28882d.cjs.js +1 -0
- package/dist/chunks/cjs/CSS3DRender.15349564.cjs.js +1 -0
- package/dist/chunks/cjs/CameraMovementPlugin.2b342576.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.5f616fb3.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.609da4aa.cjs.js +94 -0
- package/dist/chunks/cjs/Plugin.67936d0e.cjs.js +16 -0
- package/dist/chunks/cjs/Plugin.8a110c53.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.9971108a.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.fd42bf8a.cjs.js +1 -0
- package/dist/chunks/cjs/Subscribe.5398d5c6.cjs.js +1 -0
- package/dist/chunks/cjs/changeModelCanvasOpacity.8d84f111.cjs.js +1 -0
- package/dist/chunks/cjs/correctFiveState.4c8472bd.cjs.js +1 -0
- package/dist/chunks/cjs/debounce.93dfb637.cjs.js +1 -0
- package/dist/chunks/cjs/equal.e9fcbd4e.cjs.js +1 -0
- package/dist/chunks/cjs/filter.cf9ebbb3.cjs.js +1 -0
- package/dist/chunks/cjs/formatData.81e95011.cjs.js +10 -0
- package/dist/chunks/cjs/index.30b7baeb.cjs.js +101 -0
- package/dist/chunks/cjs/index.686e84d1.cjs.js +290 -0
- package/dist/chunks/cjs/index.7d2010ce.cjs.js +1 -0
- package/dist/chunks/cjs/isNil.b3a58990.cjs.js +1 -0
- package/dist/chunks/cjs/planimetry.7fce816a.cjs.js +1 -0
- package/dist/chunks/cjs/throttle.86c209eb.cjs.js +1 -0
- package/dist/chunks/cjs/transfromToMeshBasicMaterial.9db6d46a.cjs.js +1 -0
- package/dist/chunks/cjs/uuid.29ed9c88.cjs.js +1 -0
- package/dist/chunks/es/BasePlugin.813e25f7.es.js +18 -0
- package/dist/chunks/es/BasePluginWithData.4bf4e649.es.js +6 -0
- package/dist/chunks/es/CSS3DRender.5652510e.es.js +393 -0
- package/dist/chunks/es/CameraMovementPlugin.4a7c3e46.es.js +120 -0
- package/dist/chunks/es/Plugin.26c2df05.es.js +106 -0
- package/dist/chunks/es/Plugin.435485ed.es.js +584 -0
- package/dist/chunks/es/Plugin.a98418f0.es.js +82 -0
- package/dist/chunks/es/Plugin.ae4ee6f8.es.js +82 -0
- package/dist/chunks/es/Plugin.dd11e0ad.es.js +180 -0
- package/dist/chunks/es/Plugin.f4cf895f.es.js +355 -0
- package/dist/chunks/es/Subscribe.c73e0f91.es.js +50 -0
- package/dist/chunks/es/changeModelCanvasOpacity.45ef9fd6.es.js +1551 -0
- package/dist/chunks/es/correctFiveState.e7feab9f.es.js +66 -0
- package/dist/chunks/es/debounce.ef83f417.es.js +11 -0
- package/dist/chunks/es/equal.7db4a6f7.es.js +56 -0
- package/dist/chunks/es/filter.97ec06c4.es.js +12 -0
- package/dist/chunks/es/formatData.a2b39ef9.es.js +483 -0
- package/dist/chunks/es/index.a273f06e.es.js +532 -0
- package/dist/chunks/es/index.b8fdb59b.es.js +50 -0
- package/dist/chunks/es/index.f74f4851.es.js +1787 -0
- package/dist/chunks/es/isNil.212842d9.es.js +10 -0
- package/dist/chunks/es/planimetry.b0b4a28d.es.js +43 -0
- package/dist/chunks/es/throttle.db66bac3.es.js +11 -0
- package/dist/chunks/es/transfromToMeshBasicMaterial.849ee069.es.js +24 -0
- package/dist/chunks/es/uuid.676cb2c8.es.js +9 -0
- package/dist/components/PaintBrush/index..js +6 -0
- package/dist/components/PaintBrush/index.cjs.js +1 -0
- package/dist/components/index..js +7 -0
- package/dist/components/index.cjs.js +1 -0
- package/dist/floorplan/MapviewFloorplanPlugin/index..js +324 -0
- package/dist/floorplan/MapviewFloorplanPlugin/index.cjs.js +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/index..js +320 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.cjs.js +1 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index..js +613 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.cjs.js +1 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index..js +277 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.cjs.js +1 -0
- package/dist/index..js +530 -0
- package/dist/index.cjs.js +3 -543
- 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 +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- 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 +5 -5
- package/docs/index.html +6 -11
- 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 +5 -5
- 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 +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- 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 +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- 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 +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeyArray.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +1 -5
- package/libs/CSS3DRenderPlugin/Controller.js +6 -7
- package/libs/CSS3DRenderPlugin/index.js +3 -4
- package/libs/CSS3DRenderPlugin/typing.js +1 -0
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -3
- package/libs/CSS3DRenderPlugin/utils/index.js +1 -0
- package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -2
- package/libs/CSS3DRenderPlugin/utils/random.js +1 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +16 -17
- package/libs/CameraMovementPlugin/index.js +3 -0
- package/libs/CruisePlugin/Controller.js +4 -4
- package/libs/CruisePlugin/index.js +3 -6
- package/libs/CruisePlugin/utils/linerValue.js +4 -4
- package/libs/GuideLinePlugin/Controller.js +3 -4
- package/libs/GuideLinePlugin/index.js +3 -4
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -1
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +34 -32
- package/libs/ItemLabelPlugin/Plugin.js +5 -6
- package/libs/ModelChassisCompassPlugin/Plugin.js +3 -4
- package/libs/ModelChassisCompassPlugin/index.js +2 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +22 -23
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -0
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +4 -3
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +5 -6
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +11 -10
- package/libs/ModelRoomLabelPlugin/index.js +0 -1
- package/libs/ModelTVVideoPlugin/Plugin.js +1 -2
- package/libs/ModelTVVideoPlugin/index.js +2 -0
- package/libs/ModelViewPlugin/Plugin.js +1 -2
- package/libs/ModelViewPlugin/index.js +2 -0
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +6 -7
- package/libs/Object3DHelperPlugin/index.js +1 -6
- package/libs/PanoCompassPlugin/index.js +3 -4
- package/libs/PanoCursorRaycasterPlugin/index.js +7 -8
- package/libs/PanoDoorLabelPlugin/index.js +1 -2
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -3
- package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +17 -17
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -3
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +9 -9
- package/libs/PanoMeasurePlugin/Controller/index.js +8 -8
- package/libs/PanoMeasurePlugin/Model/index.js +3 -3
- package/libs/PanoMeasurePlugin/Model/line.js +11 -11
- package/libs/PanoMeasurePlugin/Model/point.js +7 -7
- package/libs/PanoMeasurePlugin/Model/polyline.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +4 -4
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +30 -30
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +2 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +2 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +3 -4
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +5 -5
- package/libs/PanoMeasurePlugin/index.js +3 -4
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -1
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +2 -2
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +3 -3
- package/libs/PanoMeasurePlugin/utils/line.js +0 -1
- package/libs/PanoMeasurePlugin/utils/math.js +1 -2
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +2 -2
- package/libs/PanoRulerPlugin/Plugin.js +2 -3
- package/libs/PanoRulerPlugin/index.js +2 -0
- package/libs/PanoRulerPlugin/style.js +1 -1
- package/libs/PanoRulerProPlugin/Controller.js +15 -15
- package/libs/PanoRulerProPlugin/RulerItems.js +7 -4
- package/libs/PanoRulerProPlugin/index.js +3 -4
- package/libs/PanoSpatialTagPlugin/Components/origins.js +3 -2
- package/libs/PanoSpatialTagPlugin/Components/tag.js +3 -2
- package/libs/PanoSpatialTagPlugin/Plugin.js +2 -3
- package/libs/PanoSpatialTagPlugin/index.js +6 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/Media.js +43 -36
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +88 -78
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +5 -4
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +30 -27
- package/libs/PanoTagPlugin/Components/Common/TextItem.js +106 -0
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +20 -14
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +114 -92
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +71 -52
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +62 -50
- package/libs/PanoTagPlugin/Components/Tag/index.js +92 -63
- package/libs/PanoTagPlugin/Components/TagContainer.js +108 -64
- package/libs/PanoTagPlugin/Components/TagWrapper.js +113 -75
- package/libs/PanoTagPlugin/controller/index.js +0 -1
- package/libs/PanoTagPlugin/index.js +3 -7
- package/libs/PanoTagPlugin/tag.config.js +1 -2
- package/libs/PanoTagPlugin/typings/controller.js +1 -0
- package/libs/PanoTagPlugin/typings/index.js +1 -0
- package/libs/PanoTagPlugin/utils/constants.js +1 -2
- package/libs/PanoTagPlugin/utils/doUtil.js +6 -6
- package/libs/PanoTagPlugin/utils/index.js +1 -0
- package/libs/components/PaintBrush/Controller.js +3 -3
- package/libs/components/PaintBrush/style.js +1 -1
- package/libs/components/PaintBrush/tween.js +4 -4
- package/libs/components/index.js +2 -0
- package/libs/floorplan/Components/Camera.js +1 -1
- package/libs/floorplan/Components/CurrentFloor.js +51 -41
- package/libs/floorplan/Components/Main.js +41 -22
- package/libs/floorplan/Components/RoomHighlight/Room.js +3 -3
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +3 -2
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +37 -36
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +7 -7
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +3 -4
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +7 -7
- package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +6 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +74 -65
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +2 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +5 -5
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +3 -4
- package/libs/floorplan/index.js +6 -0
- package/libs/floorplan/typings/floorplanData.js +1 -0
- package/libs/floorplan/utils/correctFiveState.js +19 -19
- package/libs/floorplan/utils/formatData.js +16 -16
- package/libs/floorplan/utils/formatPosition.js +7 -7
- package/libs/index.js +344 -90
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +2 -3
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +1 -3
- package/libs/shared-utils/Object3DHelper/Constants/color.js +0 -1
- package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -2
- package/libs/shared-utils/Object3DHelper/Helper/index.js +3 -0
- package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/index.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/index.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -1
- package/libs/shared-utils/animationFrame/index.js +13 -16
- package/libs/shared-utils/animationFrame/tween.js +0 -2
- package/libs/shared-utils/changeModelCanvasOpacity.js +1 -1
- package/libs/shared-utils/createCanvasTextTexture.js +6 -6
- package/libs/shared-utils/createLine/index.js +3 -3
- package/libs/shared-utils/debounce.js +5 -5
- package/libs/shared-utils/equal.js +16 -16
- package/libs/shared-utils/filter.js +1 -1
- package/libs/shared-utils/five/changeMode.js +14 -14
- package/libs/shared-utils/getPxmm.js +7 -8
- package/libs/shared-utils/index.js +33 -29
- package/libs/shared-utils/isTruelyObject.js +1 -1
- package/libs/shared-utils/math/index.js +1 -0
- package/libs/shared-utils/math/planimetry.js +1 -6
- package/libs/shared-utils/math/rad2Deg.js +3 -3
- package/libs/shared-utils/nearlyEqual.js +3 -3
- package/libs/shared-utils/noop.js +1 -1
- package/libs/shared-utils/object3d2LocalMatrix.js +6 -7
- package/libs/shared-utils/removeArrayItem.js +5 -5
- package/libs/shared-utils/tap.js +3 -3
- package/libs/shared-utils/three/index.js +6 -0
- package/libs/shared-utils/three/transformPositionToVector3.js +2 -2
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +12 -12
- package/libs/shared-utils/throttle.js +2 -2
- package/libs/shared-utils/tinyEJSrender.js +7 -7
- package/libs/shared-utils/to.js +14 -15
- package/libs/shared-utils/uuid.js +0 -1
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-changed-params.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-params.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/mount-swiper.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/params-list.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/update-swiper.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/utils.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper-slide.js +1 -1
- package/libs/vendor/swiper/svelte/swiper-svelte.js +3 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper.js +1 -1
- package/package.json +19 -17
- package/dist/index.es.js +0 -16650
- package/dist/index.js +0 -16650
- package/dist/index.umd.js +0 -556
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var f=Object.defineProperty;var h=(e,n,t)=>n in e?f(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var s=(e,n,t)=>(h(e,typeof n!="symbol"?n+"":n,t),t);const w=require("@tweenjs/tween.js"),T=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},m=T(w);class d extends m.default.Tween{constructor(){super(...arguments);s(this,"disposeMethods",[]);s(this,"animationFrameDisposer");s(this,"onDispose",t=>(this.disposeMethods.push(t),this));s(this,"play",()=>(this.start(0),this.animationFrameDisposer=l(t=>this.update(t)),this));s(this,"dispose",()=>{var t;this.stop(),(t=this.animationFrameDisposer)==null||t.call(this),this.disposeMethods.forEach(r=>r()),this.disposeMethods=[],m.default.remove(this)})}}function F(e,n=m.default.Easing.Linear.None){const t=new d({progress:0}).to({progress:1});return e!==void 0&&t.duration(e),n!==void 0&&t.easing(n),t}const o=window.requestAnimationFrame||(e=>setTimeout(e,16)),g=window.cancelAnimationFrame||clearTimeout;function c(e,n=0){n<=0?o(e):o(()=>c(e,n-1))}function l(e,n=60){let t=-1,r=0,a=-1;const p=1e3/n;function u(i){a===-1&&(a=i),t=o(u),!(i-r<p)&&(r=i,e&&e(i-a))}return t=o(u),function(){g(t)}}function D(){const e=Date.now();return new Promise(n=>{o(()=>{n(Date.now()-e)})})}exports.BetterTween=d;exports.getFrameTime=D;exports.nextFrame=c;exports.requestAnimationFrameInterval=l;exports.tweenProgress=F;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function t(i){return!n(i)}function n(i){return i!=null}exports.isNil=t;exports.notNil=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function I(r,x){return r.x===x.x&&r.y===x.y}function N(r,x){return Math.abs(r)===1/0&&Math.abs(x)===1/0?!0:Math.abs(r-x)<.001}function m(r,x){return(x.y-r.y)/(x.x-r.x)}function O(r,x,f){const u=m(r[1],r[0]),y=m(x[1],x[0]);if(isNaN(u)||isNaN(y)||N(u,y))return!1;if(h(r[0],x))return r[0];if(h(r[1],x))return r[1];if(h(x[0],r))return x[0];if(h(x[1],r))return x[1];if(f&&!t(r,x))return!1;const a=r[0],c=x[0];if(Math.abs(u)===1/0)return{x:a.x,y:x[1].y-(x[1].x-a.x)*y};if(Math.abs(y)===1/0)return{x:c.x,y:r[1].y-(r[1].x-c.x)*u};const b=(c.y-a.y+u*a.x-y*c.x)/(u-y),L=u*b-u*a.x+a.y;return{x:b,y:L}}function h(r,x){return I(r,x[0])||I(r,x[1])?!0:(x[0].x-r.x)*(r.x-x[1].x)>=0&&(x[0].y-r.y)*(r.y-x[1].y)>=0&&N(m(x[0],r),m(r,x[1]))}function M(r,x,f){return(r.x-f.x)*(x.y-f.y)-(x.x-f.x)*(r.y-f.y)}function t(r,x){return Math.max(r[0].x,r[1].x)>=Math.min(x[0].x,x[1].x)&&Math.max(x[0].x,x[1].x)>=Math.min(r[0].x,r[1].x)&&Math.max(r[0].y,r[1].y)>=Math.min(x[0].y,x[1].y)&&M(x[0],r[1],r[0])*M(r[1],x[1],r[0])>0&&M(r[0],x[1],x[0])*M(x[1],r[1],x[0])>0?1:0}exports.intersectionOfLine=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function r(n,e=200){let t;return function(...u){t||(n(...u),t=setTimeout(function(){t=null},e))}}exports.throttle=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var i=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var n=(a,e,r)=>e in a?m(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,o=(a,e)=>{for(var r in e||(e={}))M.call(e,r)&&n(a,r,e[r]);if(i)for(var r of i(e))h.call(e,r)&&n(a,r,e[r]);return a};const d=require("three");function f(a,e){a.traverse(r=>{var s;if(r.type==="Mesh"){const t=r,c=o({map:t.material.map||{}},e);t.material=new d.MeshBasicMaterial(c),t.renderOrder=1,((s=r.parent)==null?void 0:s.type)==="Mesh"&&(r.renderOrder=r.parent.renderOrder+1)}})}exports.transfromToMeshBasicMaterial=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function t(){return((1+Math.random())*65536|0).toString(16).substring(1)}function u(){return(t()+t()+"-"+t()+"-4"+t().substr(0,3)+"-"+t()+"-"+t()+t()+t()).toLowerCase()}exports.uuid=u;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var a = (e, r, t) => r in e ? i(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
|
+
var s = (e, r, t) => (a(e, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
|
+
import { Subscribe as c } from "./Subscribe.c73e0f91.es.js";
|
|
5
|
+
class x {
|
|
6
|
+
constructor(r, t) {
|
|
7
|
+
s(this, "five");
|
|
8
|
+
s(this, "hooks", new c());
|
|
9
|
+
s(this, "staticPrefix", "//vrlab-static.ljcdn.com");
|
|
10
|
+
this.five = r, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
|
|
11
|
+
}
|
|
12
|
+
getCurrentState() {
|
|
13
|
+
return this.state;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
x as Controller
|
|
18
|
+
};
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
var se = Object.defineProperty;
|
|
2
|
+
var W = Object.getOwnPropertySymbols;
|
|
3
|
+
var oe = Object.prototype.hasOwnProperty, ne = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var V = (d, e, t) => e in d ? se(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t, Q = (d, e) => {
|
|
5
|
+
for (var t in e || (e = {}))
|
|
6
|
+
oe.call(e, t) && V(d, t, e[t]);
|
|
7
|
+
if (W)
|
|
8
|
+
for (var t of W(e))
|
|
9
|
+
ne.call(e, t) && V(d, t, e[t]);
|
|
10
|
+
return d;
|
|
11
|
+
};
|
|
12
|
+
var l = (d, e, t) => (V(d, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
+
var I = (d, e, t) => new Promise((s, o) => {
|
|
14
|
+
var c = (r) => {
|
|
15
|
+
try {
|
|
16
|
+
i(t.next(r));
|
|
17
|
+
} catch (u) {
|
|
18
|
+
o(u);
|
|
19
|
+
}
|
|
20
|
+
}, h = (r) => {
|
|
21
|
+
try {
|
|
22
|
+
i(t.throw(r));
|
|
23
|
+
} catch (u) {
|
|
24
|
+
o(u);
|
|
25
|
+
}
|
|
26
|
+
}, i = (r) => r.done ? s(r.value) : Promise.resolve(r.value).then(c, h);
|
|
27
|
+
i((t = t.apply(d, e)).next());
|
|
28
|
+
});
|
|
29
|
+
import * as A from "three";
|
|
30
|
+
import { Vector3 as M } from "three";
|
|
31
|
+
import { CSS3DObject as ie, CSS3DRenderer as _ } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
32
|
+
import { Subscribe as J } from "./Subscribe.c73e0f91.es.js";
|
|
33
|
+
function re(...d) {
|
|
34
|
+
const e = new M();
|
|
35
|
+
return d.forEach((t) => {
|
|
36
|
+
e.add(t);
|
|
37
|
+
}), e.divideScalar(d.length), e;
|
|
38
|
+
}
|
|
39
|
+
function $(d, e) {
|
|
40
|
+
const t = Math.round(d);
|
|
41
|
+
return t % 2 === 0 ? t : t + Number(e != null && e.smaller ? -1 : 1);
|
|
42
|
+
}
|
|
43
|
+
const de = ({ x: d, y: e, z: t }) => new M(d, e, t), ce = ([d, e, t]) => new M(d, e, t), ae = (d) => d instanceof M ? d : Array.isArray(d) ? ce(d) : de(d), K = "1.0.2", he = `CSS3DObjectPlus@${K}`, be = 216e-5, le = 3e-3;
|
|
44
|
+
class ue extends ie {
|
|
45
|
+
constructor(t, s, o = le, c = 1, h = "front") {
|
|
46
|
+
const i = Math.max(be, o), r = s[0].distanceTo(s[1]), u = s[1].distanceTo(s[2]), f = $(r / o * c), D = $(u / o * c), E = re(...s);
|
|
47
|
+
let b;
|
|
48
|
+
if (i === o)
|
|
49
|
+
t.style.width = `${f}px`, t.style.height = `${D}px`, b = t;
|
|
50
|
+
else {
|
|
51
|
+
const p = document.createElement("div");
|
|
52
|
+
p.style.width = `${f}px`, p.style.height = `${D}px`, p.style.pointerEvents = "none";
|
|
53
|
+
const x = o / i;
|
|
54
|
+
t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${x * f}px`, t.style.height = `${x * D}px`, p.appendChild(t), b = p;
|
|
55
|
+
}
|
|
56
|
+
super(b);
|
|
57
|
+
l(this, "version", K);
|
|
58
|
+
l(this, "width");
|
|
59
|
+
l(this, "height");
|
|
60
|
+
l(this, "domWidthPx");
|
|
61
|
+
l(this, "domHeightPx");
|
|
62
|
+
l(this, "cornerPoints");
|
|
63
|
+
l(this, "ratio");
|
|
64
|
+
l(this, "container");
|
|
65
|
+
l(this, "centerPosition");
|
|
66
|
+
l(this, "mode", "front");
|
|
67
|
+
l(this, "hooks", new J());
|
|
68
|
+
l(this, "isCSS3DObjectPlus", !0);
|
|
69
|
+
if (this.scale.set(i, i, i), this.cornerPoints = s, this.ratio = o, this.container = t, this.mode = h, i === o)
|
|
70
|
+
this.width = r, this.height = u, this.domWidthPx = f, this.domHeightPx = D, this.centerPosition = E;
|
|
71
|
+
else {
|
|
72
|
+
const p = o / i;
|
|
73
|
+
this.width = p * r, this.height = p * u, this.domWidthPx = p * f, this.domHeightPx = p * D, this.centerPosition = new M().subVectors(E, s[0]).multiplyScalar(p).add(s[0]);
|
|
74
|
+
}
|
|
75
|
+
t.classList.add(`${he}__container`);
|
|
76
|
+
const O = new M().subVectors(s[1], s[0]), F = new M().subVectors(s[3], s[0]), z = new M().crossVectors(O, F).normalize();
|
|
77
|
+
this.lookAt(z);
|
|
78
|
+
const g = this.up.clone().applyQuaternion(this.quaternion), j = F.clone(), v = new M().crossVectors(g, j).normalize();
|
|
79
|
+
this.rotateOnWorldAxis(v, g.angleTo(j)), this.position.copy(E);
|
|
80
|
+
}
|
|
81
|
+
changeMode(t, s) {
|
|
82
|
+
if (t === this.mode)
|
|
83
|
+
return;
|
|
84
|
+
const o = this.mode;
|
|
85
|
+
this.mode = t, this.hooks.emit("changeMode", t, o, s);
|
|
86
|
+
}
|
|
87
|
+
applyScaleMatrix4(t) {
|
|
88
|
+
this.scale.applyMatrix4(t), this.hooks.emit("applyScaleMatrix4", t);
|
|
89
|
+
}
|
|
90
|
+
applyMatrix4(t) {
|
|
91
|
+
super.applyMatrix4(t), this.hooks.emit("applyMatrix4", t);
|
|
92
|
+
}
|
|
93
|
+
applyQuaternion(t) {
|
|
94
|
+
return super.applyQuaternion(t), this.hooks.emit("applyQuaternion", t), this;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const fe = "v2.0.1", X = "CSS3DRenderer", C = `${X}@${fe}`, G = (d) => `${C}--${d}`, n = {};
|
|
98
|
+
class Oe {
|
|
99
|
+
constructor() {
|
|
100
|
+
l(this, "hooks", new J());
|
|
101
|
+
l(this, "state", {
|
|
102
|
+
enabled: !0,
|
|
103
|
+
visible: !0,
|
|
104
|
+
disposed: !1
|
|
105
|
+
});
|
|
106
|
+
l(this, "store", {
|
|
107
|
+
rendered: !1,
|
|
108
|
+
disposers: [],
|
|
109
|
+
frontModeCSS3DObjects: {},
|
|
110
|
+
behindModeCSS3DObjects: {}
|
|
111
|
+
});
|
|
112
|
+
l(this, "create3DElement", (e, t, s) => {
|
|
113
|
+
if (this.state.disposed)
|
|
114
|
+
return this.disposedErrorLog();
|
|
115
|
+
const o = (() => {
|
|
116
|
+
const a = {
|
|
117
|
+
ratio: 216e-5,
|
|
118
|
+
devicePixelRatio: 1,
|
|
119
|
+
mode: "front",
|
|
120
|
+
autoRender: !0,
|
|
121
|
+
container: document.createElement("div"),
|
|
122
|
+
pointerEvents: "none"
|
|
123
|
+
};
|
|
124
|
+
return Object.assign(a, s);
|
|
125
|
+
})(), c = t.map(ae);
|
|
126
|
+
if ((c == null ? void 0 : c.length) < 4)
|
|
127
|
+
return console.error(`${C}: requires 4 point but params may have fewer`);
|
|
128
|
+
const { ratio: h, devicePixelRatio: i, mode: r, autoRender: u, container: f, pointerEvents: D } = o, E = [], { css3DObject: b, opacityMesh: O } = this.createObject(c, { ratio: h, dpr: i, container: f, mode: r, pointerEvents: D });
|
|
129
|
+
f.id = `container--${b.uuid}`;
|
|
130
|
+
const F = r === "front" && !n.frontModeStore, z = r === "behind" && !n.behindModeStore;
|
|
131
|
+
r === "front" && this.initGlobalModeStore("front"), r === "behind" && this.initGlobalModeStore("behind", o.scene), b.hooks.on("changeMode", (a, w, y) => {
|
|
132
|
+
var B, H, N;
|
|
133
|
+
if (a === w)
|
|
134
|
+
return;
|
|
135
|
+
a === "front" && this.initGlobalModeStore("front"), a === "behind" && this.initGlobalModeStore("behind", y);
|
|
136
|
+
const S = w === "front" ? n.frontModeStore : n.behindModeStore, m = a === "front" ? n.frontModeStore : n.behindModeStore, q = w === "behind" ? this.store.behindModeCSS3DObjects : this.store.frontModeCSS3DObjects, T = a === "behind" ? this.store.behindModeCSS3DObjects : this.store.frontModeCSS3DObjects;
|
|
137
|
+
if (!q || !T)
|
|
138
|
+
return console.error(`${C}: changeMode error: prevObjects or nextObjects is undefined`);
|
|
139
|
+
const R = q[b.uuid];
|
|
140
|
+
if (!R)
|
|
141
|
+
return console.error(`${C}: changeMode error: prevObject is undefined`);
|
|
142
|
+
if (a === "behind") {
|
|
143
|
+
const U = (B = R.opacityMesh) != null ? B : this.createOpacityMesh(R.css3DObject);
|
|
144
|
+
S == null || S.css3DScene.remove(R.css3DObject), T[b.uuid] = { css3DObject: b, opacityMesh: U, visible: !0, enabled: !0, mode: a, scene: y }, m == null || m.css3DScene.add(b), y == null || y.add(U);
|
|
145
|
+
}
|
|
146
|
+
a === "front" && (S == null || S.css3DScene.remove(R.css3DObject), (N = (H = q[b.uuid]) == null ? void 0 : H.scene) == null || N.remove(R.opacityMesh), T[b.uuid] = { css3DObject: b, visible: !0, enabled: !0, mode: a }, m == null || m.css3DScene.add(b)), a === "behind" && this.appendToElement(n.behindModeContainer, "behind"), a === "front" && this.appendToElement(n.frontModeContainer, "front"), this.render(e), console.log("change success");
|
|
147
|
+
});
|
|
148
|
+
const g = r === "front" ? n.frontModeStore : n.behindModeStore, { css3DScene: j, css3DRenderer: v } = g, p = (() => {
|
|
149
|
+
const a = () => {
|
|
150
|
+
var y, S;
|
|
151
|
+
const w = b.mode;
|
|
152
|
+
if (w === "front")
|
|
153
|
+
this.store.frontModeCSS3DObjects[b.uuid] = {
|
|
154
|
+
visible: !0,
|
|
155
|
+
enabled: !0,
|
|
156
|
+
css3DObject: b,
|
|
157
|
+
mode: "front"
|
|
158
|
+
};
|
|
159
|
+
else {
|
|
160
|
+
if (!o.scene)
|
|
161
|
+
return;
|
|
162
|
+
this.store.behindModeCSS3DObjects[b.uuid] = {
|
|
163
|
+
visible: !0,
|
|
164
|
+
enabled: !0,
|
|
165
|
+
css3DObject: b,
|
|
166
|
+
opacityMesh: O,
|
|
167
|
+
mode: "behind",
|
|
168
|
+
scene: o.scene
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
j.getObjectById(b.id) || j.add(b), w === "behind" && O && ((y = o.scene) != null && y.getObjectById(O.id) || (S = o.scene) == null || S.add(O), E.push(() => {
|
|
172
|
+
var m;
|
|
173
|
+
return O && ((m = o.scene) == null ? void 0 : m.remove(O));
|
|
174
|
+
}));
|
|
175
|
+
};
|
|
176
|
+
return F || z ? (v.domElement.style.position = "absolute", v.domElement.style.top = "0", v.domElement.style.userSelect = "none", v.domElement.style.pointerEvents = "none", v.domElement.classList.add(G(r)), () => {
|
|
177
|
+
a(), this.render(e);
|
|
178
|
+
}) : (this.store.rendered = !0, () => a());
|
|
179
|
+
})(), x = r === "front" ? n.frontModeContainer : n.behindModeContainer;
|
|
180
|
+
if (x) {
|
|
181
|
+
this.appendToElement(x, r);
|
|
182
|
+
const a = r === "front" ? n.frontModeStore : n.behindModeStore;
|
|
183
|
+
a && (a.appendedToPage = !0);
|
|
184
|
+
}
|
|
185
|
+
const k = (a) => this.setVisibleById(b.uuid, a), P = (a) => this.setEnabledById(b.uuid, a), Y = () => k(!0), Z = () => k(!1), ee = () => P(!0), te = () => P(!1), L = () => (delete this.store.frontModeCSS3DObjects[b.uuid], delete this.store.behindModeCSS3DObjects[b.uuid], E.forEach((a) => a == null ? void 0 : a()), j.remove(b), j.children.length === 0 && (typeof g.requestAnimationFrameId == "number" && cancelAnimationFrame(g.requestAnimationFrameId), v.domElement.remove(), r === "front" && (n.frontModeStore = void 0), r === "behind" && (n.behindModeStore = void 0), n.frontModeResizeObserver = void 0, n.behindModeResizeObserver = void 0), !0);
|
|
186
|
+
return this.store.disposers.push(L), u && p(), {
|
|
187
|
+
id: b.uuid,
|
|
188
|
+
container: f,
|
|
189
|
+
dispose: L,
|
|
190
|
+
css3DObject: b,
|
|
191
|
+
render: u ? void 0 : p,
|
|
192
|
+
show: Y,
|
|
193
|
+
hide: Z,
|
|
194
|
+
setVisible: k,
|
|
195
|
+
disable: te,
|
|
196
|
+
enable: ee,
|
|
197
|
+
setEnabled: P,
|
|
198
|
+
appendToElement: (a) => this.appendToElement(a, r)
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
l(this, "setVisibleById", (e, t) => {
|
|
202
|
+
var o;
|
|
203
|
+
const s = (o = this.store.frontModeCSS3DObjects[e]) != null ? o : this.store.behindModeCSS3DObjects[e];
|
|
204
|
+
if (!s)
|
|
205
|
+
return console.error("id not found", e);
|
|
206
|
+
s.visible = t, this.state.visible && (s.css3DObject.visible = t, s.mode === "behind" && (s.opacityMesh.visible = t));
|
|
207
|
+
});
|
|
208
|
+
l(this, "setEnabledById", (e, t) => {
|
|
209
|
+
var c, h, i;
|
|
210
|
+
const s = (c = this.store.frontModeCSS3DObjects[e]) != null ? c : this.store.behindModeCSS3DObjects[e];
|
|
211
|
+
if (!s)
|
|
212
|
+
return;
|
|
213
|
+
const o = s.mode === "front" ? (h = n.frontModeStore) == null ? void 0 : h.css3DScene : (i = n.behindModeStore) == null ? void 0 : i.css3DScene;
|
|
214
|
+
!o || (t ? (o.add(s.css3DObject), s.mode === "behind" && s.scene.add(s.opacityMesh)) : (o.remove(s.css3DObject), s.mode === "behind" && s.scene.remove(s.opacityMesh)), s.enabled = t);
|
|
215
|
+
});
|
|
216
|
+
l(this, "createObject", (e, t) => {
|
|
217
|
+
const { ratio: s, dpr: o, container: c, mode: h, pointerEvents: i } = t, r = new ue(c, e, s, o, h);
|
|
218
|
+
c.style.pointerEvents = i, c.classList.add(`${X}__container`);
|
|
219
|
+
const u = h === "behind" ? this.createOpacityMesh(r) : void 0;
|
|
220
|
+
return { css3DObject: r, opacityMesh: u };
|
|
221
|
+
});
|
|
222
|
+
l(this, "createOpacityMesh", (e) => {
|
|
223
|
+
const { domWidthPx: t, domHeightPx: s } = e, o = new A.MeshBasicMaterial({
|
|
224
|
+
opacity: 0,
|
|
225
|
+
color: 0,
|
|
226
|
+
transparent: !1,
|
|
227
|
+
side: A.DoubleSide
|
|
228
|
+
}), c = new A.PlaneGeometry(t, s), h = new A.Mesh(c, o);
|
|
229
|
+
return h.name = G("mesh"), h.position.copy(e.position), h.rotation.copy(e.rotation), h.scale.copy(e.scale), e.hooks.on("applyMatrix4", (i) => h.applyMatrix4(i)), e.hooks.on("applyQuaternion", (i) => h.applyQuaternion(i)), e.hooks.on("applyScaleMatrix4", (i) => h.scale.applyMatrix4(i)), h;
|
|
230
|
+
});
|
|
231
|
+
l(this, "createResizeObserver", (e, t, s = !0) => {
|
|
232
|
+
if (!e)
|
|
233
|
+
return console.error("createResizeObserver: element is undefined"), { observe: () => {
|
|
234
|
+
}, unobserve: () => {
|
|
235
|
+
} };
|
|
236
|
+
const o = () => {
|
|
237
|
+
const h = $(e.clientWidth, { smaller: !0 }), i = $(e.clientHeight, { smaller: !0 });
|
|
238
|
+
t(h, i);
|
|
239
|
+
};
|
|
240
|
+
if (typeof ResizeObserver == "undefined" || !ResizeObserver)
|
|
241
|
+
return console.warn("createResizeObserver: ResizeObserver is undefined"), { observe: () => o(), unobserve: () => {
|
|
242
|
+
} };
|
|
243
|
+
const c = new ResizeObserver(o);
|
|
244
|
+
return s && o(), {
|
|
245
|
+
observe: () => c.observe(e),
|
|
246
|
+
unobserve: () => c.unobserve(e)
|
|
247
|
+
};
|
|
248
|
+
});
|
|
249
|
+
l(this, "disposedErrorLog", () => {
|
|
250
|
+
console.error(`${C} is disposed`);
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
getCurrentState() {
|
|
254
|
+
return this.state;
|
|
255
|
+
}
|
|
256
|
+
setState(e, t = { userAction: !0 }) {
|
|
257
|
+
if (this.state.disposed)
|
|
258
|
+
return this.disposedErrorLog();
|
|
259
|
+
const s = Q({}, this.state);
|
|
260
|
+
this.state = Object.assign(this.state, e), s.visible !== this.state.visible && (e.visible ? this.handleShow() : this.handleHide()), s.enabled !== this.state.enabled && (e.enabled ? this.handleEnable() : this.handleDisable()), this.hooks.emit("stateChange", { state: this.state, prevState: s, userAction: t.userAction });
|
|
261
|
+
}
|
|
262
|
+
dispose() {
|
|
263
|
+
this.store.disposers.forEach((e) => e == null ? void 0 : e()), this.store.disposers = [], this.hooks.emit("dispose"), this.state.disposed = !0;
|
|
264
|
+
}
|
|
265
|
+
show() {
|
|
266
|
+
return I(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
267
|
+
if (this.state.disposed)
|
|
268
|
+
return this.disposedErrorLog();
|
|
269
|
+
this.setState({ visible: !0 }, { userAction: e }), this.hooks.emit("show", { userAction: e });
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
hide() {
|
|
273
|
+
return I(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
274
|
+
if (this.state.disposed)
|
|
275
|
+
return this.disposedErrorLog();
|
|
276
|
+
this.setState({ visible: !1 }, { userAction: e }), this.hooks.emit("hide", { userAction: e });
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
enable({ userAction: e } = { userAction: !0 }) {
|
|
280
|
+
if (this.state.disposed)
|
|
281
|
+
return this.disposedErrorLog();
|
|
282
|
+
this.setState({ enabled: !0 }, { userAction: e }), this.hooks.emit("enable", { userAction: e });
|
|
283
|
+
}
|
|
284
|
+
disable({ userAction: e } = { userAction: !0 }) {
|
|
285
|
+
if (this.state.disposed)
|
|
286
|
+
return this.disposedErrorLog();
|
|
287
|
+
this.setState({ enabled: !1 }, { userAction: e }), this.hooks.emit("disable", { userAction: e });
|
|
288
|
+
}
|
|
289
|
+
setContainer(e, t) {
|
|
290
|
+
t === "front" ? n.frontModeContainer = e : n.behindModeContainer = e;
|
|
291
|
+
}
|
|
292
|
+
appendToElement(e, t) {
|
|
293
|
+
const s = t === "front" ? n.frontModeStore : n.behindModeStore;
|
|
294
|
+
if (!s) {
|
|
295
|
+
if (t === "front" && !n.frontModeContainer) {
|
|
296
|
+
if (!e)
|
|
297
|
+
throw new Error(`${C} Cannot append to container: front mode but container is ${e}`);
|
|
298
|
+
n.frontModeContainer = e;
|
|
299
|
+
}
|
|
300
|
+
if (t === "behind" && !n.behindModeContainer) {
|
|
301
|
+
if (!e)
|
|
302
|
+
throw new Error(`${C} Cannot append to container: behind mode but container is ${e}`);
|
|
303
|
+
n.behindModeContainer = e;
|
|
304
|
+
}
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
if (s.appendedToPage)
|
|
308
|
+
return;
|
|
309
|
+
const o = t === "behind" ? n.behindModeContainer : n.frontModeContainer;
|
|
310
|
+
if (!o)
|
|
311
|
+
return console.error("wrapper is undefined");
|
|
312
|
+
if (o.appendChild(s.css3DRenderer.domElement), t === "behind" && !n.behindModeResizeObserver) {
|
|
313
|
+
const c = (r, u) => {
|
|
314
|
+
var f;
|
|
315
|
+
(f = n.behindModeStore) == null || f.css3DRenderer.setSize(r, u);
|
|
316
|
+
}, { observe: h, unobserve: i } = this.createResizeObserver(o, c, !0);
|
|
317
|
+
n.behindModeResizeObserver = { observe: h, unobserve: i }, h(), this.store.disposers.push(i);
|
|
318
|
+
}
|
|
319
|
+
if (t === "front" && !n.frontModeResizeObserver) {
|
|
320
|
+
const c = (r, u) => {
|
|
321
|
+
var f;
|
|
322
|
+
(f = n.frontModeStore) == null || f.css3DRenderer.setSize(r, u);
|
|
323
|
+
}, { observe: h, unobserve: i } = this.createResizeObserver(o, c, !0);
|
|
324
|
+
n.frontModeResizeObserver = { observe: h, unobserve: i }, h(), this.store.disposers.push(i);
|
|
325
|
+
}
|
|
326
|
+
s.appendedToPage = !0;
|
|
327
|
+
}
|
|
328
|
+
render(e) {
|
|
329
|
+
const t = n.behindModeStore, s = n.frontModeStore;
|
|
330
|
+
if (t && Object.keys(this.store.behindModeCSS3DObjects).length > 0 && !t.requestAnimationFrameId) {
|
|
331
|
+
const o = () => {
|
|
332
|
+
const c = requestAnimationFrame(o);
|
|
333
|
+
t.requestAnimationFrameId = c, t.css3DRenderer.render(t.css3DScene, e);
|
|
334
|
+
};
|
|
335
|
+
o();
|
|
336
|
+
}
|
|
337
|
+
if (s && Object.keys(this.store.frontModeCSS3DObjects).length > 0 && !s.requestAnimationFrameId) {
|
|
338
|
+
const o = () => {
|
|
339
|
+
const c = requestAnimationFrame(o);
|
|
340
|
+
s.requestAnimationFrameId = c, s.css3DRenderer.render(s.css3DScene, e);
|
|
341
|
+
};
|
|
342
|
+
o();
|
|
343
|
+
}
|
|
344
|
+
Object.keys(this.store.frontModeCSS3DObjects).length === 0 && (s == null ? void 0 : s.requestAnimationFrameId) !== void 0 && (cancelAnimationFrame(s.requestAnimationFrameId), s.requestAnimationFrameId = void 0), Object.keys(this.store.behindModeCSS3DObjects).length === 0 && (t == null ? void 0 : t.requestAnimationFrameId) !== void 0 && (cancelAnimationFrame(t.requestAnimationFrameId), t.requestAnimationFrameId = void 0);
|
|
345
|
+
}
|
|
346
|
+
initGlobalModeStore(e, t) {
|
|
347
|
+
const s = e === "front" && !n.frontModeStore;
|
|
348
|
+
e === "behind" && !n.behindModeStore && (n.behindModeStore = { scene: t, css3DScene: new A.Scene(), css3DRenderer: new _() }), s && (n.frontModeStore = { css3DScene: new A.Scene(), css3DRenderer: new _() });
|
|
349
|
+
}
|
|
350
|
+
handleShow() {
|
|
351
|
+
return I(this, null, function* () {
|
|
352
|
+
Object.values(this.store.frontModeCSS3DObjects).forEach((e) => {
|
|
353
|
+
e.css3DObject.visible = e.visible;
|
|
354
|
+
}), Object.values(this.store.behindModeCSS3DObjects).forEach((e) => {
|
|
355
|
+
e.css3DObject.visible = e.visible, e.opacityMesh.visible = e.visible;
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
handleHide() {
|
|
360
|
+
return I(this, null, function* () {
|
|
361
|
+
Object.values(this.store.frontModeCSS3DObjects).forEach((e) => {
|
|
362
|
+
e.css3DObject.visible = !1;
|
|
363
|
+
}), Object.values(this.store.behindModeCSS3DObjects).forEach((e) => {
|
|
364
|
+
e.css3DObject.visible = !1, e.opacityMesh.visible = !1;
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
handleEnable() {
|
|
369
|
+
Object.values(this.store.frontModeCSS3DObjects).forEach((e) => {
|
|
370
|
+
var t;
|
|
371
|
+
!e.enabled || (t = n.frontModeStore) == null || t.css3DScene.add(e.css3DObject);
|
|
372
|
+
}), Object.values(this.store.behindModeCSS3DObjects).forEach((e) => {
|
|
373
|
+
var t, s;
|
|
374
|
+
!e.enabled || ((t = n.behindModeStore) == null || t.css3DScene.add(e.css3DObject), (s = n.behindModeStore) == null || s.scene.add(e.opacityMesh));
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
handleDisable() {
|
|
378
|
+
Object.values(this.store.frontModeCSS3DObjects).forEach((e) => {
|
|
379
|
+
var t;
|
|
380
|
+
(t = n.frontModeStore) == null || t.css3DScene.remove(e.css3DObject);
|
|
381
|
+
}), Object.values(this.store.behindModeCSS3DObjects).forEach((e) => {
|
|
382
|
+
var t, s;
|
|
383
|
+
(t = n.behindModeStore) == null || t.css3DScene.remove(e.css3DObject), (s = n.behindModeStore) == null || s.scene.remove(e.opacityMesh);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
export {
|
|
388
|
+
ue as CSS3DObjectPlus,
|
|
389
|
+
Oe as CSS3DRender,
|
|
390
|
+
ae as anyPositionToVector3,
|
|
391
|
+
ce as arrayPositionToVector3,
|
|
392
|
+
re as centerPoint
|
|
393
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
var b = (t, n, a) => new Promise((c, i) => {
|
|
2
|
+
var e = (r) => {
|
|
3
|
+
try {
|
|
4
|
+
o(a.next(r));
|
|
5
|
+
} catch (m) {
|
|
6
|
+
i(m);
|
|
7
|
+
}
|
|
8
|
+
}, l = (r) => {
|
|
9
|
+
try {
|
|
10
|
+
o(a.throw(r));
|
|
11
|
+
} catch (m) {
|
|
12
|
+
i(m);
|
|
13
|
+
}
|
|
14
|
+
}, o = (r) => r.done ? c(r.value) : Promise.resolve(r.value).then(e, l);
|
|
15
|
+
o((a = a.apply(t, n)).next());
|
|
16
|
+
});
|
|
17
|
+
import { Five as x } from "@realsee/five";
|
|
18
|
+
import * as v from "@tweenjs/tween.js";
|
|
19
|
+
import { nextFrame as F, requestAnimationFrameInterval as T } from "./index.b8fdb59b.es.js";
|
|
20
|
+
const _ = v.Easing;
|
|
21
|
+
function g(t, n, a, c = _.Linear.None) {
|
|
22
|
+
const i = new v.Tween(t).to(n, a).easing(c);
|
|
23
|
+
F(() => i.start(0));
|
|
24
|
+
const e = T((o) => {
|
|
25
|
+
i.update(o) === !1 && e();
|
|
26
|
+
}), l = [];
|
|
27
|
+
return i.onDestroy = (o) => (l.push(o), i), i.destroy = function() {
|
|
28
|
+
this.stop(), Object.assign(i, {
|
|
29
|
+
_onStartCallback: null,
|
|
30
|
+
_onUpdateCallback: null,
|
|
31
|
+
_onCompleteCallback: null,
|
|
32
|
+
_onStopCallbackL: null
|
|
33
|
+
});
|
|
34
|
+
let o;
|
|
35
|
+
for (; o = l.shift(); )
|
|
36
|
+
o();
|
|
37
|
+
e();
|
|
38
|
+
}, i;
|
|
39
|
+
}
|
|
40
|
+
function D(t, n) {
|
|
41
|
+
return g({ progress: 0 }, { progress: 1 }, t, n);
|
|
42
|
+
}
|
|
43
|
+
var N = /* @__PURE__ */ ((t) => (t.Move = "Move", t.Rotate = "Rotate", t))(N || {}), s = /* @__PURE__ */ ((t) => (t.Clockwise = "Clockwise", t.Anticlockwise = "Anticlockwise", t.Loop = "Loop", t))(s || {});
|
|
44
|
+
const k = Math.PI * 2;
|
|
45
|
+
function L(t) {
|
|
46
|
+
return (t % k + k) % k;
|
|
47
|
+
}
|
|
48
|
+
function M(t) {
|
|
49
|
+
return t % k;
|
|
50
|
+
}
|
|
51
|
+
function I(t, n, a) {
|
|
52
|
+
return t + (n - t) * a;
|
|
53
|
+
}
|
|
54
|
+
const y = (t, n, a) => {
|
|
55
|
+
const c = Math.PI, i = c * 2;
|
|
56
|
+
return t = L(t), n = L(n), a === s.Anticlockwise && t < n && (t += i), a === s.Clockwise && n < t && (n += i), a === s.Loop && n - t > c ? y(t, n, s.Anticlockwise) : a === s.Loop && t - n > c ? y(t, n, s.Clockwise) : { from: t, to: n };
|
|
57
|
+
}, q = (t) => {
|
|
58
|
+
const n = {}, a = (r, m, ...h) => b(void 0, [r, m, ...h], function* (e, l, o = { preload: !0 }) {
|
|
59
|
+
return n.interruptCallback && n.interruptCallback(!1), o.asyncStartCallback && (yield o.asyncStartCallback()), e.mode && e.mode !== t.currentMode && (yield t.changeMode(e.mode)), o.preload && e.panoIndex !== void 0 && e.panoIndex !== t.panoIndex && (yield t.preloadPano(e.panoIndex)), o.asyncEndCallback && (yield o.asyncEndCallback()), e.panoIndex === void 0 && e.fov === void 0 && e.latitude === void 0 && e.longitude === void 0 ? !0 : yield new Promise((p, d) => {
|
|
60
|
+
const u = e.panoIndex !== void 0 ? e.panoIndex : t.panoIndex;
|
|
61
|
+
u !== void 0 ? t.moveToPano(
|
|
62
|
+
u,
|
|
63
|
+
Object.assign(
|
|
64
|
+
{
|
|
65
|
+
duration: l,
|
|
66
|
+
moveEndCallback: () => p(!0),
|
|
67
|
+
moveCancelCallback: () => d(!1)
|
|
68
|
+
},
|
|
69
|
+
e
|
|
70
|
+
)
|
|
71
|
+
) : d(!1);
|
|
72
|
+
});
|
|
73
|
+
}), c = (e) => {
|
|
74
|
+
const l = t.state, o = M(l.latitude), r = M(e.latitude), { from: m, to: h } = y(
|
|
75
|
+
l.longitude,
|
|
76
|
+
e.longitude,
|
|
77
|
+
e.rotation || s.Loop
|
|
78
|
+
), p = l.fov, d = e.fov;
|
|
79
|
+
return {
|
|
80
|
+
from: { latitude: o, longitude: m, fov: p },
|
|
81
|
+
to: { latitude: r, longitude: h, fov: d }
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
move: a,
|
|
86
|
+
rotate: (r, m, ...h) => b(void 0, [r, m, ...h], function* (e, l, o = {}) {
|
|
87
|
+
n.interruptCallback && n.interruptCallback(!1), o.asyncStartCallback && (yield o.asyncStartCallback()), t.currentMode !== x.Mode.Panorama && (yield t.changeMode(x.Mode.Panorama)), e.panoIndex !== void 0 && e.panoIndex !== t.panoIndex && (o.preload && (yield t.preloadPano(e.panoIndex)), yield new Promise((u, w) => {
|
|
88
|
+
if (!e.panoIndex) {
|
|
89
|
+
u(!0);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
t.moveToPano(e.panoIndex, {
|
|
93
|
+
moveEndCallback: () => u(!0),
|
|
94
|
+
moveCancelCallback: () => w(!1)
|
|
95
|
+
});
|
|
96
|
+
})), o.asyncEndCallback && (yield o.asyncEndCallback());
|
|
97
|
+
const { from: p, to: d } = c(e);
|
|
98
|
+
return yield new Promise((u) => {
|
|
99
|
+
const w = ({ progress: C }) => {
|
|
100
|
+
const f = {};
|
|
101
|
+
f.longitude = I(p.longitude, d.longitude, C), f.latitude = I(p.latitude, d.latitude, C), f.fov = I(p.fov, d.fov, C), t.setState(f, !0);
|
|
102
|
+
}, E = () => {
|
|
103
|
+
u(!0);
|
|
104
|
+
}, S = () => {
|
|
105
|
+
u(!1);
|
|
106
|
+
}, A = e.rotateSpeed ? Math.ceil(Math.abs(d.longitude - p.longitude) / e.rotateSpeed * 1e3) : l, P = D(A, v.Easing.Linear.None).onUpdate(w).onComplete(E).onDestroy(S);
|
|
107
|
+
e.rotation === s.Loop && P.repeat(1 / 0).yoyo(!0), n.interruptCallback = (C = !0) => {
|
|
108
|
+
P.destroy(), n.interruptCallback = void 0, n.timeoutId && (clearTimeout(n.timeoutId), n.timeoutId = void 0), u(C);
|
|
109
|
+
}, n.timeoutId = setTimeout(() => {
|
|
110
|
+
n.interruptCallback && n.interruptCallback(!0);
|
|
111
|
+
}, l);
|
|
112
|
+
});
|
|
113
|
+
})
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
N as CameraMovementEffect,
|
|
118
|
+
q as CameraMovementPlugin,
|
|
119
|
+
s as Rotation
|
|
120
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var A = Object.defineProperty;
|
|
2
|
+
var y = Object.getOwnPropertySymbols;
|
|
3
|
+
var I = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var x = (o, i, d) => i in o ? A(o, i, { enumerable: !0, configurable: !0, writable: !0, value: d }) : o[i] = d, M = (o, i) => {
|
|
5
|
+
for (var d in i || (i = {}))
|
|
6
|
+
I.call(i, d) && x(o, d, i[d]);
|
|
7
|
+
if (y)
|
|
8
|
+
for (var d of y(i))
|
|
9
|
+
O.call(i, d) && x(o, d, i[d]);
|
|
10
|
+
return o;
|
|
11
|
+
};
|
|
12
|
+
import { Camera as W } from "@realsee/five";
|
|
13
|
+
import * as a from "three";
|
|
14
|
+
const S = (o, i) => {
|
|
15
|
+
let d = !0, r = null;
|
|
16
|
+
const u = M(M({}, {
|
|
17
|
+
lookAtCurrentCamera: !1,
|
|
18
|
+
lockedPanoIndex: null,
|
|
19
|
+
lockedLatitude: null,
|
|
20
|
+
lockedLongitude: null
|
|
21
|
+
}), i == null ? void 0 : i.config), l = new a.Scene(), f = new W(60);
|
|
22
|
+
let m = new a.Object3D(), h, w;
|
|
23
|
+
{
|
|
24
|
+
const e = new a.DirectionalLight(16777215, 0.5);
|
|
25
|
+
e.position.copy(new a.Vector3(1, 1, 1)), l.add(e);
|
|
26
|
+
}
|
|
27
|
+
{
|
|
28
|
+
const e = new a.DirectionalLight(16777215, 0.3);
|
|
29
|
+
l.add(e);
|
|
30
|
+
}
|
|
31
|
+
{
|
|
32
|
+
const e = new a.AmbientLight(16777215, 0.3);
|
|
33
|
+
l.add(e);
|
|
34
|
+
}
|
|
35
|
+
l.add(m);
|
|
36
|
+
const C = () => {
|
|
37
|
+
if (!!o.renderer)
|
|
38
|
+
return r || (r = new a.WebGLRenderer({ antialias: !1, alpha: !0 }), r.setPixelRatio(o.renderer.getPixelRatio()), r.outputEncoding = a.sRGBEncoding, r.setClearColor(1579548, 0), r.autoClear = !0), r;
|
|
39
|
+
}, L = () => {
|
|
40
|
+
m.traverse((e) => {
|
|
41
|
+
e instanceof a.Mesh && [].concat(e.material).forEach((n) => n.dispose());
|
|
42
|
+
}), l.remove(m), m = new a.Object3D(), l.add(m), p();
|
|
43
|
+
}, k = () => {
|
|
44
|
+
h = E(o.model, f.fov, f.aspect), w = o.model.bounding.getCenter(new a.Vector3());
|
|
45
|
+
function e(n) {
|
|
46
|
+
const t = n.clone();
|
|
47
|
+
return t.uniforms.modelAlpha.value = 1, t.uniforms.map.value && (t.uniforms.map.value.needsUpdate = !0), t;
|
|
48
|
+
}
|
|
49
|
+
function c(n) {
|
|
50
|
+
if (n instanceof a.Mesh) {
|
|
51
|
+
const t = n.geometry, s = Array.isArray(n.material) ? n.material.map(e) : e(n.material);
|
|
52
|
+
return new a.Mesh(t, s);
|
|
53
|
+
} else if (n instanceof a.Group) {
|
|
54
|
+
const t = new a.Group();
|
|
55
|
+
return n.children.forEach((s) => t.add(c(s))), t;
|
|
56
|
+
} else {
|
|
57
|
+
const t = new a.Object3D();
|
|
58
|
+
return n.children.forEach((s) => t.add(c(s))), t;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
l.remove(m), m = c(o.model), l.add(m), p();
|
|
62
|
+
}, P = (e, c = {}) => {
|
|
63
|
+
const n = C();
|
|
64
|
+
if (!n)
|
|
65
|
+
return;
|
|
66
|
+
e.appendChild(n.domElement), b(c);
|
|
67
|
+
const t = window.getComputedStyle(e).position;
|
|
68
|
+
t !== "relative" && t !== "absolute" && t !== "fixed" && t !== "sticky" && (e.style.position = "relative");
|
|
69
|
+
}, b = (e = {}) => {
|
|
70
|
+
if (!r)
|
|
71
|
+
return;
|
|
72
|
+
const n = r.domElement.parentNode;
|
|
73
|
+
if (n != null && n.nodeName) {
|
|
74
|
+
const { width: t = n.offsetWidth, height: s = n.offsetHeight } = e;
|
|
75
|
+
r.setSize(t, s), f.aspect = t / s, f.updateProjectionMatrix();
|
|
76
|
+
}
|
|
77
|
+
p();
|
|
78
|
+
};
|
|
79
|
+
function E(e, c, n) {
|
|
80
|
+
const t = e.bounding, s = Math.pow(
|
|
81
|
+
Math.pow(t.max.x - t.min.x + 1, 2) + Math.pow(t.max.y - t.min.y + 1, 2) + Math.pow(t.max.z - t.min.z + 1, 2),
|
|
82
|
+
1 / 2
|
|
83
|
+
);
|
|
84
|
+
let g = s / 2 / Math.tan(Math.PI * c / 360);
|
|
85
|
+
return n < 1 && (g = g / n), isNaN(g) ? s : g;
|
|
86
|
+
}
|
|
87
|
+
function N(e) {
|
|
88
|
+
return o.work.observers[e].standingPosition.clone();
|
|
89
|
+
}
|
|
90
|
+
const p = () => {
|
|
91
|
+
if (!h || !w)
|
|
92
|
+
return;
|
|
93
|
+
const e = o.getPose();
|
|
94
|
+
e.fov = f.fov, e.offset = w, e.distance = h, typeof u.lockedLatitude == "number" && (e.latitude = u.lockedLatitude), typeof u.lockedLongitude == "number" && (e.longitude = u.lockedLongitude), typeof u.lockedPanoIndex == "number" && (e.offset = N(u.lockedPanoIndex)), u.lookAtCurrentCamera && (e.offset = o.camera.position.clone().setY(o.camera.position.y + 1)), f.setFromPose(e), d = !0;
|
|
95
|
+
}, D = () => {
|
|
96
|
+
d !== !0 || !r || !r.domElement.parentNode || r.domElement.parentNode.offsetWidth === 0 || (r.render(l, f), d = !1);
|
|
97
|
+
}, R = () => {
|
|
98
|
+
r && r.dispose(), r = null;
|
|
99
|
+
}, j = (e) => {
|
|
100
|
+
Object.assign(u, e), p();
|
|
101
|
+
};
|
|
102
|
+
return Object.assign(window, { camera: f }), o.on("modelLoaded", k), o.on("modelWillLoad", L), o.on("cameraDirectionUpdate", p), o.on("dispose", R), o.on("renderFrame", D), o.on("cameraPositionUpdate", p), { appendTo: P, refresh: b, changeConfigs: j };
|
|
103
|
+
};
|
|
104
|
+
export {
|
|
105
|
+
S as ModelViewPlugin
|
|
106
|
+
};
|