@realsee/five 6.8.0-alpha.9 → 6.8.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/AGENTS_READ_ME.md +6 -1
- package/AI_CONTEXT.md +6 -1
- package/README.md +10 -3
- package/ai_guides/README.md +29 -0
- package/ai_guides/api.md +92 -21
- package/ai_guides/features/3dtile.md +1 -1
- package/ai_guides/features/camera-animation.md +18 -1
- package/ai_guides/features/clipper.md +2 -2
- package/ai_guides/features/coordinate-system.md +20 -2
- package/ai_guides/features/event.md +106 -10
- package/ai_guides/features/five.md +17 -17
- package/ai_guides/features/flowing-light-2d-pass.md +75 -17
- package/ai_guides/features/flowing-light-3d-pass.md +76 -17
- package/ai_guides/features/gaussian-blur-pass.md +1 -1
- package/ai_guides/features/gesture.md +2 -1
- package/ai_guides/features/get-screen-pixels.md +2 -2
- package/ai_guides/features/image-options.md +2 -2
- package/ai_guides/features/load-external-model.md +6 -2
- package/ai_guides/features/load-progress.md +1 -1
- package/ai_guides/features/material.md +20 -12
- package/ai_guides/features/mode.md +1 -1
- package/ai_guides/features/model.md +1 -1
- package/ai_guides/features/move-pano-effect.md +1 -1
- package/ai_guides/features/multi-work.md +1 -1
- package/ai_guides/features/pano-filter.md +149 -0
- package/ai_guides/features/pano-tile.md +1 -1
- package/ai_guides/features/pano-uv.md +1 -1
- package/ai_guides/features/parameter.md +26 -2
- package/ai_guides/features/plugin.md +1 -1
- package/ai_guides/features/postprocessing.md +1 -1
- package/ai_guides/features/raycast.md +5 -2
- package/ai_guides/features/request-proxy.md +1 -1
- package/ai_guides/features/screen-project.md +2 -1
- package/ai_guides/features/state.md +23 -3
- package/ai_guides/features/view-layer.md +1 -1
- package/ai_guides/features/work.md +1 -1
- package/ai_guides/glossary.md +4 -4
- package/ai_guides/release_notes/6.8.md +190 -58
- package/ai_guides/template.md +11 -0
- package/docs/00_FOR_AI_AGENTS.md +3 -2
- package/docs/README.md +3 -2
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/main.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.BoundingMesh.html +2 -2
- package/docs/classes/five.Camera.html +3 -3
- package/docs/classes/five.EyeDomeLightingPass.html +1 -1
- package/docs/classes/five.Five.html +77 -76
- package/docs/classes/five.FivePass.html +1 -1
- package/docs/classes/five.Histogram.html +19 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +8 -8
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +5 -5
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMCustomShader.html +42 -3
- package/docs/classes/five.PBMGSObject.html +5 -3
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +7 -7
- package/docs/classes/five.PBMPanoFilter.html +61 -0
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PBMUpdateable.html +41 -0
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.Parameter.html +57 -55
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +5 -5
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +24 -24
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +3 -2
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +22 -22
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFLoader.html +2 -2
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.GLTFParser.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +2 -2
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
- package/docs/classes/plugins.CSS2DObject.html +10 -0
- package/docs/classes/plugins.CSS2DRenderer.html +7 -0
- package/docs/classes/plugins.CSS3DObject.html +9 -0
- package/docs/classes/plugins.CSS3DRenderer.html +4 -2
- package/docs/classes/plugins.CSS3DSprite.html +11 -0
- package/docs/classes/plugins.Object3DHelperController.html +43 -0
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +6 -6
- package/docs/classes/vfx.ParticleGPU.html +3 -3
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +122 -1
- package/docs/documents/api.html +163 -35
- package/docs/documents/features_3dtile.html +1 -1
- package/docs/documents/features_camera-animation.html +18 -2
- package/docs/documents/features_clipper.html +2 -2
- package/docs/documents/features_coordinate-system.html +52 -3
- package/docs/documents/features_event.html +44 -8
- package/docs/documents/features_five.html +17 -17
- package/docs/documents/features_flowing-light-2d-pass.html +41 -125
- package/docs/documents/features_flowing-light-3d-pass.html +43 -132
- package/docs/documents/features_gaussian-blur-pass.html +6 -6
- package/docs/documents/features_gesture.html +2 -1
- package/docs/documents/features_get-screen-pixels.html +2 -2
- package/docs/documents/features_image-options.html +2 -2
- package/docs/documents/features_load-external-model.html +6 -2
- package/docs/documents/features_load-progress.html +1 -1
- package/docs/documents/features_material.html +11 -4
- package/docs/documents/features_mode.html +1 -1
- package/docs/documents/features_model.html +1 -1
- package/docs/documents/features_move-pano-effect.html +1 -1
- package/docs/documents/features_multi-work.html +1 -1
- package/docs/documents/features_pano-filter.html +123 -0
- package/docs/documents/features_pano-tile.html +1 -1
- package/docs/documents/features_pano-uv.html +1 -1
- package/docs/documents/features_parameter.html +11 -3
- package/docs/documents/features_plugin.html +1 -1
- package/docs/documents/features_postprocessing.html +1 -1
- package/docs/documents/features_raycast.html +5 -2
- package/docs/documents/features_request-proxy.html +1 -1
- package/docs/documents/features_screen-project.html +2 -1
- package/docs/documents/features_state.html +9 -2
- package/docs/documents/features_view-layer.html +1 -1
- package/docs/documents/features_work.html +1 -1
- package/docs/documents/glossary.html +5 -5
- package/docs/documents/release_notes_6.8.html +164 -64
- package/docs/documents/template.html +9 -0
- package/docs/functions/five.createDebugBoundingMesh.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/plugins.CSS2DPlugin.html +1 -0
- package/docs/functions/plugins.CSS3DPlugin.html +1 -0
- package/docs/functions/plugins.GaussianSplattingEntranceAnimationPlugin.html +1 -0
- package/docs/functions/plugins.Object3DHelperPlugin.html +1 -0
- package/docs/functions/react.getPlugin.html +2 -0
- package/docs/functions/react.setPlugin.html +2 -0
- package/docs/functions/react.useFiveCurrentObserver.html +2 -2
- package/docs/functions/react.useFiveFloor.html +2 -2
- package/docs/functions/react.useFivePlugin.html +8 -0
- package/docs/functions/react.useFiveProject2d.html +2 -2
- package/docs/functions/react.withFive.html +1 -1
- package/docs/functions/vue.useFiveCurrentObserver.html +2 -2
- package/docs/functions/vue.useFiveFloor.html +2 -2
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +122 -1
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +7 -2
- package/docs/interfaces/five.BaseExtendableEvent.html +11 -0
- package/docs/interfaces/five.EventCallback.html +58 -54
- package/docs/interfaces/five.FiveInitArgs.html +2 -2
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +21 -2
- package/docs/interfaces/five.GesturePointer.html +20 -0
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +10 -2
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.LooseWorkObserver.html +2 -2
- package/docs/interfaces/five.LooseWorkPanorama.html +2 -2
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +10 -10
- package/docs/interfaces/five.ModeChangeEvent.html +9 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +7 -2
- package/docs/interfaces/five.ModelSceneEvent.html +7 -2
- package/docs/interfaces/five.ModelTileEvent.html +7 -2
- package/docs/interfaces/five.MovePanoOptions.html +8 -8
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +7 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +7 -2
- package/docs/interfaces/five.PBMClipperParameter.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
- package/docs/interfaces/five.PBMPanoDepth.html +5 -5
- package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
- package/docs/interfaces/five.PBMPanoPicture.html +8 -6
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
- package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
- package/docs/interfaces/five.PanoCircleMeshInterface.html +2 -2
- package/docs/interfaces/five.PanoEvent.html +15 -2
- package/docs/interfaces/five.PanoPrepareEvent.html +15 -0
- package/docs/interfaces/five.PanoTextureEvent.html +11 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +40 -38
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +54 -52
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +7 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +55 -54
- package/docs/interfaces/five.RgbaData.html +7 -0
- package/docs/interfaces/five.SplatData.html +2 -2
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +9 -2
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DOptions.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +24 -24
- package/docs/interfaces/five.WorkCubeImage.html +3 -2
- package/docs/interfaces/five.WorkImage.html +6 -5
- package/docs/interfaces/five.WorkInitial.html +8 -8
- package/docs/interfaces/five.WorkModel.html +8 -8
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +29 -29
- package/docs/interfaces/five.WorkObserverJson.html +2 -2
- package/docs/interfaces/five.WorkObserverProto.html +26 -0
- package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
- package/docs/interfaces/five.WorkTile.html +6 -5
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +7 -2
- package/docs/interfaces/five.XRControllerEvent.html +10 -2
- package/docs/interfaces/five.XRControllerState.html +8 -0
- package/docs/interfaces/five.XRGestureEvent.html +13 -2
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +9 -2
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
- package/docs/interfaces/plugins.CSS2DPluginController.html +49 -0
- package/docs/interfaces/plugins.CSS2DPluginType.Config.html +2 -0
- package/docs/interfaces/plugins.CSS2DPluginType.CreateCSS2DObjectType.html +8 -0
- package/docs/interfaces/plugins.CSS2DPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.CSS2DPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.CSS2DPluginType.State.html +8 -0
- package/docs/interfaces/plugins.CSS2DRendererParameters.html +2 -0
- package/docs/interfaces/plugins.CSS3DPluginController.html +52 -0
- package/docs/interfaces/plugins.CSS3DPluginType.Config.html +2 -0
- package/docs/interfaces/plugins.CSS3DPluginType.CreateCSS3DObjectType.html +10 -0
- package/docs/interfaces/plugins.CSS3DPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.CSS3DPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.CSS3DPluginType.State.html +8 -0
- package/docs/interfaces/plugins.CSS3DRendererParameters.html +2 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +3 -3
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationController.html +44 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.BoundingAABB2D.html +3 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Config.html +8 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Keyframe.html +3 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.State.html +8 -0
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +2 -2
- package/docs/interfaces/plugins.Object3DHelperPluginType.BaseController.html +30 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.BaseHelper.html +22 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.BoundingBoxController.html +30 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.HelperOffset.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.MoveController.html +36 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.MoveHelperAbstract.html +32 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelper.html +12 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelperPluginState.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelperState.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.ObjectHelperControllers.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.RotateController.html +36 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.RotateHelperAbstract.html +28 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Scissor.html +5 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Vector2Position.html +3 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Vector3Position.html +4 -0
- package/docs/interfaces/plugins.OrientationPluginController.html +6 -6
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PlayingState.html +2 -2
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +8 -8
- package/docs/interfaces/react.FiveAppProps.html +11 -0
- package/docs/interfaces/react.FiveInjectionTypes.html +21 -21
- package/docs/interfaces/sticker.IntersectionLike.html +2 -2
- package/docs/interfaces/vfx.ParticleArgs.html +4 -4
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +3 -3
- package/docs/modules/five.html +1 -1
- package/docs/modules/plugins.CSS2DPluginType.html +1 -0
- package/docs/modules/plugins.CSS3DPluginType.html +1 -0
- package/docs/modules/plugins.GaussianSplattingEntranceAnimationPluginType.html +1 -0
- package/docs/modules/plugins.Object3DHelperPluginType.html +1 -0
- package/docs/modules/plugins.html +1 -1
- package/docs/modules/react.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +30 -26
- package/docs/types/five.EasingFunction.html +1 -0
- package/docs/types/five.EventTypes.html +26 -26
- package/docs/types/five.LegacyEventType.html +7 -7
- package/docs/types/five.PBMAlphaMode.html +1 -1
- package/docs/types/five.PBMColorStyle.html +1 -1
- package/docs/types/five.PBMFloorStyle.html +1 -1
- package/docs/types/five.PBMMeshShaderType.html +1 -1
- package/docs/types/five.PBMPointBack.html +1 -1
- package/docs/types/five.PBMPointCloudShaderType.html +1 -1
- package/docs/types/five.PBMPointShape.html +1 -1
- package/docs/types/five.PBMPointSize.html +1 -1
- package/docs/types/five.PBMTransition.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/five.Works.html +1 -1
- package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
- package/docs/types/plugins.CSS2DPluginType.PluginData.html +1 -0
- package/docs/types/plugins.CSS2DPluginType.ServerData.html +1 -0
- package/docs/types/plugins.CSS3DPluginType.PluginData.html +1 -0
- package/docs/types/plugins.CSS3DPluginType.ServerData.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.AddObject3DHelperConfig.html +13 -0
- package/docs/types/plugins.Object3DHelperPluginType.Circle.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Color.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Direction.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Direction4.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.HelperConfig.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.HelperEventMap.html +17 -0
- package/docs/types/plugins.Object3DHelperPluginType.InternalHelperEventMap.html +8 -0
- package/docs/types/plugins.Object3DHelperPluginType.Object3DHelperEventMap.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Object3DHelperPluginEventMap.html +7 -0
- package/docs/types/plugins.Object3DHelperPluginType.PositionFrom.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.ScaleCallback.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.ScalePosition.html +4 -0
- package/docs/types/plugins.Object3DHelperPluginType.UseFaceNormalInterface.html +4 -0
- package/docs/types/plugins.Object3DHelperPluginType.Vector2WithArray.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Vector3WithArray.html +1 -0
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/docs/variables/react.FiveApp.html +3 -0
- package/docs/variables/react.FiveAutoCanvas.html +3 -0
- package/five/application/events.d.ts +1 -1
- package/five/application/five.d.ts +6 -5
- package/five/bvh/bvhObject.d.ts +2 -2
- package/five/controllers/base.d.ts +1 -0
- package/five/controllers/events.d.ts +5 -1
- package/five/controllers/mapview.d.ts +1 -0
- package/five/controllers/model.d.ts +2 -2
- package/five/controllers/panorama.d.ts +3 -2
- package/five/controllers/xrPanorama.d.ts +1 -1
- package/five/core/camera.d.ts +1 -1
- package/five/gaussian-splatting/util/renderData.d.ts +66 -0
- package/five/index.d.ts +4 -1
- package/five/index.js +272 -782
- package/five/index.mjs +26894 -32056
- package/five/meshes/boundingMesh.d.ts +1 -0
- package/five/model/index.d.ts +2 -2
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting.d.ts +26 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +7 -5
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +13 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +2 -1
- package/five/model/loaders/glTF-helpers/index.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +2 -1
- package/five/model/loaders/spz.d.ts +2 -2
- package/five/model/materials/pbmMaterial.d.ts +54 -4
- package/five/model/materials/pbmMeshMaterial.d.ts +5 -3
- package/five/model/materials/pbmPointCloudMaterial.d.ts +0 -2
- package/five/model/objects/{pbmGSObject.d.ts → pbmGaussianSplattingObject.d.ts} +4 -1
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +59 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
- package/five/model/parameter.d.ts +11 -6
- package/five/model/tile3d/index.d.ts +5 -3
- package/five/model/tile3d/tile-node.d.ts +2 -2
- package/five/model/tile3d/tileset.d.ts +1 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +9 -7
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +6 -1
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +3 -1
- package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
- package/five/renderer/tools/render-full-screen.d.ts +1 -1
- package/five/texture/histogram.d.ts +54 -0
- package/five/texture/loader.d.ts +1 -1
- package/five/texture/textureData.d.ts +11 -0
- package/five/thirdparty/hammer.d.ts +371 -255
- package/five/thirdparty/jsrsasign.d.ts +5 -20
- package/five/types/movePanoOptions.d.ts +4 -3
- package/five/utils/error.d.ts +1 -0
- package/five/utils/event.d.ts +98 -37
- package/five/utils/imageURL.d.ts +1 -1
- package/five/utils/memoryUsage.d.ts +2 -2
- package/five/utils/subscribe.d.ts +2 -2
- package/five/webxr/motionHelper.d.ts +1 -1
- package/five/work/index.d.ts +1 -0
- package/five/work/looseWorkType.d.ts +2 -2
- package/five/work/work.d.ts +5 -35
- package/five/work/workJsonType.d.ts +2 -2
- package/five/work/workObserverProto.d.ts +39 -0
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/llms.txt +37 -1
- package/package.json +4 -4
- package/plugins/CSS2DPlugin/Controller.d.ts +59 -0
- package/plugins/CSS2DPlugin/index.d.ts +5 -0
- package/plugins/CSS2DPlugin/typing.d.ts +30 -0
- package/plugins/CSS3DPlugin/Controller.d.ts +64 -0
- package/plugins/CSS3DPlugin/index.d.ts +5 -0
- package/plugins/CSS3DPlugin/typing.d.ts +32 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +30 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +5 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/typing.d.ts +28 -0
- package/plugins/Object3DHelperPlugin/Controller.d.ts +99 -0
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.d.ts +142 -0
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.d.ts +66 -0
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.d.ts +61 -0
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.d.ts +17 -0
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.d.ts +97 -0
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.d.ts +37 -0
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.d.ts +93 -0
- package/plugins/Object3DHelperPlugin/constant.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/index.d.ts +6 -0
- package/plugins/Object3DHelperPlugin/typing.d.ts +143 -0
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.d.ts +22 -0
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.d.ts +23 -0
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.d.ts +19 -0
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.d.ts +2 -0
- package/plugins/Object3DHelperPlugin/utils/direction.d.ts +14 -0
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/solidGuide.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/utils/tipsDom.d.ts +8 -0
- package/plugins/TrajectoryPlugin/Controller.d.ts +1 -1
- package/plugins/index.d.ts +6 -1
- package/plugins/index.js +55 -21
- package/plugins/index.mjs +5582 -4238
- package/plugins/thirdParty/CSS2DRenderer.d.ts +37 -0
- package/plugins/thirdParty/CSS3DRenderer.d.ts +16 -3
- package/plugins/thirdParty/domevents.d.ts +36 -0
- package/plugins/utils/uuid.d.ts +1 -4
- package/react/autoCanvas.d.ts +9 -0
- package/react/context.d.ts +3 -2
- package/react/createProvider.d.ts +4 -4
- package/react/createStore.d.ts +3 -3
- package/react/fiveApp.d.ts +22 -0
- package/react/hooks/useFivePlugin.d.ts +26 -0
- package/react/hooks/useFiveProject2d.d.ts +1 -1
- package/react/index.d.ts +4 -0
- package/react/index.js +3 -3
- package/react/index.mjs +687 -782
- package/react/rendererPool.d.ts +2 -2
- package/react/withFive.d.ts +1 -1
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +55 -21
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +13 -14
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +21 -21
- package/umd/five-vue.js +3 -3
- package/umd/five.js +267 -777
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/vue/rendererPool.d.ts +5 -5
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +339 -556
- package/five/gs/util/renderData.d.ts +0 -32
- package/five/model/objects/pbmGSRenderMesh.d.ts +0 -29
- package/five/work/workObserverUtils.d.ts +0 -36
- /package/five/assets/{realsee-pmg-data-url.d.ts → realsee-png-data-url.d.ts} +0 -0
- /package/five/{gs → gaussian-splatting}/wasm/data.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/wasm/sort.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/dataWorker.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/sortWorker.d.ts +0 -0
package/vue/rendererPool.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
declare function getRenderer({ backgroundColor, backgroundAlpha, preserveDrawingBuffer, pixelRatio, webgl2 }?: {
|
|
3
|
-
backgroundColor?: number;
|
|
4
|
-
backgroundAlpha?: number;
|
|
5
|
-
preserveDrawingBuffer?: boolean;
|
|
6
|
-
pixelRatio?: number;
|
|
7
|
-
webgl2?: boolean;
|
|
3
|
+
backgroundColor?: number | undefined;
|
|
4
|
+
backgroundAlpha?: number | undefined;
|
|
5
|
+
preserveDrawingBuffer?: boolean | undefined;
|
|
6
|
+
pixelRatio?: number | undefined;
|
|
7
|
+
webgl2?: boolean | undefined;
|
|
8
8
|
}): THREE.WebGLRenderer | undefined;
|
|
9
9
|
declare function revokeRenderer(renderer?: THREE.WebGLRenderer): void;
|
|
10
10
|
export { getRenderer, revokeRenderer };
|
package/work-downloader/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 6.8.
|
|
4
|
+
* Generated: 2026/4/28
|
|
5
|
+
* Version: 6.8.1
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -252,4 +252,4 @@
|
|
|
252
252
|
* No amendment to or modification of this Agreement will be binding unless in
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
|
-
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("node:fs"),B=require("node:fs/promises"),L=require("node:path"),K=require("node:stream"),Q=require("sharp");function S(n,r,e,a){function i(t){return t instanceof e?t:new e(function(u){u(t)})}return new(e||(e=Promise))(function(t,u){function o(c){try{s(a.next(c))}catch(f){u(f)}}function l(c){try{s(a.throw(c))}catch(f){u(f)}}function s(c){c.done?t(c.value):i(c.value).then(o,l)}s((a=a.apply(n,r||[])).next())})}function F(n,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=o(0),u.throw=o(1),u.return=o(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(s){return function(c){return l([s,c])}}function l(s){if(a)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(e=0)),e;)try{if(a=1,i&&(t=s[0]&2?i.return:s[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,s[1])).done)return t;switch(i=0,t&&(s=[s[0]&2,t.value]),s[0]){case 0:case 1:t=s;break;case 4:return e.label++,{value:s[1],done:!1};case 5:e.label++,i=s[1],s=[0];continue;case 7:s=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!t||s[1]>t[0]&&s[1]<t[3])){e.label=s[1];break}if(s[0]===6&&e.label<t[1]){e.label=t[1],t=s;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(s);break}t[2]&&e.ops.pop(),e.trys.pop();continue}s=r.call(n,e)}catch(c){s=[6,c],i=0}finally{a=t=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function O(n,r){if(r&&r[r.length-1]!=="/"&&(r+="/"),n.length>r.length&&n.startsWith(r))return n.slice(r.length);throw new Error("".concat(n," is not starting with ").concat(r))}function V(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var e=[];n=n.map(function(o){return(o!=null?o:"").trim()}).filter(function(o){return o.length>0&&!/^\/+$/.test(o)});for(var a=0;a<n.length;a++){var i=a===0,t=a===n.length-1,u=n[a];i||(u=u.replace(/^\.\//,"").replace(/^\/+/,"")),t||(u=u.replace(/\/+$/,"")),e.push(u)}return e.join("/")}var Y=1024*1024*5;function T(n,r,e){return S(this,void 0,void 0,function(){var a,i,t,u;return F(this,function(o){switch(o.label){case 0:return I.existsSync(r)?[2,r]:[4,e(n)];case 1:return a=o.sent(),a.ok&&a.body?[4,B.mkdir(L.dirname(r),{recursive:!0})]:[3,6];case 2:return o.sent(),i=Number((u=a.headers.get("content-length"))!==null&&u!==void 0?u:"Infinity"),i>Y?[2,new Promise(function(l,s){var c=K.Readable.fromWeb(a.body),f=I.createWriteStream(r);c.pipe(f),c.on("error",s),f.on("finish",function(){return l(r)})})]:[3,3];case 3:return[4,a.arrayBuffer()];case 4:return t=o.sent(),[4,B.writeFile(r,Buffer.from(t))];case 5:return o.sent(),[2,r];case 6:throw new Error("url: ".concat(n,"(").concat(a.statusText,")"))}})})}var Z=["jpg","png"],x=95;function G(n,r){var e=L.extname(n).slice(1)||"jpg",a=r.cut,i=r.size,t=r.format,u=t===void 0?e:t,o="";if(r.toFilename)o=r.toFilename(n,{cut:r.cut,size:r.size,format:r.format});else{var l="",s="",c=u;a&&(l=a.join("x")),i&&(s="".concat(i,"x")),c===e&&!s&&!l&&(c=""),o=[n,l,s,c].filter(function(f){return f.length>0}).join(".")}return o}function J(n,r){return S(this,void 0,void 0,function(){var e,a,i,t,u,o,l,s,c;return F(this,function(f){return e=L.extname(n).slice(1)||"jpg",a=r.cut,i=r.size,t=r.format,u=t===void 0?e:t,o=n,(a||i)&&u!==e&&Z.includes(u)&&(l=G(n,{format:u,toFilename:r.toFilename}),l!==o&&I.existsSync(l)&&(o=l)),s=Q(o),a&&(s=s.extract({left:a[0],top:a[1],width:a[2],height:a[3]})),i&&(s=s.resize(i)),s=s.toFormat(u,{quality:x}),c=G(n,r),c!==n&&!I.existsSync(c)?[2,s.toFile(c).then(function(){return c})]:[2,c]})})}function X(n){var r=[];if(n.content&&(n.content.uri?r.push(n.content.uri):n.content.url&&r.push(n.content.url)),n.children)for(var e=0,a=n.children;e<a.length;e++){var i=a[e],t=X(i);if(t.length>0)for(var u=0;u<t.length;u++)r.push(t[u])}return r}function ee(n,r,e){return S(this,void 0,void 0,function(){var a,i,t;return F(this,function(u){switch(u.label){case 0:return a=new URL(n,r).href,i=L.join(e.distPath,O(a,e.baseURL)),t=T(a,i,e.fetch),e.log(function(o){return"download: ".concat(a," -> ").concat(o)},t),[4,t];case 1:return u.sent(),/\.json$/.test(n)?[4,H(a,e)]:[3,3];case 2:u.sent(),u.label=3;case 3:return[2]}})})}function H(n,r){return S(this,void 0,void 0,function(){var e,a,i,t,u,o,l,s,c,f,v,m,p,b,w,d,h,y,k;return F(this,function(g){switch(g.label){case 0:return e=L.join(r.distPath,O(n,r.baseURL)),a=T(n,e,r.fetch),r.log(function(z){return"download: ".concat(n," -> ").concat(z)},a),[4,a];case 1:return g.sent(),u=(t=JSON).parse,[4,B.readFile(e,"utf8")];case 2:return i=u.apply(t,[g.sent()]),i.asset.overview?(o=new URL(i.asset.overview.imageFile,n).href,l=L.join(r.distPath,O(o,r.baseURL)),s=T(o,l,r.fetch),r.log(function(z){return"download: ".concat(o," -> ").concat(z)},s),[4,s]):[3,4];case 3:g.sent(),g.label=4;case 4:if(!i.asset.trajectories)return[3,8];c=function(z){var j,P,R;return F(this,function(U){switch(U.label){case 0:return j=new URL(z.file,n).href,P=L.join(r.distPath,O(j,r.baseURL)),R=T(j,P,r.fetch),r.log(function(_){return"download: ".concat(j," -> ").concat(_)},R),[4,R];case 1:return U.sent(),[2]}})},f=0,v=i.asset.trajectories.list,g.label=5;case 5:return f<v.length?(m=v[f],[5,c(m)]):[3,8];case 6:g.sent(),g.label=7;case 7:return f++,[3,5];case 8:p=X(i.root),b=6,w=0,g.label=9;case 9:if(!(w<p.length))return[3,12];for(d=[],h=0;h<b;h++)y=p[w+h],y&&(k=ee(y,n,r),d.push(k));return[4,Promise.all(d)];case 10:g.sent(),g.label=11;case 11:return w+=b,[3,9];case 12:return[2]}})})}function re(n,r){return S(this,void 0,void 0,function(){var e,a,i,t,u,d,o,l,s,c,f,v,m,p,b,w,d;return F(this,function(h){switch(h.label){case 0:return r.log("process model"),n.model?(e=n.model,a=e.textures,i=e.layers,t=e.file,u=e.textureBase,t?(r.log("process model file"),d=n.getURL(t),o=L.join(r.distPath,O(d,r.baseURL)),l=T(d,o,r.fetch),r.log(function(y){return"download: ".concat(t," -> ").concat(y)},l),[4,l]):[3,5]):[3,9];case 1:if(h.sent(),!a)return[3,5];s=function(y){var k,g,z,j,P,R,U,_,E,$,C,A,D;return F(this,function(M){switch(M.label){case 0:return k=V(n.getURL(u!=null?u:""),y),g=L.join(r.distPath,O(k,r.baseURL)),z=T(k,g,r.fetch),r.log(function(W){return"download: ".concat(k," -> ").concat(W)},z),[4,z];case 1:for(M.sent(),j=r.imageOptions.format,j.length===0&&j.push(void 0),P=r.imageOptions.size,P.length===0&&P.push(void 0),R=[],U=0,_=j;U<_.length;U++)for(E=_[U],$=0,C=P;$<C.length;$++)A=C[$],D=J(g,{format:E,size:A,toFilename:r.imageProcessingFilename}),r.log(function(W){return"imageProcessing: ".concat(g," -> ").concat(W)},D),R.push(D);return[4,Promise.all(R)];case 2:return M.sent(),[2]}})},c=0,f=a,h.label=2;case 2:return c<f.length?(v=f[c],[5,s(v)]):[3,5];case 3:h.sent(),h.label=4;case 4:return c++,[3,2];case 5:if(!i)return[3,9];m=0,p=i,h.label=6;case 6:return m<p.length?(b=p[m],w=b.tileset,r.log("process model layer"),d=n.getURL(w),[4,H(d,r)]):[3,9];case 7:h.sent(),h.label=8;case 8:return m++,[3,6];case 9:return[2]}})})}function q(n,r,e){return S(this,void 0,void 0,function(){var a,i,t,u,o,l,s,c,f,v,m,p,b,w;return F(this,function(d){switch(d.label){case 0:return a=L.join(e.distPath,O(n,e.baseURL)),i=T(n,a,e.fetch),e.log(function(h){return"download: ".concat(n," -> ").concat(h)},i),[4,i];case 1:if(d.sent(),t=Math.pow(2,r.level),u=e.imageOptions.format,u.length===0&&u.push(void 0),o=[],t>1)for(l=0;l<t;l++)for(s=0;s<t;s++)for(c=0,f=u;c<f.length;c++)v=f[c],m=[r.size/t*s,r.size/t*l,r.size/t,r.size/t],p=r.scale>=1?void 0:r.scale*r.size/t,b=J(a,{format:v,size:p,cut:m,toFilename:e.imageProcessingFilename}),e.log(function(h){return"imageProcessing: ".concat(a," -> ").concat(h)},b),o.push(b),r.level===1&&r.scale>=.5&&(v==="jpg"||/\.jpg$/.test(a))&&(w=J(a,{format:v,size:void 0,cut:m,toFilename:e.imageProcessingFilename}),e.log(function(h){return"imageProcessing: ".concat(a," -> ").concat(h)},w),o.push(w));return[4,Promise.all(o)];case 2:return d.sent(),[2]}})})}function ne(n,r){return S(this,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return[4,Promise.all([q(n.work.getURL(n.front),n,r),q(n.work.getURL(n.back),n,r),q(n.work.getURL(n.left),n,r),q(n.work.getURL(n.right),n,r),q(n.work.getURL(n.up),n,r),q(n.work.getURL(n.down),n,r)])];case 1:return e.sent(),[2]}})})}function N(n,r,e){return S(this,void 0,void 0,function(){var a,i,t,u,o,l,s,c,f,v,m,p,b,w,d,h;return F(this,function(y){switch(y.label){case 0:return a=L.join(e.distPath,O(n,e.baseURL)),i=T(n,a,e.fetch),e.log(function(k){return"download: ".concat(n," -> ").concat(k)},i),[4,i];case 1:y.sent(),t=e.imageOptions.format,t.length===0&&t.push(void 0),u=e.imageOptions.size,u.length===0&&u.push(void 0),o=function(k){var g,z,j,P,R,U,_;return F(this,function(E){switch(E.label){case 0:return g=n.replace(/cube\_\d+/,"cube_".concat(k)),z=L.join(e.distPath,O(g,e.baseURL)),j=T(g,z,e.fetch),e.log(function($){return"download ".concat(g," -> ").concat(z)},j),[4,j];case 1:E.sent(),P=0,R=t,E.label=2;case 2:return P<R.length?(U=R[P],_=J(z,{format:U,toFilename:e.imageProcessingFilename}),e.log(function($){return"imageProcessing: ".concat(z," -> ").concat($)},_),[4,_]):[3,5];case 3:E.sent(),E.label=4;case 4:return P++,[3,2];case 5:return[2]}})},l=0,s=r,y.label=2;case 2:return l<s.length?(c=s[l],[5,o(c)]):[3,5];case 3:y.sent(),y.label=4;case 4:return l++,[3,2];case 5:for(f=[],v=0,m=t;v<m.length;v++)for(p=m[v],b=0,w=u;b<w.length;b++)d=w[b],h=J(a,{format:p,size:d,toFilename:e.imageProcessingFilename}),e.log(function(k){return"imageProcessing: ".concat(a," -> ").concat(k)},h),f.push(h);return[4,Promise.all(f)];case 6:return y.sent(),[2]}})})}function te(n,r){return S(this,void 0,void 0,function(){var e;return F(this,function(a){switch(a.label){case 0:return e=n.images,[4,Promise.all([N(e.work.getURL(e.front),e.sizeList,r),N(e.work.getURL(e.back),e.sizeList,r),N(e.work.getURL(e.left),e.sizeList,r),N(e.work.getURL(e.right),e.sizeList,r),N(e.work.getURL(e.up),e.sizeList,r),N(e.work.getURL(e.down),e.sizeList,r)])];case 1:return a.sent(),e.tiles?[4,Promise.all(e.tiles.map(function(i){return ne(i,r)}))]:[3,3];case 2:a.sent(),a.label=3;case 3:return[2]}})})}function ae(n,r){return S(this,void 0,void 0,function(){var e,a,i,t,u;return F(this,function(o){switch(o.label){case 0:e=n.observers,a=0,i=e,o.label=1;case 1:return a<i.length?(t=i[a],u=te(t,r),r.log("process observer #".concat(t.index," derived: ").concat(t.derivedIdStr),u),[4,u]):[3,4];case 2:o.sent(),o.label=3;case 3:return a++,[3,1];case 4:return[2]}})})}function ie(n,r){if(r){var e=Date.now();r.then(function(i){var t=Date.now()-e,u=typeof n=="function"?n(i):n;console.log(u+"(".concat(t,"ms)"))}).catch(function(){})}else{var a=typeof n=="function"?n(null):n;console.log(a)}}function se(n){return S(this,arguments,void 0,function(r,e){var a,i,t,u,o,l,s,c,f,v,m,p,b,w,d;return e===void 0&&(e={}),F(this,function(h){switch(h.label){case 0:if(a=r.baseURL,i="",e.distPath)i=L.resolve(process.cwd(),e.distPath);else for(i=L.resolve(process.cwd(),(l=r.workCode)!==null&&l!==void 0?l:"work-".concat(Date.now()));I.existsSync(i);)/.-(\d+)$/.test(i)?i=i.replace(/.-(\d+)$/,function(y,k){return"-"+(Number(k)+1)}):i=i+"-1";return t={baseURL:a,distPath:i,fetch:(s=e.fetch)!==null&&s!==void 0?s:fetch,imageOptions:{size:(f=(c=e.imageOptions)===null||c===void 0?void 0:c.size)!==null&&f!==void 0?f:[],format:(m=(v=e.imageOptions)===null||v===void 0?void 0:v.format)!==null&&m!==void 0?m:[]},textureOptions:{size:(b=(p=e.textureOptions)===null||p===void 0?void 0:p.size)!==null&&b!==void 0?b:[],format:(d=(w=e.textureOptions)===null||w===void 0?void 0:w.format)!==null&&d!==void 0?d:[]},log:e.log?ie:(function(){return Promise.resolve()}),imageProcessingFilename:e.imageProcessingFilename},t.log(JSON.stringify(t,null," ")),[4,B.mkdir(i,{recursive:!0})];case 1:return h.sent(),u="work.json",o=L.resolve(i,u),[4,B.writeFile(o,JSON.stringify(r.toJSON(),null," "))];case 2:return h.sent(),[4,ae(r,t)];case 3:return h.sent(),[4,re(r,t)];case 4:return h.sent(),[2]}})})}exports.download=se;
|
|
255
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`node:fs`),l=require(`node:fs/promises`),u=require(`node:path`),d=require(`node:stream`),f=require(`sharp`);f=s(f);function p(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function m(e,t){if(t&&t[t.length-1]!==`/`&&(t+=`/`),e.length>t.length&&e.startsWith(t))return e.slice(t.length);throw Error(`${e} is not starting with ${t}`)}function h(...e){let t=[];e=e.map(e=>(e==null?``:e).trim()).filter(e=>e.length>0&&!/^\/+$/.test(e));for(let n=0;n<e.length;n++){let r=n===0,i=n===e.length-1,a=e[n];r||(a=a.replace(/^\.\//,``).replace(/^\/+/,``)),i||(a=a.replace(/\/+$/,``)),t.push(a)}return t.join(`/`)}var g=1024*1024*5;function _(e,t,n){return p(this,void 0,void 0,function*(){var r;if((0,c.existsSync)(t))return t;let i=yield n(e);if(i.ok&&i.body){if(yield(0,l.mkdir)((0,u.dirname)(t),{recursive:!0}),Number((r=i.headers.get(`content-length`))==null?`Infinity`:r)>g)return new Promise((e,n)=>{let r=d.Readable.fromWeb(i.body),a=(0,c.createWriteStream)(t);r.pipe(a),r.on(`error`,n),a.on(`finish`,()=>e(t))});{let e=yield i.arrayBuffer();return yield(0,l.writeFile)(t,Buffer.from(e)),t}}throw Error(`url: ${e}(${i.statusText})`)})}var v=[`jpg`,`png`],y=95;function b(e,t){let n=(0,u.extname)(e).slice(1)||`jpg`,{cut:r,size:i,format:a=n}=t,o=``;if(t.toFilename)o=t.toFilename(e,{cut:t.cut,size:t.size,format:t.format});else{let t=``,s=``,c=a;r&&(t=r.join(`x`)),i&&(s=`${i}x`),c===n&&!s&&!t&&(c=``),o=[e,t,s,c].filter(e=>e.length>0).join(`.`)}return o}function x(e,t){return p(this,void 0,void 0,function*(){let n=(0,u.extname)(e).slice(1)||`jpg`,{cut:r,size:i,format:a=n}=t,o=e;if((r||i)&&a!==n&&v.includes(a)){let n=b(e,{format:a,toFilename:t.toFilename});n!==o&&(0,c.existsSync)(n)&&(o=n)}let s=(0,f.default)(o);r&&(s=s.extract({left:r[0],top:r[1],width:r[2],height:r[3]})),i&&(s=s.resize(i)),s=s.toFormat(a,{quality:y});let l=b(e,t);return l!==e&&!(0,c.existsSync)(l)?s.toFile(l).then(()=>l):l})}function S(e){let t=[];if(e.content&&(e.content.uri?t.push(e.content.uri):e.content.url&&t.push(e.content.url)),e.children)for(let n of e.children){let e=S(n);if(e.length>0)for(let n=0;n<e.length;n++)t.push(e[n])}return t}function C(e,t,n){return p(this,void 0,void 0,function*(){let r=new URL(e,t).href,i=_(r,(0,u.join)(n.distPath,m(r,n.baseURL)),n.fetch);n.log(e=>`download: ${r} -> ${e}`,i),yield i,/\.json$/.test(e)&&(yield w(r,n))})}function w(e,t){return p(this,void 0,void 0,function*(){let n=new URL(`tileset_checksum.json`,e).href,r=(0,u.join)(t.distPath,m(n,t.baseURL)),i=null;try{let e=_(n,r,t.fetch);t.log(e=>`download: ${n} -> ${e}`,e),yield e;let{file_md5:a}=JSON.parse(yield(0,l.readFile)(r,`utf8`));if(typeof a==`object`){let e=Object.keys(a);e.length>0&&(i=e)}}catch(e){}if(i&&i.length>0){let e=[];for(let r of i){let i=new URL(r,n).href,a=_(i,(0,u.join)(t.distPath,m(i,t.baseURL)),t.fetch);if(t.log(e=>`download: ${i} -> ${e}`,a),e.push(a),e.length>=10){let t=e;e=[],yield Promise.all(t)}}yield Promise.all(e);return}let a=(0,u.join)(t.distPath,m(e,t.baseURL)),o=_(e,a,t.fetch);t.log(t=>`download: ${e} -> ${t}`,o),yield o;let s=JSON.parse(yield(0,l.readFile)(a,`utf8`));if(s.asset.overview){let n=new URL(s.asset.overview.imageFile,e).href,r=_(n,(0,u.join)(t.distPath,m(n,t.baseURL)),t.fetch);t.log(e=>`download: ${n} -> ${e}`,r),yield r}if(s.asset.trajectories)for(let n of s.asset.trajectories.list){let r=new URL(n.file,e).href,i=_(r,(0,u.join)(t.distPath,m(r,t.baseURL)),t.fetch);t.log(e=>`download: ${r} -> ${e}`,i),yield i}let c=S(s.root);for(let n=0;n<c.length;n+=6){let r=[];for(let i=0;i<6;i++){let a=c[n+i];if(a){let n=C(a,e,t);r.push(n)}}yield Promise.all(r)}})}function T(e,t){return p(this,void 0,void 0,function*(){if(t.log(`process model`),e.model){let{textures:n,layers:r,file:i,textureBase:a}=e.model;if(i){t.log(`process model file`);let r=e.getURL(i),o=_(r,(0,u.join)(t.distPath,m(r,t.baseURL)),t.fetch);if(t.log(e=>`download: ${i} -> ${e}`,o),yield o,n)for(let r of n){let n=h(e.getURL(a==null?``:a),r),i=(0,u.join)(t.distPath,m(n,t.baseURL)),o=_(n,i,t.fetch);t.log(e=>`download: ${n} -> ${e}`,o),yield o;let s=t.imageOptions.format;s.length===0&&s.push(void 0);let c=t.imageOptions.size;c.length===0&&c.push(void 0);let l=[];for(let e of s)for(let n of c){let r=x(i,{format:e,size:n,toFilename:t.imageProcessingFilename});t.log(e=>`imageProcessing: ${i} -> ${e}`,r),l.push(r)}yield Promise.all(l)}}if(r)for(let n of r){let{tileset:r}=n;t.log(`process model layer`),yield w(e.getURL(r),t)}}})}function E(e,t,n){return p(this,void 0,void 0,function*(){let r=(0,u.join)(n.distPath,m(e,n.baseURL)),i=_(e,r,n.fetch);n.log(t=>`download: ${e} -> ${t}`,i),yield i;let a=Math.pow(2,t.level),o=n.imageOptions.format;o.length===0&&o.push(void 0);let s=[];if(a>1)for(let e=0;e<a;e++)for(let i=0;i<a;i++)for(let c of o){let o=[t.size/a*i,t.size/a*e,t.size/a,t.size/a],l=x(r,{format:c,size:t.scale>=1?void 0:t.scale*t.size/a,cut:o,toFilename:n.imageProcessingFilename});if(n.log(e=>`imageProcessing: ${r} -> ${e}`,l),s.push(l),t.level===1&&t.scale>=.5&&(c===`jpg`||/\.jpg$/.test(r))){let e=x(r,{format:c,size:void 0,cut:o,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${r} -> ${e}`,e),s.push(e)}}yield Promise.all(s)})}function D(e,t){return p(this,void 0,void 0,function*(){yield Promise.all([E(e.work.getURL(e.front),e,t),E(e.work.getURL(e.back),e,t),E(e.work.getURL(e.left),e,t),E(e.work.getURL(e.right),e,t),E(e.work.getURL(e.up),e,t),E(e.work.getURL(e.down),e,t)])})}function O(e,t,n){return p(this,void 0,void 0,function*(){let r=(0,u.join)(n.distPath,m(e,n.baseURL)),i=_(e,r,n.fetch);n.log(t=>`download: ${e} -> ${t}`,i),yield i;let a=n.imageOptions.format;a.length===0&&a.push(void 0);let o=n.imageOptions.size;o.length===0&&o.push(void 0);for(let r of t){let t=e.replace(/cube\_\d+/,`cube_${r}`),i=(0,u.join)(n.distPath,m(t,n.baseURL)),o=_(t,i,n.fetch);n.log(e=>`download ${t} -> ${i}`,o),yield o;for(let e of a){let t=x(i,{format:e,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${i} -> ${e}`,t),yield t}}let s=[];for(let e of a)for(let t of o){let i=x(r,{format:e,size:t,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${r} -> ${e}`,i),s.push(i)}yield Promise.all(s)})}function k(e,t){return p(this,void 0,void 0,function*(){let{images:n}=e;yield Promise.all([O(n.work.getURL(n.front),n.sizeList,t),O(n.work.getURL(n.back),n.sizeList,t),O(n.work.getURL(n.left),n.sizeList,t),O(n.work.getURL(n.right),n.sizeList,t),O(n.work.getURL(n.up),n.sizeList,t),O(n.work.getURL(n.down),n.sizeList,t)]),n.tiles&&(yield Promise.all(n.tiles.map(e=>D(e,t))))})}function A(e,t){return p(this,void 0,void 0,function*(){let{observers:n}=e;for(let e of n){let n=k(e,t);t.log(`process observer #${e.index} derived: ${e.derivedIdStr}`,n),yield n}})}function j(e,t){if(t){let n=Date.now();t.then(t=>{let r=Date.now()-n,i=typeof e==`function`?e(t):e;console.log(i+`(${r}ms)`)}).catch(()=>{})}else{let t=typeof e==`function`?e(null):e;console.log(t)}}function M(e){return p(this,arguments,void 0,function*(e,t={}){var n,r,i,a,o,s,d,f,p,m;let h=e.baseURL,g=``;if(t.distPath)g=(0,u.resolve)(process.cwd(),t.distPath);else for(g=(0,u.resolve)(process.cwd(),(n=e.workCode)==null?`work-${Date.now()}`:n);(0,c.existsSync)(g);)/.-(\d+)$/.test(g)?g=g.replace(/.-(\d+)$/,(e,t)=>`-`+(Number(t)+1)):g+=`-1`;let _={baseURL:h,distPath:g,fetch:(r=t.fetch)==null?fetch:r,imageOptions:{size:(a=(i=t.imageOptions)==null?void 0:i.size)==null?[]:a,format:(s=(o=t.imageOptions)==null?void 0:o.format)==null?[]:s},textureOptions:{size:(f=(d=t.textureOptions)==null?void 0:d.size)==null?[]:f,format:(m=(p=t.textureOptions)==null?void 0:p.format)==null?[]:m},log:t.log?j:(()=>Promise.resolve()),imageProcessingFilename:t.imageProcessingFilename};_.log(JSON.stringify(_,null,` `)),yield(0,l.mkdir)(g,{recursive:!0}),yield(0,l.writeFile)((0,u.resolve)(g,`work.json`),JSON.stringify(e.toJSON(),null,` `)),yield A(e,_),yield T(e,_)})}exports.download=M;
|