@realsee/dnalogel 3.77.4-alpha.0 → 3.77.4-alpha.1
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/CHANGELOG.md +837 -846
- package/dist/DigitalPerformancePlugin/controller/index.d.ts +224 -0
- package/dist/DigitalPerformancePlugin/core/DigitalHuman.d.ts +54 -0
- package/dist/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +40 -0
- package/dist/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +150 -0
- package/dist/DigitalPerformancePlugin/core/Trace.d.ts +9 -0
- package/dist/DigitalPerformancePlugin/index.d.ts +11 -0
- package/dist/DigitalPerformancePlugin/mock.d.ts +76 -0
- package/dist/DigitalPerformancePlugin/typings/index.d.ts +79 -0
- package/dist/GuideLinePlugin/Controller.d.ts +2 -34
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +2 -7
- package/dist/index.cjs.js +86 -73
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12911 -11239
- package/dist/index.umd.js +87 -74
- package/libs/DigitalPerformancePlugin/controller/index.d.ts +2 -2
- package/libs/DigitalPerformancePlugin/controller/index.js +164 -173
- package/libs/DigitalPerformancePlugin/core/DigitalHuman.d.ts +15 -6
- package/libs/DigitalPerformancePlugin/core/DigitalHuman.js +125 -98
- package/libs/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +11 -5
- package/libs/DigitalPerformancePlugin/core/DigitalPlayground.js +84 -74
- package/libs/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +7 -0
- package/libs/DigitalPerformancePlugin/mock.d.ts +6 -0
- package/libs/DigitalPerformancePlugin/mock.js +270 -273
- package/libs/GuideLinePlugin/Components/Tag.js +163 -151
- package/libs/GuideLinePlugin/Controller.d.ts +2 -34
- package/libs/GuideLinePlugin/Controller.js +22 -56
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +69 -76
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +2 -7
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.d.ts +1 -0
- package/libs/index.js +161 -150
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +2 -2
- package/docs/.nojekyll +0 -1
- package/docs/assets/custom.css +0 -0
- package/docs/assets/highlight.css +0 -127
- package/docs/assets/icons.js +0 -18
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -60
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1493
- package/docs/classes/AreaMakerPluginType.AreaMakerController.html +0 -59
- package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +0 -71
- package/docs/classes/CSS3DRender.html +0 -100
- package/docs/classes/GuideLineItem.GuideLineItem.html +0 -21
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +0 -72
- package/docs/classes/ModelMakerPluginInstance.html +0 -116
- package/docs/classes/ModelMakerPluginType.ModelMakerBoxItem.html +0 -52
- package/docs/classes/ModelMakerPluginType.ModelMakerPolygonItem.html +0 -52
- package/docs/classes/ModelMakerPluginType.ModelMakerPrismItem.html +0 -53
- package/docs/classes/ModelRoomLabelController.html +0 -19
- package/docs/classes/MoveController.html +0 -45
- package/docs/classes/Object3DHelperController.html +0 -45
- package/docs/classes/PaintBrush.html +0 -15
- package/docs/classes/PanoMeasurePluginLine.html +0 -24
- package/docs/classes/PanoMeasurePluginModel.html +0 -23
- package/docs/classes/PanoMeasurePluginPoint.html +0 -7
- package/docs/classes/PanoMeasurePluginPolyline.html +0 -27
- package/docs/classes/PanoTagPluginController.html +0 -111
- package/docs/classes/Sculpt.html +0 -77
- package/docs/classes/Util.BetterTween.html +0 -6
- package/docs/classes/Util.FiveDomEvents.html +0 -13
- package/docs/classes/Util.FivePuppet.html +0 -20
- package/docs/classes/Util.Interval.html +0 -11
- package/docs/classes/Util.LegacyPointHelper.html +0 -7
- package/docs/classes/Util.LightTag.html +0 -47
- package/docs/classes/Util.LineSegments.html +0 -4
- package/docs/classes/Util.Magnifier.html +0 -26
- package/docs/classes/Util.Object3D.html +0 -8
- package/docs/classes/Util.PointDomHelper.html +0 -8
- package/docs/classes/Util.PointHelper.html +0 -10
- package/docs/classes/Util.PointSelector.html +0 -66
- package/docs/classes/Util.PointSelectorHelper.html +0 -14
- package/docs/classes/Util.Rectangle.html +0 -12
- package/docs/classes/Util.sculpt.BaseEditor.html +0 -17
- package/docs/classes/Util.sculpt.BoxMesh.html +0 -48
- package/docs/classes/Util.sculpt.BoxMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.CircleMesh.html +0 -26
- package/docs/classes/Util.sculpt.CircleMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.CircleWithEdgeMesh.html +0 -26
- package/docs/classes/Util.sculpt.CylinderMesh.html +0 -25
- package/docs/classes/Util.sculpt.CylinderMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.LineMesh.html +0 -34
- package/docs/classes/Util.sculpt.PointMesh.html +0 -24
- package/docs/classes/Util.sculpt.PolygonMesh.html +0 -40
- package/docs/classes/Util.sculpt.PrismMesh.html +0 -48
- package/docs/classes/Util.sculpt.PrismMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.RectangleMesh.html +0 -41
- package/docs/classes/Util.sculpt.RectangleMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.RectangleWithEdgeMesh.html +0 -44
- package/docs/classes/WalkController.html +0 -42
- package/docs/enums/CameraMovementEffect.html +0 -4
- package/docs/enums/ContentType.html +0 -34
- package/docs/enums/DIRECTION.html +0 -5
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +0 -5
- package/docs/enums/DimensionType.html +0 -4
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +0 -4
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +0 -5
- package/docs/enums/PaintBrushTypeEnum.html +0 -4
- package/docs/enums/PointType.html +0 -4
- package/docs/enums/Rotation.html +0 -5
- package/docs/functions/AreaMakerPlugin.html +0 -1
- package/docs/functions/CSS3DRenderPlugin.html +0 -1
- package/docs/functions/CameraMovementPlugin.html +0 -2
- package/docs/functions/CruisePlugin.html +0 -1
- package/docs/functions/CurrentPanoImagePlugin.html +0 -1
- package/docs/functions/FloorplanGuidePlugin.html +0 -1
- package/docs/functions/GuideLinePlugin.html +0 -1
- package/docs/functions/ItemLabelPlugin.html +0 -1
- package/docs/functions/MapviewFloorplanPlugin.html +0 -1
- package/docs/functions/MeasurePlugin.html +0 -1
- package/docs/functions/ModelChassisCompassPlugin.html +0 -2
- package/docs/functions/ModelEntryDoorGuidePlugin.html +0 -2
- package/docs/functions/ModelFloorplanPlugin.html +0 -1
- package/docs/functions/ModelItemLabelPlugin.html +0 -1
- package/docs/functions/ModelMakerPlugin.html +0 -1
- package/docs/functions/ModelRoomLabelPlugin.html +0 -1
- package/docs/functions/ModelTVVideoPlugin.html +0 -1
- package/docs/functions/ModelViewPlugin.html +0 -2
- package/docs/functions/MovePlugin.html +0 -1
- package/docs/functions/Object3DHelperPlugin.html +0 -1
- package/docs/functions/PanoCompassPlugin.html +0 -1
- package/docs/functions/PanoCursorRaycasterPlugin.html +0 -2
- package/docs/functions/PanoDoorLabelPlugin.html +0 -1
- package/docs/functions/PanoFloorplanRadarPlugin.html +0 -1
- package/docs/functions/PanoMeasurePlugin.html +0 -1
- package/docs/functions/PanoRulerPlugin.html +0 -2
- package/docs/functions/PanoRulerProPlugin.html +0 -2
- package/docs/functions/PanoSpatialTagPlugin.html +0 -2
- package/docs/functions/PanoTagPlugin.html +0 -1
- package/docs/functions/PanoVideoPlugin.html +0 -10
- package/docs/functions/PipelinePlugin.html +0 -1
- package/docs/functions/SculptPlugin.html +0 -2
- package/docs/functions/SculptPluginForFive.html +0 -2
- package/docs/functions/TopviewFloorplanPlugin.html +0 -1
- package/docs/functions/Util.awaitNextFrame.html +0 -1
- package/docs/functions/Util.blink.html +0 -13
- package/docs/functions/Util.blinkWithPreset.html +0 -6
- package/docs/functions/Util.bounding.html +0 -1
- package/docs/functions/Util.boundingBox.html +0 -1
- package/docs/functions/Util.boundingSphere.html +0 -1
- package/docs/functions/Util.boxVertex.html +0 -7
- package/docs/functions/Util.boxVertexes.html +0 -1
- package/docs/functions/Util.checkFiveModelLoaded.html +0 -2
- package/docs/functions/Util.cleanup.html +0 -3
- package/docs/functions/Util.convexHull.html +0 -2
- package/docs/functions/Util.equal.html +0 -5
- package/docs/functions/Util.fiveModelIsLoaded.html +0 -2
- package/docs/functions/Util.generatePolygonGeometry.html +0 -2
- package/docs/functions/Util.getCoordsFromClient.html +0 -1
- package/docs/functions/Util.getCoordsFromElement.html +0 -1
- package/docs/functions/Util.getFrameTime.html +0 -3
- package/docs/functions/Util.getGeometryArea.html +0 -1
- package/docs/functions/Util.getGeometryInfo.html +0 -1
- package/docs/functions/Util.getIntersectFromRelativePosition.html +0 -1
- package/docs/functions/Util.getRaycasterFromFivePointer.html +0 -1
- package/docs/functions/Util.initialCSS3DRender.html +0 -1
- package/docs/functions/Util.inside.html +0 -1
- package/docs/functions/Util.isModelLike.html +0 -1
- package/docs/functions/Util.isNil.html +0 -2
- package/docs/functions/Util.isPanoramaLike.html +0 -1
- package/docs/functions/Util.lookObject.html +0 -7
- package/docs/functions/Util.lookPoint.html +0 -5
- package/docs/functions/Util.nextFrame.html +0 -1
- package/docs/functions/Util.notNil.html +0 -2
- package/docs/functions/Util.reblink.html +0 -13
- package/docs/functions/Util.replaceStaticPrefix.html +0 -8
- package/docs/functions/Util.requestAnimationFrameInterval.html +0 -5
- package/docs/functions/Util.sculpt.createBox.html +0 -1
- package/docs/functions/Util.sculpt.createCircle.html +0 -1
- package/docs/functions/Util.sculpt.createCylinder.html +0 -1
- package/docs/functions/Util.sculpt.createLine.html +0 -2
- package/docs/functions/Util.sculpt.createPoint.html +0 -1
- package/docs/functions/Util.sculpt.createPolygon.html +0 -1
- package/docs/functions/Util.sculpt.createPrism.html +0 -1
- package/docs/functions/Util.sculpt.createRectangle.html +0 -2
- package/docs/functions/Util.sculpt.transformUnit.html +0 -1
- package/docs/functions/Util.sculpt.transformUnitSquare.html +0 -1
- package/docs/functions/Util.tag.html +0 -1
- package/docs/functions/Util.triangleArea.html +0 -2
- package/docs/functions/Util.triangleCenter.html +0 -2
- package/docs/functions/Util.tweenProgress.html +0 -1
- package/docs/functions/Util.uuid.html +0 -2
- package/docs/functions/Util.waitFiveModelLoaded.html +0 -2
- package/docs/functions/Util.worldBounding.html +0 -1
- package/docs/functions/Util.worldBoundingBox.html +0 -1
- package/docs/functions/Util.worldBoundingSphere.html +0 -1
- package/docs/functions/createPolyline.html +0 -2
- package/docs/functions/pluginFlag.html +0 -1
- package/docs/functions/validatePolygon.html +0 -1
- package/docs/hierarchy.html +0 -1
- package/docs/index.html +0 -70
- package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +0 -4
- package/docs/interfaces/AreaMakerPluginType.Config.html +0 -8
- package/docs/interfaces/AreaMakerPluginType.EventMap.html +0 -25
- package/docs/interfaces/AreaMakerPluginType.Params.html +0 -4
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +0 -20
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +0 -13
- package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +0 -9
- package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +0 -3
- package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +0 -3
- package/docs/interfaces/AreaMakerPluginType.State.html +0 -8
- package/docs/interfaces/BoxAnimationConfig.html +0 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +0 -9
- package/docs/interfaces/CSS3DRenderPluginState.html +0 -7
- package/docs/interfaces/CameraMovementPluginExportType.html +0 -11
- package/docs/interfaces/ContentTypeMapInterface.html +0 -73
- package/docs/interfaces/CruisePluginTypes.Config.html +0 -7
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +0 -8
- package/docs/interfaces/CruisePluginTypes.EventMap.html +0 -33
- package/docs/interfaces/CruisePluginTypes.GuildLineConfig.html +0 -6
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +0 -16
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +0 -19
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +0 -20
- package/docs/interfaces/CruisePluginTypes.PluginData.html +0 -8
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +0 -2
- package/docs/interfaces/CruisePluginTypes.PluginState.html +0 -15
- package/docs/interfaces/CurrentPanoImagePluginType.Config.html +0 -13
- package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +0 -15
- package/docs/interfaces/CurrentPanoImagePluginType.Params.html +0 -4
- package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +0 -3
- package/docs/interfaces/CurrentPanoImagePluginType.State.html +0 -7
- package/docs/interfaces/FloorplanBounding.html +0 -9
- package/docs/interfaces/FloorplanData.html +0 -7
- package/docs/interfaces/FloorplanEntrance.html +0 -14
- package/docs/interfaces/FloorplanExtraObject.html +0 -9
- package/docs/interfaces/FloorplanExtraObject3D.html +0 -5
- package/docs/interfaces/FloorplanFloorData.html +0 -9
- package/docs/interfaces/FloorplanImagePosition.html +0 -4
- package/docs/interfaces/FloorplanObserver.html +0 -8
- package/docs/interfaces/FloorplanOutlineItem.html +0 -6
- package/docs/interfaces/FloorplanPosition.html +0 -4
- package/docs/interfaces/FloorplanRoomItem.html +0 -24
- package/docs/interfaces/FloorplanRoomLabelItem.html +0 -6
- package/docs/interfaces/FloorplanServerBounding.html +0 -9
- package/docs/interfaces/FloorplanServerComputedData.html +0 -6
- package/docs/interfaces/FloorplanServerData.html +0 -4
- package/docs/interfaces/FloorplanServerDoorItem.html +0 -6
- package/docs/interfaces/FloorplanServerDoorPosition.html +0 -4
- package/docs/interfaces/FloorplanServerEntrance.html +0 -14
- package/docs/interfaces/FloorplanServerFloorData.html +0 -8
- package/docs/interfaces/FloorplanServerImagePosition.html +0 -4
- package/docs/interfaces/FloorplanServerObserver.html +0 -8
- package/docs/interfaces/FloorplanServerOutlineItem.html +0 -6
- package/docs/interfaces/FloorplanServerPosition.html +0 -4
- package/docs/interfaces/FloorplanServerRoomItem.html +0 -27
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +0 -6
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +0 -4
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +0 -7
- package/docs/interfaces/GuideLinePluginType.EventMap.html +0 -13
- package/docs/interfaces/GuideLinePluginType.ExtraRouteData.html +0 -5
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +0 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +0 -2
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +0 -32
- package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +0 -4
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +0 -5
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +0 -42
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +0 -3
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +0 -57
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +0 -1
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +0 -2
- package/docs/interfaces/GuideLinePluginType.PluginState.html +0 -7
- package/docs/interfaces/GuideLinePluginType.Route.html +0 -13
- package/docs/interfaces/HelperOffset.html +0 -4
- package/docs/interfaces/ImagePlaneGroup.html +0 -3
- package/docs/interfaces/ItemLabelPluginData.html +0 -2
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +0 -7
- package/docs/interfaces/ItemLabelPluginParametersType.html +0 -5
- package/docs/interfaces/MinMax.html +0 -3
- package/docs/interfaces/ModelChassisCompassPluginData.html +0 -3
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +0 -4
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +0 -3
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +0 -4
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +0 -4
- package/docs/interfaces/ModelItemLabelPluginData.html +0 -2
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +0 -7
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +0 -3
- package/docs/interfaces/ModelMakerPluginType.BoxItemObjectData.html +0 -17
- package/docs/interfaces/ModelMakerPluginType.EventMap.html +0 -18
- package/docs/interfaces/ModelMakerPluginType.PrismItemObjectData.html +0 -23
- package/docs/interfaces/ModelMakerPluginType.ServerBaseItem.html +0 -11
- package/docs/interfaces/ModelMakerPluginType.ServerBoxItem.html +0 -10
- package/docs/interfaces/ModelMakerPluginType.ServerData.html +0 -3
- package/docs/interfaces/ModelMakerPluginType.ServerPrismItem.html +0 -10
- package/docs/interfaces/ModelMakerPluginType.ServerTrianglesItem.html +0 -10
- package/docs/interfaces/ModelMakerPluginType.State.html +0 -8
- package/docs/interfaces/ModelMakerPluginType.TrianglesItemObjectData.html +0 -11
- package/docs/interfaces/ModelRoomLabelPluginData.html +0 -2
- package/docs/interfaces/ModelTVVideoPluginData.html +0 -5
- package/docs/interfaces/ModelTVVideoPluginExportType.html +0 -4
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +0 -2
- package/docs/interfaces/ModelViewPluginExportType.html +0 -8
- package/docs/interfaces/Object3DHelperState.html +0 -4
- package/docs/interfaces/ObjectHelperControllers.html +0 -5
- package/docs/interfaces/PaintBrushAction.html +0 -14
- package/docs/interfaces/PaintBrushConfigs.html +0 -8
- package/docs/interfaces/PaintBrushState.html +0 -6
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +0 -16
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +0 -1
- package/docs/interfaces/PanoMeasureParameterType.html +0 -20
- package/docs/interfaces/PanoMeasurePluginLineJson.html +0 -4
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +0 -4
- package/docs/interfaces/PanoMeasurePluginPointJson.html +0 -3
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +0 -7
- package/docs/interfaces/PanoRulerPluginExportType.html +0 -6
- package/docs/interfaces/PanoRulerPluginOptions.html +0 -3
- package/docs/interfaces/PanoRulerPluginParameterType.html +0 -4
- package/docs/interfaces/PanoRulerProPluginExportType.html +0 -5
- package/docs/interfaces/PanoRulerProPluginOptions.html +0 -3
- package/docs/interfaces/PanoRulerProPluginParameterType.html +0 -3
- package/docs/interfaces/PanoRulerProPluginState.html +0 -4
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +0 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +0 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +0 -7
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +0 -6
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +0 -9
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +0 -6
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +0 -9
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +0 -7
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +0 -6
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +0 -3
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +0 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +0 -2
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +0 -15
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +0 -2
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +0 -14
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +0 -13
- package/docs/interfaces/PluginEventMap.html +0 -16
- package/docs/interfaces/Point.html +0 -4
- package/docs/interfaces/Room.html +0 -5
- package/docs/interfaces/RoomInfo.html +0 -3
- package/docs/interfaces/RoomLabel.html +0 -16
- package/docs/interfaces/RoomRules.html +0 -1
- package/docs/interfaces/Rooms.html +0 -1
- package/docs/interfaces/Scissor.html +0 -13
- package/docs/interfaces/SculptConfig.html +0 -19
- package/docs/interfaces/State.html +0 -7
- package/docs/interfaces/TagCacheInterface.html +0 -9
- package/docs/interfaces/TagConfig.html +0 -174
- package/docs/interfaces/TagGLTFObjectGroup.html +0 -3
- package/docs/interfaces/TagIconAnimationConfig.html +0 -7
- package/docs/interfaces/TagIconUrl.html +0 -22
- package/docs/interfaces/TagObjectGroup.html +0 -3
- package/docs/interfaces/TagState.html +0 -3
- package/docs/interfaces/TagStyle.html +0 -5
- package/docs/interfaces/Tags.html +0 -8
- package/docs/interfaces/TemporaryState.html +0 -2
- package/docs/interfaces/Util.AnimeInstance.html +0 -14
- package/docs/interfaces/Util.BlinkAnimeOptions.html +0 -21
- package/docs/interfaces/Util.EventHandlerConfig.html +0 -21
- package/docs/interfaces/Util.FiveDomEvent.html +0 -7
- package/docs/interfaces/Util.FiveDomEventMap.html +0 -20
- package/docs/interfaces/Util.LegacyMouseGroupParameter.html +0 -4
- package/docs/interfaces/Util.MagnifierParameter.html +0 -13
- package/docs/interfaces/Util.MouseGroupParameter.html +0 -4
- package/docs/interfaces/Util.ObjectInitialState.html +0 -9
- package/docs/interfaces/Util.PointIntersection.html +0 -21
- package/docs/interfaces/Util.PointSelectorHelperConfig.html +0 -6
- package/docs/interfaces/Util.ReBlinkAnimeOptions.html +0 -27
- package/docs/modules/AreaMakerPluginType.html +0 -17
- package/docs/modules/CruisePluginTypes.html +0 -14
- package/docs/modules/CurrentPanoImagePluginType.html +0 -6
- package/docs/modules/GuideLineItem.html +0 -2
- package/docs/modules/GuideLineModeItem.html +0 -3
- package/docs/modules/GuideLinePluginType.html +0 -25
- package/docs/modules/ModelMakerPluginType.html +0 -19
- package/docs/modules/PanoVideoPluginType.html +0 -8
- package/docs/modules/SculptData.html +0 -9
- package/docs/modules/SculptType.html +0 -2
- package/docs/modules/Util.html +0 -91
- package/docs/modules/Util.sculpt.html +0 -27
- package/docs/modules.html +0 -281
- package/docs/types/AddObject3DHelperConfig.html +0 -19
- package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +0 -7
- package/docs/types/AreaMakerPluginType.ItemRenderer.html +0 -1
- package/docs/types/AreaMakerPluginType.PluginData.html +0 -2
- package/docs/types/AreaMakerPluginType.ServerData.html +0 -2
- package/docs/types/ArrayPosition.html +0 -1
- package/docs/types/AudioAppearance.html +0 -1
- package/docs/types/CSS3DRenderExportType.html +0 -1
- package/docs/types/CSS3DRenderPluginExportType.html +0 -1
- package/docs/types/CSS3DRenderPluginParameterType.html +0 -1
- package/docs/types/ClassFunctionParameters.html +0 -1
- package/docs/types/Color.html +0 -1
- package/docs/types/ContentTypeConfigKey.html +0 -1
- package/docs/types/ContentTypeConfigKeySplit.html +0 -1
- package/docs/types/ContentTypeMap.html +0 -1
- package/docs/types/Create3DDomContainerReturnType.html +0 -1
- package/docs/types/Create3DElementReturnType.html +0 -1
- package/docs/types/CruisePluginExportType.html +0 -1
- package/docs/types/CruisePluginTypes.CruiseData.html +0 -6
- package/docs/types/CruisePluginTypes.MoveEffect.html +0 -1
- package/docs/types/CurrentPanoImagePluginExportType.html +0 -1
- package/docs/types/DeprecatedMediaPlaneProperty.html +0 -3
- package/docs/types/DeprecatedTagProperty.html +0 -3
- package/docs/types/Direction-1.html +0 -1
- package/docs/types/Direction4.html +0 -1
- package/docs/types/ElementRenderer.html +0 -2
- package/docs/types/FloorplanGuidePluginParameterType.html +0 -1
- package/docs/types/FloorplanGuidePluginReturnType.html +0 -1
- package/docs/types/FloorplanRuleLabels.html +0 -2
- package/docs/types/FloorplanServerRuleLabels.html +0 -1
- package/docs/types/GuideLinePluginExportType.html +0 -1
- package/docs/types/GuideLinePluginType.GuideLineItem.html +0 -2
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +0 -1
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +0 -1
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +0 -2
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +0 -2
- package/docs/types/GuideLinePluginType.PathItem.html +0 -2
- package/docs/types/GuideLinePluginType.PluginData.html +0 -2
- package/docs/types/GuideLinePluginType.RouteConfig.html +0 -4
- package/docs/types/HelperEventMap.html +0 -1
- package/docs/types/InternalHelperEventMap.html +0 -1
- package/docs/types/MapviewFloorplanPluginParameterType.html +0 -1
- package/docs/types/MapviewFloorplanPluginReturnType.html +0 -1
- package/docs/types/MeasureEndReason.html +0 -1
- package/docs/types/MeasurePluginConfig.html +0 -5
- package/docs/types/MeasurePluginEventMap.html +0 -1
- package/docs/types/MediaData.html +0 -2
- package/docs/types/MediaStore.html +0 -1
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +0 -1
- package/docs/types/ModelFloorplanPluginParameterType.html +0 -1
- package/docs/types/ModelFloorplanPluginReturnType.html +0 -1
- package/docs/types/ModelId.html +0 -1
- package/docs/types/ModelMakerPluginType.ElementRenderer.html +0 -1
- package/docs/types/ModelMakerPluginType.ItemType.html +0 -2
- package/docs/types/ModelMakerPluginType.MarkerItem.html +0 -1
- package/docs/types/ModelMakerPluginType.ServerItem.html +0 -2
- package/docs/types/ModelRoomLabelPluginParameters.html +0 -1
- package/docs/types/ModelRoomLabelPluginReturnType.html +0 -1
- package/docs/types/MoveArgs.html +0 -2
- package/docs/types/MoveOpts.html +0 -2
- package/docs/types/Object3DHelperEventMap.html +0 -1
- package/docs/types/ObjectFit.html +0 -1
- package/docs/types/PaintBrushEventMap.html +0 -1
- package/docs/types/PanoCompassPluginData.html +0 -1
- package/docs/types/PanoCompassPluginExportType.html +0 -1
- package/docs/types/PanoCompassPluginParameterType.html +0 -1
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +0 -1
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +0 -1
- package/docs/types/PanoIndex.html +0 -1
- package/docs/types/PanoMeasurePluginEvent.html +0 -1
- package/docs/types/PanoMeasureReturnType.html +0 -1
- package/docs/types/PanoSpatialTagPluginId.html +0 -1
- package/docs/types/PanoTagPluginExportInterface.html +0 -1
- package/docs/types/PanoTagPluginParamsInterface.html +0 -1
- package/docs/types/PanoVideoPluginParameterType.html +0 -1
- package/docs/types/PanoVideoPluginReturnType.html +0 -1
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +0 -2
- package/docs/types/PipelinePluginParameterType.html +0 -1
- package/docs/types/PipelinePluginReturnType.html +0 -1
- package/docs/types/PlaneTag.html +0 -2
- package/docs/types/Point2DTag.html +0 -2
- package/docs/types/Point3DTag.html +0 -2
- package/docs/types/PointTagInstance.html +0 -1
- package/docs/types/Position.html +0 -1
- package/docs/types/PositionFrom.html +0 -1
- package/docs/types/RotateArgs.html +0 -2
- package/docs/types/RotateOpts.html +0 -2
- package/docs/types/RuleLabelsKey.html +0 -1
- package/docs/types/RuleLabelsValue.html +0 -1
- package/docs/types/ScaleCallback.html +0 -1
- package/docs/types/ScalePosition.html +0 -3
- package/docs/types/SculptData.BoxData.html +0 -1
- package/docs/types/SculptData.CircleData.html +0 -1
- package/docs/types/SculptData.CylinderData.html +0 -1
- package/docs/types/SculptData.PointData.html +0 -1
- package/docs/types/SculptData.PolygonData.html +0 -1
- package/docs/types/SculptData.PolylineData.html +0 -1
- package/docs/types/SculptData.PrismData.html +0 -1
- package/docs/types/SculptData.RectangleData.html +0 -1
- package/docs/types/SculptType.Theme.html +0 -10
- package/docs/types/StickType.html +0 -1
- package/docs/types/Tag.html +0 -17
- package/docs/types/Tag2D.html +0 -2
- package/docs/types/Tag3D.html +0 -2
- package/docs/types/TagClickParams.html +0 -1
- package/docs/types/TagConfigByKey.html +0 -1
- package/docs/types/TagContentType.html +0 -1
- package/docs/types/TagContentTypeMapping.html +0 -1
- package/docs/types/TagDimensionType.html +0 -1
- package/docs/types/TagElement.html +0 -2
- package/docs/types/TagEvents.html +0 -1
- package/docs/types/TagGLTFObject.html +0 -1
- package/docs/types/TagHooks.html +0 -1
- package/docs/types/TagId.html +0 -1
- package/docs/types/TagInstance.html +0 -1
- package/docs/types/TagPlacement.html +0 -5
- package/docs/types/TagPointType.html +0 -2
- package/docs/types/TagRendererMap.html +0 -1
- package/docs/types/TopviewFloorplanPluginParameterType.html +0 -1
- package/docs/types/TopviewFloorplanPluginReturnType.html +0 -1
- package/docs/types/Util.ActionIfNoIntersection.html +0 -1
- package/docs/types/Util.AdherePoint.html +0 -2
- package/docs/types/Util.PointSelectorConfig.html +0 -1
- package/docs/types/Util.SupportedTarget.html +0 -2
- package/docs/types/Util.Target.html +0 -2
- package/docs/types/Util.ThreeObject.html +0 -2
- package/docs/types/WorkCode.html +0 -1
- package/docs/variables/FLOOR_TYPE_MAP.html +0 -2
- package/docs/variables/PLUGIN.html +0 -1
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +0 -2
- package/docs/variables/ROOM_TYPE_MAP.html +0 -2
- package/docs/variables/Util.ANIME_PRESETS.html +0 -2
- package/docs/variables/Util.CURRENT_PANO_IMAGE_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.DEFAULT_ANIME_CONFIG.html +0 -2
- package/docs/variables/Util.DEFAULT_STATIC_PREFIX.html +0 -2
- package/docs/variables/Util.DNALOGEL_DEFAULT_ASSETS.html +0 -2
- package/docs/variables/Util.ENTRY_DOOR_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.FLOORPLAN_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.GUIDELINE_DEFAULT_ARROW_TEXTURE.html +0 -2
- package/docs/variables/Util.GUIDELINE_WHITE_ARROW_TEXTURE.html +0 -2
- package/docs/variables/Util.MODEL_CHASSIS_COMPASS_DEFAULT_MODEL.html +0 -2
- package/docs/variables/Util.MODEL_ENTRY_DOOR_GUIDE_PLUGIN_DEFAULT_MODEL.html +0 -2
- package/docs/variables/Util.PANO_COMPASS_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.PANO_SPATIAL_TAG_BLUR_IMAGE.html +0 -2
- package/docs/variables/Util.PANO_TAG_DEFAULT_LINK_ICON.html +0 -2
- package/docs/variables/defaultGlobalConfig.html +0 -1
- package/docs/variables/itemLabelPluginServerParams.html +0 -1
- package/docs/variables/modelItemLabelPluginServerParams.html +0 -1
- package/docs/variables/modelRoomLabelPluginServerParams.html +0 -1
|
@@ -2,35 +2,35 @@ var D = Object.defineProperty, k = Object.defineProperties;
|
|
|
2
2
|
var H = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var S = Object.getOwnPropertySymbols;
|
|
4
4
|
var I = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var v = (
|
|
5
|
+
var v = (d, t, e) => t in d ? D(d, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[t] = e, E = (d, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
I.call(t, e) && v(
|
|
7
|
+
I.call(t, e) && v(d, e, t[e]);
|
|
8
8
|
if (S)
|
|
9
9
|
for (var e of S(t))
|
|
10
|
-
U.call(t, e) && v(
|
|
11
|
-
return
|
|
12
|
-
}, x = (
|
|
13
|
-
var P = (
|
|
14
|
-
var
|
|
15
|
-
var o = (
|
|
10
|
+
U.call(t, e) && v(d, e, t[e]);
|
|
11
|
+
return d;
|
|
12
|
+
}, x = (d, t) => k(d, H(t));
|
|
13
|
+
var P = (d, t, e) => (v(d, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var m = (d, t, e) => new Promise((i, s) => {
|
|
15
|
+
var o = (a) => {
|
|
16
16
|
try {
|
|
17
|
-
n(e.next(
|
|
17
|
+
n(e.next(a));
|
|
18
18
|
} catch (l) {
|
|
19
19
|
s(l);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, r = (a) => {
|
|
22
22
|
try {
|
|
23
|
-
n(e.throw(
|
|
23
|
+
n(e.throw(a));
|
|
24
24
|
} catch (l) {
|
|
25
25
|
s(l);
|
|
26
26
|
}
|
|
27
|
-
}, n = (
|
|
28
|
-
n((e = e.apply(
|
|
27
|
+
}, n = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(o, r);
|
|
28
|
+
n((e = e.apply(d, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { DigitalPlayground as R } from "../core/DigitalPlayground.js";
|
|
31
|
-
import { Vector3 as
|
|
31
|
+
import { Vector3 as w } from "three";
|
|
32
32
|
import { convertMockToPlayer as z } from "../mock.js";
|
|
33
|
-
import { transformPosition as
|
|
33
|
+
import { transformPosition as N } from "../../shared-utils/five/transformPosition.js";
|
|
34
34
|
import "@realsee/five/gltf-loader";
|
|
35
35
|
import "../core/DigitalHuman.js";
|
|
36
36
|
import "../core/DigitalStateMachine.js";
|
|
@@ -67,13 +67,11 @@ class Q {
|
|
|
67
67
|
playMode: "single"
|
|
68
68
|
}, this.NAME = G, this.config.debug, this.init();
|
|
69
69
|
}
|
|
70
|
-
init() {
|
|
71
|
-
}
|
|
72
70
|
/**
|
|
73
71
|
* 加载剧本数据
|
|
74
72
|
*/
|
|
75
73
|
loadScript(t) {
|
|
76
|
-
return
|
|
74
|
+
return m(this, null, function* () {
|
|
77
75
|
try {
|
|
78
76
|
if (this.state.currentScript = t, this.playground.setScript(t), this.clearProgressCache(), this.config.debug, yield this.preloadResources(t), this.five && this.five.scene) {
|
|
79
77
|
yield new Promise((i) => requestAnimationFrame(i));
|
|
@@ -94,23 +92,29 @@ class Q {
|
|
|
94
92
|
}
|
|
95
93
|
});
|
|
96
94
|
}
|
|
95
|
+
init() {
|
|
96
|
+
}
|
|
97
97
|
/**
|
|
98
98
|
* 预加载资源
|
|
99
99
|
*/
|
|
100
100
|
preloadResources(t) {
|
|
101
|
-
return
|
|
102
|
-
const e = [], i = [], s = /* @__PURE__ */ new Set();
|
|
103
|
-
t.chapters.forEach((
|
|
104
|
-
|
|
101
|
+
return m(this, null, function* () {
|
|
102
|
+
const e = [], i = [], s = /* @__PURE__ */ new Set(), o = [], r = /* @__PURE__ */ new Map();
|
|
103
|
+
t.chapters.forEach((n) => {
|
|
104
|
+
n.players.forEach((a) => {
|
|
105
105
|
if (a.type === "model") {
|
|
106
|
-
const
|
|
107
|
-
e.push(
|
|
108
|
-
|
|
106
|
+
const l = a;
|
|
107
|
+
e.push(l.model), i.push(a.id), l.keyframes.forEach((u) => {
|
|
108
|
+
u.animation && (s.add(u.animation.url), u.animation.item && (o.push(u.animation.item.url), r.set(u.animation.item.url, {
|
|
109
|
+
position: u.animation.item.position,
|
|
110
|
+
rotation: u.animation.item.rotation
|
|
111
|
+
})));
|
|
109
112
|
});
|
|
110
113
|
}
|
|
111
114
|
});
|
|
112
115
|
}), yield Promise.all([
|
|
113
116
|
this.playground.loadModels(e, i),
|
|
117
|
+
this.playground.loadItems(o, r),
|
|
114
118
|
this.playground.loadAnimations(Array.from(s))
|
|
115
119
|
]), this.config.debug;
|
|
116
120
|
});
|
|
@@ -119,7 +123,7 @@ class Q {
|
|
|
119
123
|
* 播放指定章节
|
|
120
124
|
*/
|
|
121
125
|
playChapter(t) {
|
|
122
|
-
return
|
|
126
|
+
return m(this, null, function* () {
|
|
123
127
|
this.emitPlayingPlayersChanged();
|
|
124
128
|
try {
|
|
125
129
|
this.state.currentChapter = t, this.state.playing = !0, this.state.playMode = "single", this.config.debug, yield this.playground.playByChapter(t), this.state.playing = !1, this.config.debug;
|
|
@@ -132,7 +136,7 @@ class Q {
|
|
|
132
136
|
* 播放指定章节(内部方法,用于连续播放)
|
|
133
137
|
*/
|
|
134
138
|
playChapterForContinuous(t) {
|
|
135
|
-
return
|
|
139
|
+
return m(this, null, function* () {
|
|
136
140
|
this.emitPlayingPlayersChanged();
|
|
137
141
|
try {
|
|
138
142
|
this.state.currentChapter = t, this.state.playing = !0, this.config.debug, yield this.playground.playByChapter(t), this.state.continuousPlaying && (this.state.playing = !0), yield new Promise((e) => setTimeout(e, 100)), this.config.debug;
|
|
@@ -145,7 +149,7 @@ class Q {
|
|
|
145
149
|
* 播放指定章节(通过索引)
|
|
146
150
|
*/
|
|
147
151
|
playChapterByIndex(t) {
|
|
148
|
-
return
|
|
152
|
+
return m(this, null, function* () {
|
|
149
153
|
if (!this.state.currentScript)
|
|
150
154
|
throw new Error("No script loaded");
|
|
151
155
|
if (t < 0 || t >= this.state.currentScript.chapters.length)
|
|
@@ -163,7 +167,7 @@ class Q {
|
|
|
163
167
|
* 继续播放
|
|
164
168
|
*/
|
|
165
169
|
continue() {
|
|
166
|
-
return
|
|
170
|
+
return m(this, null, function* () {
|
|
167
171
|
this._autoPlayOnNaturalEnd = !0;
|
|
168
172
|
try {
|
|
169
173
|
this.config.debug && console.log(`${this.NAME} continuing in ${this.state.playMode} mode`), this.state.playMode === "continuous" ? yield this.continueAllRemaining() : (this.state.currentChapter && this.state.currentChapter.players.forEach((t) => {
|
|
@@ -181,7 +185,7 @@ class Q {
|
|
|
181
185
|
* 连续播放模式下的继续播放(从暂停位置继续播放所有剩余章节)
|
|
182
186
|
*/
|
|
183
187
|
continueAllRemaining() {
|
|
184
|
-
return
|
|
188
|
+
return m(this, null, function* () {
|
|
185
189
|
if (!this.state.currentScript || !this.state.currentChapter)
|
|
186
190
|
throw new Error("No script or chapter loaded");
|
|
187
191
|
const t = this.state.currentScript.chapters, e = t.findIndex((i) => i.name === this.state.currentChapter.name);
|
|
@@ -199,75 +203,70 @@ class Q {
|
|
|
199
203
|
isCompleted: o,
|
|
200
204
|
isNearHardcodedPause: s
|
|
201
205
|
}), o ? (console.log(`${this.NAME} [continueAllRemaining] chapter already completed, restarting`), yield this.playChapterForContinuous(this.state.currentChapter), i = this.getProgress(), console.log(`${this.NAME} [continueAllRemaining] progress after restart:`, i)) : s ? (console.log(`${this.NAME} [continueAllRemaining] detected hardcoded pause, skipping to 27500ms`), this.state.currentChapter.players.filter((n) => n.type === "model").forEach((n) => {
|
|
202
|
-
const
|
|
203
|
-
|
|
206
|
+
const a = this.playground.getDigitalHuman(n.model, n.id);
|
|
207
|
+
a && (a.state.currentTime = 27500);
|
|
204
208
|
}), this.state.currentChapter.players.forEach((n) => {
|
|
205
209
|
if (n.type === "model") {
|
|
206
|
-
const
|
|
207
|
-
|
|
210
|
+
const a = this.playground.getDigitalHuman(n.model, n.id);
|
|
211
|
+
a && a.continueAnimation();
|
|
208
212
|
}
|
|
209
|
-
}), this.state.playing = !0, console.log(`${this.NAME} [continueAllRemaining] after hardcoded pause skip - playing:`, this.state.playing)) : (console.log(`${this.NAME} [continueAllRemaining] continuing from paused position`), this.state.currentChapter.players.forEach((
|
|
210
|
-
if (
|
|
211
|
-
const n = this.playground.getDigitalHuman(
|
|
213
|
+
}), this.state.playing = !0, console.log(`${this.NAME} [continueAllRemaining] after hardcoded pause skip - playing:`, this.state.playing)) : (console.log(`${this.NAME} [continueAllRemaining] continuing from paused position`), this.state.currentChapter.players.forEach((r) => {
|
|
214
|
+
if (r.type === "model") {
|
|
215
|
+
const n = this.playground.getDigitalHuman(r.model, r.id);
|
|
212
216
|
n && n.continueAnimation();
|
|
213
217
|
}
|
|
214
|
-
}), this.state.playing = !0, console.log(`${this.NAME} [continueAllRemaining] after continue - playing:`, this.state.playing)), i = this.getProgress(), console.log(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
let n = (i == null ? void 0 : i.currentTime) || 0, r = 0;
|
|
221
|
-
const l = 15, m = () => {
|
|
222
|
-
var g;
|
|
223
|
-
if (!((g = this.state) != null && g.continuousPlaying)) {
|
|
224
|
-
console.log(`${this.NAME} [continueAllRemaining] stopped by user`), a();
|
|
218
|
+
}), this.state.playing = !0, console.log(`${this.NAME} [continueAllRemaining] after continue - playing:`, this.state.playing)), i = this.getProgress(), console.log(`${this.NAME} [continueAllRemaining] updated progress before wait:`, i, "playing:", this.state.playing), i && i.currentTime < i.totalTime ? yield new Promise((r) => {
|
|
219
|
+
let n = (i == null ? void 0 : i.currentTime) || 0, a = 0;
|
|
220
|
+
const l = 15, u = () => {
|
|
221
|
+
var p;
|
|
222
|
+
if (!((p = this.state) != null && p.continuousPlaying)) {
|
|
223
|
+
console.log(`${this.NAME} [continueAllRemaining] stopped by user`), r();
|
|
225
224
|
return;
|
|
226
225
|
}
|
|
227
226
|
const h = this.getProgress();
|
|
228
227
|
if (this.config.debug, h && h.currentTime >= h.totalTime) {
|
|
229
|
-
|
|
228
|
+
r();
|
|
230
229
|
return;
|
|
231
230
|
}
|
|
232
231
|
if (h && h.currentTime < 0) {
|
|
233
|
-
console.warn(`${this.NAME} [continueAllRemaining] detected negative time, skipping wait`),
|
|
232
|
+
console.warn(`${this.NAME} [continueAllRemaining] detected negative time, skipping wait`), r();
|
|
234
233
|
return;
|
|
235
234
|
}
|
|
236
235
|
if (h && h.currentTime === n) {
|
|
237
|
-
if (
|
|
238
|
-
console.warn(`${this.NAME} [continueAllRemaining] progress stagnant for 3s, assuming chapter completed`),
|
|
236
|
+
if (a++, a >= l) {
|
|
237
|
+
console.warn(`${this.NAME} [continueAllRemaining] progress stagnant for 3s, assuming chapter completed`), r();
|
|
239
238
|
return;
|
|
240
239
|
}
|
|
241
240
|
} else
|
|
242
|
-
|
|
243
|
-
setTimeout(
|
|
241
|
+
a = 0, n = (h == null ? void 0 : h.currentTime) || 0;
|
|
242
|
+
setTimeout(u, 200);
|
|
244
243
|
};
|
|
245
|
-
|
|
244
|
+
u();
|
|
246
245
|
}) : console.log(`${this.NAME} [continueAllRemaining] chapter already completed or restarted, skipping wait`), console.log(
|
|
247
246
|
`${this.NAME} [continueAllRemaining] starting to play remaining chapters from index ${e + 1} to ${t.length - 1}`
|
|
248
247
|
), this.emitPlayingPlayersChanged();
|
|
249
|
-
for (let
|
|
248
|
+
for (let r = e + 1; r < t.length; r++) {
|
|
250
249
|
if (!this.state.continuousPlaying) {
|
|
251
|
-
this.config.debug && console.log(`${this.NAME} continuous playback stopped by user at chapter ${
|
|
250
|
+
this.config.debug && console.log(`${this.NAME} continuous playback stopped by user at chapter ${r + 1}`);
|
|
252
251
|
break;
|
|
253
252
|
}
|
|
254
|
-
const n = t[
|
|
253
|
+
const n = t[r];
|
|
255
254
|
this.config.debug;
|
|
256
255
|
try {
|
|
257
256
|
n.players.filter((h) => h.type === "model").forEach((h) => {
|
|
258
|
-
const
|
|
259
|
-
|
|
257
|
+
const p = this.playground.getDigitalHuman(h.model, h.id);
|
|
258
|
+
p && (p.state.currentTime = 0);
|
|
260
259
|
});
|
|
261
260
|
const l = Date.now();
|
|
262
261
|
yield this.playChapterForContinuous(n);
|
|
263
|
-
const
|
|
262
|
+
const u = Date.now() - l;
|
|
264
263
|
if (this.config.debug, !this.state.continuousPlaying) {
|
|
265
|
-
this.config.debug && console.log(`${this.NAME} continuous playback stopped after chapter ${
|
|
264
|
+
this.config.debug && console.log(`${this.NAME} continuous playback stopped after chapter ${r + 1}`);
|
|
266
265
|
break;
|
|
267
266
|
}
|
|
268
|
-
|
|
269
|
-
} catch (
|
|
270
|
-
console.error(`${this.NAME} failed to play chapter ${n.name}:`,
|
|
267
|
+
r < t.length - 1 && (yield new Promise((h) => setTimeout(h, 1e3)));
|
|
268
|
+
} catch (a) {
|
|
269
|
+
console.error(`${this.NAME} failed to play chapter ${n.name}:`, a), this.state.continuousPlaying = !1;
|
|
271
270
|
break;
|
|
272
271
|
}
|
|
273
272
|
}
|
|
@@ -283,7 +282,7 @@ class Q {
|
|
|
283
282
|
* 从当前章节播放到最后一个章节(连续自动播放)
|
|
284
283
|
*/
|
|
285
284
|
playAllRemaining() {
|
|
286
|
-
return
|
|
285
|
+
return m(this, null, function* () {
|
|
287
286
|
if (this._autoPlayOnNaturalEnd = !0, !this.state.currentScript)
|
|
288
287
|
throw new Error("No script loaded");
|
|
289
288
|
const t = this.state.currentScript.chapters;
|
|
@@ -295,15 +294,15 @@ class Q {
|
|
|
295
294
|
this.config.debug;
|
|
296
295
|
const i = !this.state.playing && this.state.currentChapter !== null, s = this.getProgress();
|
|
297
296
|
if (i) {
|
|
298
|
-
const o = s && s.currentTime >= 26e3 && s.currentTime <= 27e3,
|
|
297
|
+
const o = s && s.currentTime >= 26e3 && s.currentTime <= 27e3, r = s && s.totalTime > 0 && s.currentTime >= s.totalTime;
|
|
299
298
|
if (console.log(`${this.NAME} [playAllRemaining] pause analysis:`, {
|
|
300
299
|
hasProgress: !!s,
|
|
301
300
|
currentTime: s == null ? void 0 : s.currentTime,
|
|
302
301
|
totalTime: s == null ? void 0 : s.totalTime,
|
|
303
|
-
isCompleted:
|
|
302
|
+
isCompleted: r,
|
|
304
303
|
isNearHardcodedPause: o,
|
|
305
|
-
shouldContinueFromPause: !
|
|
306
|
-
}), this.emitPlayingPlayersChanged(), !
|
|
304
|
+
shouldContinueFromPause: !r || o
|
|
305
|
+
}), this.emitPlayingPlayersChanged(), !r || o) {
|
|
307
306
|
this.config.debug, yield this.continue();
|
|
308
307
|
return;
|
|
309
308
|
} else if (this.config.debug, e += 1, e >= t.length) {
|
|
@@ -316,35 +315,35 @@ class Q {
|
|
|
316
315
|
this.config.debug && console.log(`${this.NAME} continuous playback stopped by user at chapter ${o + 1}`), this.emitPlayingPlayersChanged();
|
|
317
316
|
break;
|
|
318
317
|
}
|
|
319
|
-
const
|
|
318
|
+
const r = t[o];
|
|
320
319
|
this.config.debug;
|
|
321
320
|
try {
|
|
322
|
-
const n = this.state.currentChapter && this.state.currentChapter.name ===
|
|
323
|
-
if (!n ||
|
|
324
|
-
const h =
|
|
325
|
-
if (
|
|
326
|
-
const
|
|
327
|
-
|
|
321
|
+
const n = this.state.currentChapter && this.state.currentChapter.name === r.name, a = i && n && o === e;
|
|
322
|
+
if (!n || a) {
|
|
323
|
+
const h = r.players.filter((p) => p.type === "model");
|
|
324
|
+
if (a) {
|
|
325
|
+
const p = this.getProgress();
|
|
326
|
+
p && p.currentTime >= 26e3 && p.currentTime <= 27e3 ? (h.forEach((b) => {
|
|
328
327
|
const M = this.playground.getDigitalHuman(b.model);
|
|
329
328
|
M && (M.state.currentTime = 27500);
|
|
330
|
-
}), this.config.debug && console.log(`${this.NAME} skipped hardcoded pause for chapter: ${
|
|
329
|
+
}), this.config.debug && console.log(`${this.NAME} skipped hardcoded pause for chapter: ${r.name}`)) : this.config.debug && console.log(`${this.NAME} continuing current chapter from existing position: ${r.name}`);
|
|
331
330
|
} else
|
|
332
|
-
h.forEach((
|
|
333
|
-
const T = this.playground.getDigitalHuman(
|
|
331
|
+
h.forEach((p) => {
|
|
332
|
+
const T = this.playground.getDigitalHuman(p.model, p.id);
|
|
334
333
|
T && (T.state.currentTime = 0);
|
|
335
|
-
}), this.config.debug && console.log(`${this.NAME} reset time for new chapter: ${
|
|
334
|
+
}), this.config.debug && console.log(`${this.NAME} reset time for new chapter: ${r.name}`);
|
|
336
335
|
} else
|
|
337
336
|
this.config.debug;
|
|
338
337
|
const l = Date.now();
|
|
339
|
-
yield this.playChapterForContinuous(
|
|
340
|
-
const
|
|
338
|
+
yield this.playChapterForContinuous(r);
|
|
339
|
+
const u = Date.now() - l;
|
|
341
340
|
if (this.config.debug, this.state.continuousPlaying && !this.state.playing && (console.warn(`${this.NAME} [playAllRemaining] chapter completed but playing state is false, fixing...`), this.state.playing = !0), !this.state.continuousPlaying) {
|
|
342
341
|
this.config.debug && console.log(`${this.NAME} continuous playback stopped after chapter ${o + 1}`), this.emitPlayingPlayersChanged();
|
|
343
342
|
break;
|
|
344
343
|
}
|
|
345
344
|
o < t.length - 1, o < t.length - 1 && (yield new Promise((h) => setTimeout(h, 1e3)));
|
|
346
345
|
} catch (n) {
|
|
347
|
-
console.error(`${this.NAME} failed to play chapter ${
|
|
346
|
+
console.error(`${this.NAME} failed to play chapter ${r.name}:`, n), this.emitPlayingPlayersChanged(), this.state.continuousPlaying = !1;
|
|
348
347
|
break;
|
|
349
348
|
}
|
|
350
349
|
}
|
|
@@ -424,8 +423,8 @@ class Q {
|
|
|
424
423
|
if (i.type === "model") {
|
|
425
424
|
const s = i, o = s.keyframes[s.keyframes.length - 1];
|
|
426
425
|
o && (t = Math.max(t, o.timeStamp));
|
|
427
|
-
const
|
|
428
|
-
|
|
426
|
+
const r = this.playground.getDigitalHuman(s.model, s.id);
|
|
427
|
+
r && (e = Math.max(e, r.state.currentTime || 0));
|
|
429
428
|
}
|
|
430
429
|
}), { currentTime: e, totalTime: t };
|
|
431
430
|
}
|
|
@@ -436,57 +435,57 @@ class Q {
|
|
|
436
435
|
* @param totalDelay 可选,默认0
|
|
437
436
|
*/
|
|
438
437
|
transformScriptData(t, e, i = 0) {
|
|
439
|
-
var n,
|
|
438
|
+
var n, a;
|
|
440
439
|
if (!t || !t.players || !Array.isArray(t.players))
|
|
441
440
|
return t;
|
|
442
441
|
const s = (n = t.players[0]) != null && n.fiveState ? E({}, t.players[0].fiveState) : void 0;
|
|
443
442
|
if (s && s.offset && e) {
|
|
444
|
-
const l = new
|
|
445
|
-
s.offset = { x:
|
|
443
|
+
const l = new w(s.offset.x, s.offset.y, s.offset.z), u = N(l, e == null ? void 0 : e.transform);
|
|
444
|
+
s.offset = { x: u.x, y: u.y, z: u.z };
|
|
446
445
|
}
|
|
447
446
|
const o = [
|
|
448
447
|
{
|
|
449
448
|
id: 0,
|
|
450
|
-
name: ((
|
|
449
|
+
name: ((a = t.players[0]) == null ? void 0 : a.chapterName) || "Chapter 1",
|
|
451
450
|
players: []
|
|
452
451
|
}
|
|
453
452
|
];
|
|
454
|
-
let
|
|
455
|
-
return t.players.forEach((l,
|
|
453
|
+
let r = 0;
|
|
454
|
+
return t.players.forEach((l, u) => {
|
|
456
455
|
var T, b, M;
|
|
457
456
|
let h = E({}, l);
|
|
458
457
|
if (e && ((T = h.track) != null && T.path && Array.isArray(h.track.path) && (h.track.path = h.track.path.map((y) => {
|
|
459
|
-
const
|
|
458
|
+
const f = N(new w(y.x, y.y, y.z), e == null ? void 0 : e.transform);
|
|
460
459
|
return {
|
|
461
|
-
x:
|
|
462
|
-
y:
|
|
463
|
-
z:
|
|
460
|
+
x: f.x,
|
|
461
|
+
y: f.y,
|
|
462
|
+
z: f.z
|
|
464
463
|
};
|
|
465
464
|
})), (b = h.track) != null && b.points && Array.isArray(h.track.points) && (h.track.points = h.track.points.map((y) => {
|
|
466
465
|
if (y.point) {
|
|
467
|
-
const
|
|
468
|
-
new
|
|
466
|
+
const f = N(
|
|
467
|
+
new w(y.point.x, y.point.y, y.point.z),
|
|
469
468
|
e == null ? void 0 : e.transform
|
|
470
469
|
);
|
|
471
470
|
return x(E({}, y), {
|
|
472
471
|
point: {
|
|
473
|
-
x:
|
|
474
|
-
y:
|
|
475
|
-
z:
|
|
472
|
+
x: f.x,
|
|
473
|
+
y: f.y,
|
|
474
|
+
z: f.z
|
|
476
475
|
}
|
|
477
476
|
});
|
|
478
477
|
}
|
|
479
478
|
return y;
|
|
480
479
|
})), h.matrix && Array.isArray(h.matrix) && h.matrix.length >= 16)) {
|
|
481
|
-
const y = new
|
|
482
|
-
h.matrix[12] =
|
|
480
|
+
const y = new w(h.matrix[12], h.matrix[13], h.matrix[14]), f = N(y, e == null ? void 0 : e.transform);
|
|
481
|
+
h.matrix[12] = f.x, h.matrix[13] = f.y, h.matrix[14] = f.z;
|
|
483
482
|
}
|
|
484
|
-
const
|
|
485
|
-
((M = l.config) == null ? void 0 : M.type) === "simultaneous" ||
|
|
486
|
-
id:
|
|
487
|
-
name: l.chapterName || `Chapter ${
|
|
483
|
+
const p = z(h, i);
|
|
484
|
+
((M = l.config) == null ? void 0 : M.type) === "simultaneous" || u > 0 && r++, o[r] || o.push({
|
|
485
|
+
id: r,
|
|
486
|
+
name: l.chapterName || `Chapter ${r + 1}`,
|
|
488
487
|
players: []
|
|
489
|
-
}), o[
|
|
488
|
+
}), o[r].players.push(p);
|
|
490
489
|
}), {
|
|
491
490
|
id: t.id,
|
|
492
491
|
name: t.name,
|
|
@@ -537,15 +536,15 @@ class Q {
|
|
|
537
536
|
const t = [];
|
|
538
537
|
let e = 0;
|
|
539
538
|
return this.state.currentScript.chapters.forEach((i, s) => {
|
|
540
|
-
const o = this.calculateChapterDuration(i),
|
|
539
|
+
const o = this.calculateChapterDuration(i), r = e + o;
|
|
541
540
|
t.push({
|
|
542
541
|
chapterIndex: s,
|
|
543
542
|
chapterName: i.name,
|
|
544
543
|
startTime: e,
|
|
545
544
|
duration: o,
|
|
546
|
-
endTime:
|
|
545
|
+
endTime: r,
|
|
547
546
|
chapter: i
|
|
548
|
-
}), e =
|
|
547
|
+
}), e = r;
|
|
549
548
|
}), this.chapterTimeMapCache = t, this.config.debug && console.log(`${this.NAME} generated chapter time map:`, t), t;
|
|
550
549
|
}
|
|
551
550
|
/**
|
|
@@ -563,11 +562,11 @@ class Q {
|
|
|
563
562
|
getGlobalProgress() {
|
|
564
563
|
let t = 0, e = 0, i = 0;
|
|
565
564
|
if (this.state.currentChapter) {
|
|
566
|
-
const n = this.getChapterTimeMap().find((
|
|
565
|
+
const n = this.getChapterTimeMap().find((a) => a.chapter.name === this.state.currentChapter.name);
|
|
567
566
|
if (n) {
|
|
568
567
|
e = n.chapterIndex;
|
|
569
|
-
const
|
|
570
|
-
i = (
|
|
568
|
+
const a = this.getProgress();
|
|
569
|
+
i = (a == null ? void 0 : a.currentTime) || 0, t = n.startTime + i;
|
|
571
570
|
}
|
|
572
571
|
}
|
|
573
572
|
const s = this.getTotalDuration(), o = s > 0 ? t / s * 100 : 0;
|
|
@@ -587,7 +586,7 @@ class Q {
|
|
|
587
586
|
const e = this.getChapterTimeMap();
|
|
588
587
|
if (e.length === 0)
|
|
589
588
|
return null;
|
|
590
|
-
const s = e.find((
|
|
589
|
+
const s = e.find((r) => t >= r.startTime && t < r.endTime) || (t >= e[e.length - 1].startTime ? e[e.length - 1] : null);
|
|
591
590
|
if (!s)
|
|
592
591
|
return null;
|
|
593
592
|
const o = t - s.startTime;
|
|
@@ -601,7 +600,7 @@ class Q {
|
|
|
601
600
|
* 跳转到指定的全局时间
|
|
602
601
|
*/
|
|
603
602
|
seekToGlobalTime(t, e) {
|
|
604
|
-
return
|
|
603
|
+
return m(this, null, function* () {
|
|
605
604
|
var i;
|
|
606
605
|
this._autoPlayOnNaturalEnd = !!e;
|
|
607
606
|
try {
|
|
@@ -609,21 +608,21 @@ class Q {
|
|
|
609
608
|
throw new Error("No script loaded");
|
|
610
609
|
const s = this.getTotalDuration(), o = Math.max(0, Math.min(t, s));
|
|
611
610
|
this.config.debug, this.emit("seek-started", o);
|
|
612
|
-
const
|
|
613
|
-
if (!
|
|
611
|
+
const r = this.getChapterByGlobalTime(o);
|
|
612
|
+
if (!r)
|
|
614
613
|
throw new Error("Unable to locate chapter for the specified time");
|
|
615
|
-
const { chapterIndex: n, chapterTime:
|
|
616
|
-
this.state.playing && this.pause(), (!this.state.currentChapter || this.state.currentChapter.name !== l.name) && (this.config.debug && console.log(`${this.NAME} switching to chapter ${n}: ${l.name}`), yield this.initializeChapterForSeek(l,
|
|
617
|
-
|
|
614
|
+
const { chapterIndex: n, chapterTime: a, chapter: l } = r, u = this.state.playing;
|
|
615
|
+
this.state.playing && this.pause(), (!this.state.currentChapter || this.state.currentChapter.name !== l.name) && (this.config.debug && console.log(`${this.NAME} switching to chapter ${n}: ${l.name}`), yield this.initializeChapterForSeek(l, a), this.state.currentChapter = l, this.emit("chapter-changed", n, l)), this.setTimelineTo(a), a === 0 && this.state.currentScript.chapters.forEach((g) => {
|
|
616
|
+
g.players.forEach((C) => {
|
|
618
617
|
if (C.type === "model") {
|
|
619
618
|
const A = this.playground.getDigitalHuman(C.model, C.id);
|
|
620
619
|
A && A.stopAnimation();
|
|
621
620
|
}
|
|
622
621
|
});
|
|
623
622
|
});
|
|
624
|
-
const T = this.getChapterTimeMap().find((
|
|
625
|
-
this.state.currentScript.chapters.forEach((
|
|
626
|
-
|
|
623
|
+
const T = this.getChapterTimeMap().find((g) => g.chapter.name === l.name), b = (i = T == null ? void 0 : T.chapterIndex) != null ? i : 0;
|
|
624
|
+
this.state.currentScript.chapters.forEach((g, C) => {
|
|
625
|
+
g.players.forEach((A) => {
|
|
627
626
|
if (A.type === "model") {
|
|
628
627
|
const c = this.playground.getDigitalHuman(A.model, A.id);
|
|
629
628
|
if (!c)
|
|
@@ -635,8 +634,8 @@ class Q {
|
|
|
635
634
|
keyframes: A.keyframes,
|
|
636
635
|
items: A.items,
|
|
637
636
|
effects: A.effects
|
|
638
|
-
}), c.state.currentTime =
|
|
639
|
-
const $ = c.keyframesManager.getStateByTime(
|
|
637
|
+
}), c.state.currentTime = a, c.model.visible = !0, c.container.visible = !0, c.state.currentTime = a, c.keyframesManager && c.keyframes) {
|
|
638
|
+
const $ = c.keyframesManager.getStateByTime(a, c.keyframes, "model");
|
|
640
639
|
$ && (c.model.position.copy($.translation), c.model.quaternion.copy($.quaternion), c.model.scale.copy($.scale), c.model.visible = $.visible);
|
|
641
640
|
}
|
|
642
641
|
e ? c.continueAnimation() : c.pauseAnimation && c.pauseAnimation();
|
|
@@ -644,21 +643,21 @@ class Q {
|
|
|
644
643
|
c.model.visible = !1, c.container.visible = !1, c.state.currentTime = 0, c.pauseAnimation && c.pauseAnimation();
|
|
645
644
|
}
|
|
646
645
|
});
|
|
647
|
-
}), (e !== void 0 ? e :
|
|
648
|
-
if (
|
|
649
|
-
const C = this.playground.getDigitalHuman(
|
|
646
|
+
}), (e !== void 0 ? e : u) && (this.state.playing = !0, l.players.forEach((g) => {
|
|
647
|
+
if (g.type === "model") {
|
|
648
|
+
const C = this.playground.getDigitalHuman(g.model, g.id);
|
|
650
649
|
C && (C.play({
|
|
651
|
-
keyframes:
|
|
652
|
-
items:
|
|
653
|
-
effects:
|
|
654
|
-
}), C.state.currentTime =
|
|
650
|
+
keyframes: g.keyframes,
|
|
651
|
+
items: g.items,
|
|
652
|
+
effects: g.effects
|
|
653
|
+
}), C.state.currentTime = a, C.continueAnimation());
|
|
655
654
|
}
|
|
656
655
|
}), this.emit("playback-started", o)), this.emit("seek-completed", o);
|
|
657
|
-
const
|
|
658
|
-
if (
|
|
656
|
+
const f = this.getChapterTimeMap().find((g) => g.chapter.name === l.name);
|
|
657
|
+
if (f && Math.abs(a - f.duration) < 1 && // 允许1ms误差
|
|
659
658
|
e) {
|
|
660
|
-
const
|
|
661
|
-
|
|
659
|
+
const g = this.state.currentScript.chapters[n + 1];
|
|
660
|
+
g && (this.config.debug && console.log(`${this.NAME} seekToGlobalTime: auto switch to next chapter:`, g.name), yield this.playChapter(g));
|
|
662
661
|
}
|
|
663
662
|
this.config.debug;
|
|
664
663
|
} catch (s) {
|
|
@@ -670,40 +669,36 @@ class Q {
|
|
|
670
669
|
* 初始化章节用于跳转(不自动播放)
|
|
671
670
|
*/
|
|
672
671
|
initializeChapterForSeek(t, e = 0) {
|
|
673
|
-
return
|
|
672
|
+
return m(this, null, function* () {
|
|
674
673
|
this.emitPlayingPlayersChanged();
|
|
675
674
|
try {
|
|
676
675
|
this.config.debug && console.log(`${this.NAME} initializing chapter for seek: ${t.name}`), this.playground.reset();
|
|
677
|
-
const i = t.players.filter((
|
|
678
|
-
i.forEach((
|
|
679
|
-
const n =
|
|
680
|
-
n.keyframes && Array.isArray(n.keyframes) && n.keyframes.forEach((
|
|
681
|
-
|
|
676
|
+
const i = t.players.filter((r) => r.type === "model"), s = [];
|
|
677
|
+
i.forEach((r) => {
|
|
678
|
+
const n = r;
|
|
679
|
+
n.keyframes && Array.isArray(n.keyframes) && n.keyframes.forEach((a) => {
|
|
680
|
+
a.animation && a.animation.url && s.push(a.animation.url);
|
|
682
681
|
});
|
|
683
682
|
}), s.length > 0 && (yield this.playground.loadAnimations(s)), yield Promise.all(
|
|
684
|
-
i.map((
|
|
685
|
-
const n =
|
|
686
|
-
let
|
|
687
|
-
if (
|
|
688
|
-
|
|
683
|
+
i.map((r) => m(this, null, function* () {
|
|
684
|
+
const n = r;
|
|
685
|
+
let a = this.playground.getDigitalHuman(n.model, n.id);
|
|
686
|
+
if (a || (yield this.playground.loadModels([n.model], [n.id]), a = this.playground.getDigitalHuman(n.model, n.id)), a && n.keyframes.length > 0) {
|
|
687
|
+
a.state.currentTime = e, a.state.currentAnimation = null, a.keyframes = n.keyframes;
|
|
689
688
|
const l = n.keyframes[0];
|
|
690
|
-
|
|
691
|
-
l.position[0],
|
|
692
|
-
l.position[1],
|
|
693
|
-
l.position[2]
|
|
694
|
-
), r.model.quaternion.set(
|
|
689
|
+
a.model.position.set(l.position[0], l.position[1], l.position[2]), a.model.quaternion.set(
|
|
695
690
|
l.quaternion[0],
|
|
696
691
|
l.quaternion[1],
|
|
697
692
|
l.quaternion[2],
|
|
698
693
|
l.quaternion[3]
|
|
699
|
-
),
|
|
694
|
+
), a.model.scale.set(l.scale[0], l.scale[1], l.scale[2]), a.model.visible = l.visible, a.play({
|
|
700
695
|
keyframes: n.keyframes,
|
|
701
696
|
items: n.items,
|
|
702
697
|
effects: n.effects
|
|
703
|
-
}),
|
|
698
|
+
}), a.state.currentTime = e, a.continueAnimation();
|
|
704
699
|
}
|
|
705
700
|
}))
|
|
706
|
-
), t.players.filter((
|
|
701
|
+
), t.players.filter((r) => r.type === "camera").length > 0 && this.config.debug, this.config.debug;
|
|
707
702
|
} catch (i) {
|
|
708
703
|
throw console.error(`${this.NAME} failed to initialize chapter for seek:`, i), i;
|
|
709
704
|
}
|
|
@@ -713,7 +708,7 @@ class Q {
|
|
|
713
708
|
* 跳转到指定百分比位置
|
|
714
709
|
*/
|
|
715
710
|
seekToPercentage(t, e) {
|
|
716
|
-
return
|
|
711
|
+
return m(this, null, function* () {
|
|
717
712
|
const i = Math.max(0, Math.min(100, t)), o = this.getTotalDuration() * i / 100;
|
|
718
713
|
this.config.debug && console.log(`${this.NAME} seeking to ${i}% (${o}ms)`), yield this.seekToGlobalTime(o, e);
|
|
719
714
|
});
|
|
@@ -722,20 +717,20 @@ class Q {
|
|
|
722
717
|
* 跳转到指定章节的指定时间
|
|
723
718
|
*/
|
|
724
719
|
seekToChapter(t, e = 0, i) {
|
|
725
|
-
return
|
|
720
|
+
return m(this, null, function* () {
|
|
726
721
|
if (!this.state.currentScript)
|
|
727
722
|
throw new Error("No script loaded");
|
|
728
723
|
if (t < 0 || t >= this.state.currentScript.chapters.length)
|
|
729
724
|
throw new Error("Invalid chapter index");
|
|
730
|
-
const
|
|
731
|
-
this.config.debug && console.log(`${this.NAME} seeking to chapter ${t} at ${e}ms (global: ${
|
|
725
|
+
const r = this.getChapterTimeMap()[t].startTime + Math.max(0, e);
|
|
726
|
+
this.config.debug && console.log(`${this.NAME} seeking to chapter ${t} at ${e}ms (global: ${r}ms)`), yield this.seekToGlobalTime(r, i);
|
|
732
727
|
});
|
|
733
728
|
}
|
|
734
729
|
/**
|
|
735
730
|
* 从指定全局时间开始播放所有剩余内容
|
|
736
731
|
*/
|
|
737
732
|
playFromGlobalTime(t) {
|
|
738
|
-
return
|
|
733
|
+
return m(this, null, function* () {
|
|
739
734
|
yield this.seekToGlobalTime(t, !0), yield this.playAllRemaining();
|
|
740
735
|
});
|
|
741
736
|
}
|
|
@@ -743,12 +738,12 @@ class Q {
|
|
|
743
738
|
* 注册进度变化监听器
|
|
744
739
|
*/
|
|
745
740
|
onProgressChanged(t) {
|
|
746
|
-
const e = (i) =>
|
|
747
|
-
var
|
|
741
|
+
const e = (i) => m(this, null, function* () {
|
|
742
|
+
var a;
|
|
748
743
|
t(i);
|
|
749
|
-
const s = ((
|
|
750
|
-
var
|
|
751
|
-
return l.chapter.name === ((
|
|
744
|
+
const s = ((a = this.state.currentScript) == null ? void 0 : a.chapters) || [], o = this.state.currentChapter ? s.findIndex((l) => l.name === this.state.currentChapter.name) : -1, n = this.getChapterTimeMap().find((l) => {
|
|
745
|
+
var u;
|
|
746
|
+
return l.chapter.name === ((u = this.state.currentChapter) == null ? void 0 : u.name);
|
|
752
747
|
});
|
|
753
748
|
if (this.state.playing && this.state.currentChapter && n && i.currentChapterTime >= n.duration - 10 && // 允许10ms误差,比较章节内时间
|
|
754
749
|
this._autoPlayOnNaturalEnd) {
|
|
@@ -771,9 +766,7 @@ class Q {
|
|
|
771
766
|
*/
|
|
772
767
|
setProgressUpdateInterval(t) {
|
|
773
768
|
const e = this.progressUpdateInterval;
|
|
774
|
-
this.progressUpdateInterval = Math.max(50, t), this.config.debug && console.log(
|
|
775
|
-
`${this.NAME} progress update interval changed from ${e}ms to ${this.progressUpdateInterval}ms`
|
|
776
|
-
), this.progressUpdateTimer !== null && (this.stopProgressUpdateTimer(), this.startProgressUpdateTimer());
|
|
769
|
+
this.progressUpdateInterval = Math.max(50, t), this.config.debug && console.log(`${this.NAME} progress update interval changed from ${e}ms to ${this.progressUpdateInterval}ms`), this.progressUpdateTimer !== null && (this.stopProgressUpdateTimer(), this.startProgressUpdateTimer());
|
|
777
770
|
}
|
|
778
771
|
/**
|
|
779
772
|
* 启动进度更新定时器
|
|
@@ -796,7 +789,7 @@ class Q {
|
|
|
796
789
|
* 播放完整的所有章节(从头开始)
|
|
797
790
|
*/
|
|
798
791
|
playAllChapters() {
|
|
799
|
-
return
|
|
792
|
+
return m(this, null, function* () {
|
|
800
793
|
if (!this.state.currentScript || this.state.currentScript.chapters.length === 0)
|
|
801
794
|
throw new Error("No script or chapters loaded");
|
|
802
795
|
this.config.debug, yield this.seekToGlobalTime(0, !0), yield this.playAllRemaining();
|
|
@@ -849,9 +842,7 @@ class Q {
|
|
|
849
842
|
* 获取当前正在播放的所有player(数组)
|
|
850
843
|
*/
|
|
851
844
|
getCurrentPlayingPlayers() {
|
|
852
|
-
const e = this.getGlobalProgress().currentTime, s = this.getChapterTimeMap().find(
|
|
853
|
-
(o) => e >= o.startTime && e < o.endTime
|
|
854
|
-
);
|
|
845
|
+
const e = this.getGlobalProgress().currentTime, s = this.getChapterTimeMap().find((o) => e >= o.startTime && e < o.endTime);
|
|
855
846
|
return s ? this.getPlayingPlayersFromChapter(s.chapter) : [];
|
|
856
847
|
}
|
|
857
848
|
/**
|