@realsee/five 6.8.0-alpha.2 → 6.8.0-alpha.21
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 +4 -0
- package/AI_CONTEXT.md +4 -0
- package/README.md +9 -6
- package/{guides → ai_guides}/README.md +12 -2
- package/ai_guides/ai-doc-guidelines.md +102 -0
- package/{guides → ai_guides}/api.md +24 -1
- package/ai_guides/features/3dtile.md +172 -0
- package/{guides → ai_guides}/features/camera-animation.md +24 -3
- package/{guides → ai_guides}/features/clipper.md +2 -0
- package/{guides/features/coordnate-system.md → ai_guides/features/coordinate-system.md} +2 -0
- package/{guides → ai_guides}/features/event.md +2 -0
- package/{guides → ai_guides}/features/five.md +4 -0
- package/ai_guides/features/flowing-light-2d-pass.md +438 -0
- package/ai_guides/features/flowing-light-3d-pass.md +420 -0
- package/ai_guides/features/gaussian-blur-pass.md +202 -0
- package/{guides → ai_guides}/features/gesture.md +3 -0
- package/{guides → ai_guides}/features/get-screen-pixels.md +2 -0
- package/{guides → ai_guides}/features/image-options.md +3 -0
- package/{guides → ai_guides}/features/load-external-model.md +21 -0
- package/ai_guides/features/load-progress.md +140 -0
- package/ai_guides/features/material.md +153 -0
- package/{guides → ai_guides}/features/mode.md +4 -0
- package/{guides → ai_guides}/features/model.md +4 -1
- package/{guides → ai_guides}/features/move-pano-effect.md +2 -0
- package/{guides → ai_guides}/features/multi-work.md +2 -0
- package/ai_guides/features/pano-filter.md +148 -0
- package/{guides → ai_guides}/features/pano-tile.md +7 -14
- package/ai_guides/features/pano-uv.md +131 -0
- package/ai_guides/features/parameter.md +153 -0
- package/ai_guides/features/plugin.md +210 -0
- package/{guides → ai_guides}/features/postprocessing.md +39 -4
- package/{guides → ai_guides}/features/raycast.md +11 -0
- package/{guides → ai_guides}/features/request-proxy.md +2 -0
- package/{guides → ai_guides}/features/screen-project.md +2 -0
- package/{guides → ai_guides}/features/state.md +2 -0
- package/ai_guides/features/view-layer.md +187 -0
- package/{guides → ai_guides}/features/work.md +63 -2
- package/{guides → ai_guides}/glossary.md +26 -5
- package/{guides → ai_guides}/intro.md +1 -1
- package/{guides → ai_guides}/quick-start.md +1 -0
- package/ai_guides/release_notes/6.8.md +208 -0
- package/{guides → ai_guides}/template.md +17 -3
- package/docs/00_FOR_AI_AGENTS.md +11 -0
- package/docs/README.md +4 -7
- package/docs/assets/hierarchy.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.BoundingMesh.html +2 -2
- package/docs/classes/five.Camera.html +1 -1
- package/docs/classes/five.EyeDomeLightingPass.html +1 -1
- package/docs/classes/five.Five.html +73 -72
- 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 +31 -31
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- 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 +16 -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 -53
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +1 -1
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +30 -26
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Trajectory.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +27 -2
- 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 +1 -1
- 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 +1 -1
- 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.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 +1 -1
- package/docs/classes/vfx.ParticleGPU.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +11 -2
- package/docs/documents/ai-doc-guidelines.html +60 -15
- package/docs/documents/api.html +40 -15
- package/docs/documents/features_3dtile.html +142 -45
- package/docs/documents/features_camera-animation.html +62 -5
- package/docs/documents/features_clipper.html +3 -0
- package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +4 -1
- package/docs/documents/features_event.html +3 -0
- package/docs/documents/features_five.html +4 -0
- package/docs/documents/features_flowing-light-2d-pass.html +356 -0
- package/docs/documents/features_flowing-light-3d-pass.html +351 -0
- package/docs/documents/features_gaussian-blur-pass.html +182 -0
- package/docs/documents/features_gesture.html +4 -0
- package/docs/documents/features_get-screen-pixels.html +3 -0
- package/docs/documents/features_image-options.html +3 -0
- package/docs/documents/features_load-external-model.html +25 -2
- package/docs/documents/features_load-progress.html +110 -0
- package/docs/documents/features_material.html +341 -0
- package/docs/documents/features_mode.html +5 -0
- package/docs/documents/features_model.html +5 -1
- package/docs/documents/features_move-pano-effect.html +3 -0
- package/docs/documents/features_multi-work.html +3 -0
- package/docs/documents/features_pano-filter.html +122 -0
- package/docs/documents/features_pano-tile.html +34 -19
- package/docs/documents/features_pano-uv.html +82 -0
- package/docs/documents/features_parameter.html +76 -56
- package/docs/documents/features_plugin.html +105 -0
- package/docs/documents/features_postprocessing.html +22 -5
- package/docs/documents/features_raycast.html +4 -1
- package/docs/documents/features_request-proxy.html +3 -0
- package/docs/documents/features_screen-project.html +3 -0
- package/docs/documents/features_state.html +3 -0
- package/docs/documents/features_view-layer.html +158 -0
- package/docs/documents/features_work.html +63 -2
- package/docs/documents/glossary.html +31 -6
- package/docs/documents/intro.html +1 -1
- package/docs/documents/quick-start.html +1 -0
- package/docs/documents/release_notes_6.8.html +189 -0
- package/docs/documents/template.html +45 -4
- package/docs/functions/five.loadAt3d.html +1 -1
- package/docs/functions/five.loadB3dm.html +1 -1
- package/docs/functions/five.loadDome.html +1 -1
- package/docs/functions/five.loadDomez.html +1 -1
- package/docs/functions/five.loadFbx.html +1 -1
- package/docs/functions/five.loadGltf.html +1 -1
- package/docs/functions/five.loadPbm.html +1 -1
- package/docs/functions/five.loadPly.html +1 -1
- package/docs/functions/five.loadPnts.html +1 -1
- package/docs/functions/five.loadSplat.html +1 -1
- package/docs/functions/five.loadSpz.html +1 -1
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +11 -2
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +2 -2
- package/docs/interfaces/five.EventCallback.html +53 -47
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +2 -2
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +2 -2
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +4 -3
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModeChangeEvent.html +2 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +2 -2
- package/docs/interfaces/five.ModelSceneEvent.html +2 -2
- package/docs/interfaces/five.ModelTileEvent.html +8 -0
- package/docs/interfaces/five.MovePanoOptions.html +7 -7
- 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 +2 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +2 -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 +1 -1
- package/docs/interfaces/five.PanoEvent.html +2 -2
- package/docs/interfaces/five.PanoTextureEvent.html +2 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +56 -52
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +2 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +56 -52
- 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 +2 -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 +30 -26
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkModel.html +8 -8
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +27 -2
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorksEvent.html +2 -2
- package/docs/interfaces/five.XRControllerEvent.html +2 -2
- package/docs/interfaces/five.XRGestureEvent.html +2 -2
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +2 -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.DynamicPathLinePluginController.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
- 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.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +13 -13
- package/docs/modules/five.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +27 -25
- package/docs/types/five.EasingFunction.html +1 -0
- package/docs/types/five.EventTypes.html +27 -25
- package/docs/types/five.FivePlugin.html +1 -1
- package/docs/types/five.FivePluginInit.html +1 -1
- package/docs/types/five.FivePluginInstance.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- 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/plugins.BasePlugin.EventMap.html +1 -1
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/five/application/analysis.d.ts +40 -0
- package/five/application/controllers.d.ts +41 -0
- package/five/application/events-legacy.d.ts +454 -0
- package/five/application/events.d.ts +69 -0
- package/five/application/five.d.ts +519 -0
- package/five/application/fiveInitArgs.d.ts +176 -0
- package/five/application/fiveLoadOptions.d.ts +21 -0
- package/five/application/generateDefaultVideoElement.d.ts +2 -0
- package/five/application/getViewportScale.d.ts +2 -0
- package/five/application/initLights.d.ts +3 -0
- package/five/application/mode.d.ts +28 -0
- package/five/application/renderPoweredByRealsee.d.ts +3 -0
- package/five/assets/cardboard-png-data-url.d.ts +2 -0
- package/five/assets/gradient-png-data-url.d.ts +2 -0
- package/five/assets/loading-png-data-url.d.ts +2 -0
- package/five/assets/phone-png-data-url.d.ts +2 -0
- package/five/assets/realsee-png-data-url.d.ts +2 -0
- package/five/bvh/bvhMath.d.ts +33 -0
- package/five/bvh/bvhMesh.d.ts +7 -0
- package/five/bvh/bvhNode.d.ts +29 -0
- package/five/bvh/bvhObject.d.ts +18 -0
- package/five/bvh/bvhPoints.d.ts +6 -0
- package/five/bvh/index.d.ts +10 -0
- package/five/bvh/worker.d.ts +35 -0
- package/five/cardboard/helper.d.ts +2 -0
- package/five/cardboard/index.d.ts +13 -0
- package/five/cardboard/sensor.d.ts +158 -0
- package/five/certificates/hardware.d.ts +1 -0
- package/five/controllers/base.d.ts +167 -0
- package/five/controllers/events.d.ts +71 -0
- package/five/controllers/floorplan.d.ts +119 -0
- package/five/controllers/mapview.d.ts +139 -0
- package/five/controllers/model.d.ts +57 -0
- package/five/controllers/panorama.d.ts +143 -0
- package/five/controllers/panoramaLike.d.ts +87 -0
- package/five/controllers/topview.d.ts +42 -0
- package/five/controllers/vrPanorama.d.ts +56 -0
- package/five/controllers/xrPanorama.d.ts +81 -0
- package/five/core/camera.d.ts +65 -0
- package/five/core/internalWebGLRenderer.d.ts +14 -0
- package/five/core/panoVideo.d.ts +18 -0
- package/five/core/scene.d.ts +10 -0
- package/five/core/tiling.d.ts +43 -0
- package/five/declare.d.ts +2 -1
- package/five/gaussian-splatting/util/renderData.d.ts +52 -0
- package/five/gaussian-splatting/wasm/data.d.ts +20 -0
- package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
- package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
- package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
- package/five/index.d.ts +60 -4637
- package/five/index.js +193 -341
- package/five/index.mjs +26455 -31011
- package/five/meshes/boundingMesh.d.ts +12 -0
- package/five/meshes/intersectMesh.d.ts +8 -0
- package/five/meshes/panoCircleMesh.d.ts +35 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
- package/five/meshes/panoSphereMesh.d.ts +27 -0
- package/five/model/helpers/coordinate-transform.d.ts +3 -0
- package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
- package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
- package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
- package/five/model/index.d.ts +70 -0
- package/five/model/intersection.d.ts +18 -0
- package/five/model/loaders/at3d.d.ts +12 -0
- package/five/model/loaders/b3dm.d.ts +9 -0
- package/five/model/loaders/dome.d.ts +22 -0
- package/five/model/loaders/domez.d.ts +11 -0
- package/five/model/loaders/fbx.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
- package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
- package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
- package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
- package/five/model/loaders/gltf.d.ts +10 -0
- package/five/model/loaders/obj.d.ts +9 -0
- package/five/model/loaders/pbm.d.ts +26 -0
- package/five/model/loaders/ply.d.ts +24 -0
- package/five/model/loaders/pnts.d.ts +8 -0
- package/five/model/loaders/protobuf/dome.d.ts +540 -0
- package/five/model/loaders/protobuf/pbm.d.ts +203 -0
- package/five/model/loaders/shared.d.ts +16 -0
- package/five/model/loaders/splat.d.ts +8 -0
- package/five/model/loaders/spz.d.ts +14 -0
- package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
- package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
- package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
- package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
- package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
- package/five/model/loaders/x3p.d.ts +22 -0
- package/five/model/materials/pbmMaterial.d.ts +137 -0
- package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
- package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
- package/five/model/model-scene.d.ts +172 -0
- package/five/model/model.d.ts +209 -0
- package/five/model/objects/pbmContainer.d.ts +28 -0
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
- package/five/model/objects/pbmGroup.d.ts +8 -0
- package/five/model/objects/pbmMesh.d.ts +10 -0
- package/five/model/objects/pbmPointCloud.d.ts +7 -0
- package/five/model/parameter.d.ts +140 -0
- package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
- package/five/model/tile3d/header.d.ts +88 -0
- package/five/model/tile3d/index.d.ts +214 -0
- package/five/model/tile3d/tile-cache.d.ts +18 -0
- package/five/model/tile3d/tile-content.d.ts +10 -0
- package/five/model/tile3d/tile-node.d.ts +24 -0
- package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
- package/five/model/tile3d/tile.d.ts +79 -0
- package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
- package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
- package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
- package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
- package/five/model/tile3d/tileset.d.ts +69 -0
- package/five/model/tile3d/trajectory-content.d.ts +9 -0
- package/five/model/tile3d/trajectory-node.d.ts +15 -0
- package/five/model/tile3d/trajectory.d.ts +30 -0
- package/five/model/tile3d/types.d.ts +33 -0
- package/five/model/view-layer.d.ts +20 -0
- package/five/renderer/five-renderer.d.ts +17 -0
- package/five/renderer/index.d.ts +3 -0
- package/five/renderer/postprocessing/composer.d.ts +37 -0
- package/five/renderer/postprocessing/index.d.ts +7 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
- package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
- package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
- package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
- package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
- package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
- package/five/renderer/tools/full-screen-quad.d.ts +15 -0
- package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
- package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
- package/five/renderer/tools/render-full-screen.d.ts +2 -0
- package/five/texture/histogram.d.ts +54 -0
- package/five/texture/imageBitmap.d.ts +13 -0
- package/five/texture/initTexture.d.ts +3 -0
- package/five/texture/loader.d.ts +39 -0
- package/five/texture/textureData.d.ts +11 -0
- package/five/thirdparty/fflate.d.ts +1407 -0
- package/five/thirdparty/hammer.d.ts +375 -0
- package/five/thirdparty/jsrsasign.d.ts +753 -0
- package/five/thirdparty/meshopt_decoder.d.ts +15 -0
- package/five/three-version-check.d.ts +1 -0
- package/five/types/addableObject.d.ts +12 -0
- package/five/types/cube.d.ts +1 -0
- package/five/types/gestureInput.d.ts +24 -0
- package/five/types/imageOptions.d.ts +20 -0
- package/five/types/intersectMeshInterface.d.ts +8 -0
- package/five/types/movePanoEffect.d.ts +13 -0
- package/five/types/movePanoOptions.d.ts +36 -0
- package/five/types/panoCircleMeshInterface.d.ts +34 -0
- package/five/types/plugin.d.ts +25 -0
- package/five/types/pose.d.ts +17 -0
- package/five/types/state.d.ts +20 -0
- package/five/types/viewport.d.ts +22 -0
- package/five/utils/ajax.d.ts +66 -0
- package/five/utils/animationFrameLoop.d.ts +45 -0
- package/five/utils/array.d.ts +31 -0
- package/five/utils/asyncTaskQueue.d.ts +8 -0
- package/five/utils/bufferGeometry.d.ts +33 -0
- package/five/utils/calculateProgress.d.ts +39 -0
- package/five/utils/calculateThreeMouse.d.ts +13 -0
- package/five/utils/canplayVideo.d.ts +2 -0
- package/five/utils/clamp.d.ts +2 -0
- package/five/utils/clock.d.ts +17 -0
- package/five/utils/createSymbol.d.ts +5 -0
- package/five/utils/decodeText.d.ts +2 -0
- package/five/utils/deepEqual.d.ts +2 -0
- package/five/utils/deepFreeze.d.ts +2 -0
- package/five/utils/defineProperty.d.ts +9 -0
- package/five/utils/detector.d.ts +14 -0
- package/five/utils/distance.d.ts +10 -0
- package/five/utils/draco.d.ts +26 -0
- package/five/utils/easing.d.ts +63 -0
- package/five/utils/event.d.ts +159 -0
- package/five/utils/formatRad.d.ts +7 -0
- package/five/utils/imageSupport.d.ts +6 -0
- package/five/utils/imageURL.d.ts +42 -0
- package/five/utils/isEmptyObject.d.ts +2 -0
- package/five/utils/isNil.d.ts +6 -0
- package/five/utils/isNumber.d.ts +2 -0
- package/five/utils/isPowerOfTwo.d.ts +2 -0
- package/five/utils/isPromise.d.ts +2 -0
- package/five/utils/isSimilar.d.ts +6 -0
- package/five/utils/json.d.ts +7 -0
- package/five/utils/ktx2.d.ts +30 -0
- package/five/utils/lzma/index.d.ts +2 -0
- package/five/utils/lzma/lzma.d.ts +3 -0
- package/five/utils/lzma/lzmaWASM.d.ts +2 -0
- package/five/utils/lzma/lzmaWorker.d.ts +14 -0
- package/five/utils/memoryUsage.d.ts +29 -0
- package/five/utils/motion.d.ts +38 -0
- package/five/utils/noop.d.ts +6 -0
- package/five/utils/now.d.ts +7 -0
- package/five/utils/pano.d.ts +9 -0
- package/five/utils/pick.d.ts +3 -0
- package/five/utils/poseUtils.d.ts +5 -0
- package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
- package/five/utils/renderDepth.d.ts +2 -0
- package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
- package/five/utils/requestPermission.d.ts +3 -0
- package/five/utils/shaderContentFix.d.ts +7 -0
- package/five/utils/shaderMaterial.d.ts +20 -0
- package/five/utils/stateUtils.d.ts +5 -0
- package/five/utils/string-pattern.d.ts +8 -0
- package/five/utils/subscribe.d.ts +67 -0
- package/five/utils/tileCube.d.ts +19 -0
- package/five/utils/toFastProperties.d.ts +1 -0
- package/five/utils/typedCache.d.ts +10 -0
- package/five/utils/uniform.d.ts +15 -0
- package/five/utils/url.d.ts +35 -0
- package/five/utils/uuid.d.ts +5 -0
- package/five/utils/values.d.ts +2 -0
- package/five/utils/vectorCoordinates.d.ts +29 -0
- package/five/utils/volume.d.ts +111 -0
- package/five/utils/webglError.d.ts +7 -0
- package/five/utils/worker.d.ts +26 -0
- package/five/webxr/XRControllerModelFactory.d.ts +28 -0
- package/five/webxr/motionHelper.d.ts +68 -0
- package/five/webxr/xrButton.d.ts +4 -0
- package/five/webxr/xrController.d.ts +24 -0
- package/five/webxr/xrManager.d.ts +84 -0
- package/five/work/_ALLOW_HOST.d.ts +2 -0
- package/five/work/index.d.ts +6 -0
- package/five/work/keychain.d.ts +5 -0
- package/five/work/looseWorkType.d.ts +121 -0
- package/five/work/verify.d.ts +7 -0
- package/five/work/work.d.ts +236 -0
- package/five/work/workFetcher.d.ts +4 -0
- package/five/work/workJson.d.ts +3 -0
- package/five/work/workJsonType.d.ts +73 -0
- package/five/work/workObserverUtils.d.ts +36 -0
- package/five/work/workParser.d.ts +6 -0
- package/five/work/workResolvedObserver.d.ts +12 -0
- package/five/work/workVerify.d.ts +2 -0
- package/five/work/works.d.ts +10 -0
- package/gltf-loader/gltf-object.d.ts +17 -0
- package/gltf-loader/index.d.ts +60 -160
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
- package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
- package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
- package/line/circle_png.d.ts +1 -0
- package/line/index.d.ts +19 -69
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/line/utils/Line2.d.ts +7 -0
- package/line/utils/LineGeometry.d.ts +10 -0
- package/line/utils/LineMaterial.d.ts +20 -0
- package/line/utils/LineSegments2.d.ts +11 -0
- package/line/utils/LineSegmentsGeometry.d.ts +15 -0
- package/llms.txt +43 -31
- package/package.json +11 -2
- package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
- package/plugins/BackgroundPlugin/index.d.ts +5 -0
- package/plugins/BackgroundPlugin/typings.d.ts +44 -0
- package/plugins/BasePlugin/index.d.ts +119 -0
- package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
- package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
- package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
- package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
- package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
- package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
- package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
- package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
- package/plugins/ItemMaskPlugin/index.d.ts +5 -0
- package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
- package/plugins/OrientationPlugin/Controller.d.ts +82 -0
- package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
- package/plugins/OrientationPlugin/index.d.ts +6 -0
- package/plugins/OrientationPlugin/typing.d.ts +25 -0
- package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
- package/plugins/PanoAnimePlugin/index.d.ts +5 -0
- package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
- package/plugins/PluginTemplate/Controller.d.ts +27 -0
- package/plugins/PluginTemplate/index.d.ts +5 -0
- package/plugins/PluginTemplate/typing.d.ts +21 -0
- package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
- package/plugins/TrajectoryPlugin/index.d.ts +6 -0
- package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
- package/plugins/index.d.ts +9 -1102
- package/plugins/index.js +17 -21
- package/plugins/index.mjs +3342 -4245
- package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
- package/plugins/thirdParty/OrbitControls.d.ts +78 -0
- package/plugins/utils/absoluteUrl.d.ts +5 -0
- package/plugins/utils/clamp.d.ts +2 -0
- package/plugins/utils/loadImage.d.ts +1 -0
- package/plugins/utils/motion.d.ts +38 -0
- package/plugins/utils/now.d.ts +6 -0
- package/plugins/utils/uuid.d.ts +5 -0
- package/react/canvas.d.ts +19 -0
- package/react/context.d.ts +11 -0
- package/react/createProvider.d.ts +95 -0
- package/react/createStore.d.ts +144 -0
- package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
- package/react/hooks/useFiveAction.d.ts +147 -0
- package/react/hooks/useFiveCameraDirection.d.ts +7 -0
- package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
- package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
- package/react/hooks/useFiveCurrentState.d.ts +15 -0
- package/react/hooks/useFiveEventCallback.d.ts +12 -0
- package/react/hooks/useFiveFloor.d.ts +15 -0
- package/react/hooks/useFiveHelper.d.ts +14 -0
- package/react/hooks/useFiveModelBounding.d.ts +5 -0
- package/react/hooks/useFiveModelEffect.d.ts +14 -0
- package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
- package/react/hooks/useFiveModelReadyState.d.ts +8 -0
- package/react/hooks/useFiveProject2d.d.ts +20 -0
- package/react/hooks/useFiveSceneEffect.d.ts +21 -0
- package/react/hooks/useFiveState.d.ts +6 -0
- package/react/hooks/useFiveWork.d.ts +29 -0
- package/react/index.d.ts +24 -830
- package/react/index.js +3 -3
- package/react/index.mjs +572 -783
- package/react/rendererPool.d.ts +7 -0
- package/react/withFive.d.ts +213 -0
- package/shader-lib/EvenessPlane/index.d.ts +10 -0
- package/shader-lib/PointCloudExpand/index.d.ts +59 -0
- package/shader-lib/PolygonCuter/index.d.ts +52 -0
- package/shader-lib/PolygonCuter/worker.d.ts +14 -0
- package/shader-lib/ShineModel/index.d.ts +7 -0
- package/shader-lib/SweepModel/index.d.ts +7 -0
- package/shader-lib/index.d.ts +5 -86
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/geometry.d.ts +3 -0
- package/sticker/index.d.ts +68 -71
- 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 +17 -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 +188 -336
- package/vfx/airflow/airflow.d.ts +18 -0
- package/vfx/airflow/fragment-shader.d.ts +2 -0
- package/vfx/airflow/vertex-shader.d.ts +2 -0
- package/vfx/common/scale-shader.d.ts +2 -0
- package/vfx/common/simplex-noise-shader.d.ts +2 -0
- package/vfx/frame/fragment-shader.d.ts +2 -0
- package/vfx/frame/frame.d.ts +22 -0
- package/vfx/frame/vertex-shader.d.ts +2 -0
- package/vfx/index.d.ts +7 -363
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vfx/particle/fragment-shader.d.ts +2 -0
- package/vfx/particle/instance.d.ts +36 -0
- package/vfx/particle/particle.d.ts +205 -0
- package/vfx/particle/utils.d.ts +11 -0
- package/vfx/particle/vertex-shader.d.ts +2 -0
- package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
- package/vfx/particle-gpu/instance.d.ts +36 -0
- package/vfx/particle-gpu/particle.d.ts +95 -0
- package/vfx/particle-gpu/utils.d.ts +11 -0
- package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
- package/vfx/spotLight/fragment-shader.d.ts +2 -0
- package/vfx/spotLight/spotLight.d.ts +15 -0
- package/vfx/spotLight/vertex-shader.d.ts +2 -0
- package/vue/context.d.ts +7 -0
- package/vue/hooks/FiveCanvas.d.ts +36 -0
- package/vue/hooks/FiveProvider.d.ts +35 -0
- package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
- package/vue/hooks/useFiveAction.d.ts +178 -0
- package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
- package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
- package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
- package/vue/hooks/useFiveCurrentState.d.ts +16 -0
- package/vue/hooks/useFiveEventCallback.d.ts +11 -0
- package/vue/hooks/useFiveFloor.d.ts +16 -0
- package/vue/hooks/useFiveHelper.d.ts +15 -0
- package/vue/hooks/useFiveModel.d.ts +7 -0
- package/vue/hooks/useFiveModelBounding.d.ts +7 -0
- package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
- package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
- package/vue/hooks/useFiveProject2d.d.ts +26 -0
- package/vue/hooks/useFiveScene.d.ts +6 -0
- package/vue/hooks/useFiveState.d.ts +16 -0
- package/vue/hooks/useFiveWork.d.ts +30 -0
- package/vue/index.d.ts +23 -467
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/vue/rendererPool.d.ts +10 -0
- package/work-downloader/components/model-3d-tile.d.ts +2 -0
- package/work-downloader/components/model.d.ts +3 -0
- package/work-downloader/components/observer.d.ts +7 -0
- package/work-downloader/download.d.ts +16 -0
- package/work-downloader/index.d.ts +2 -33
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +317 -556
- package/work-downloader/type.d.ts +28 -0
- package/work-downloader/utils/download-to-file.d.ts +1 -0
- package/work-downloader/utils/image-processing.d.ts +7 -0
- package/work-downloader/utils/join-url.d.ts +2 -0
- package/work-downloader/utils/log.d.ts +1 -0
- package/work-downloader/utils/relative-url.d.ts +1 -0
- package/docs/documents/five.FivePlugin.plugin.html +0 -60
- package/docs/documents/plugin.html +0 -60
- package/docs/media/five.ts +0 -2881
- package/docs/media/pass.ts +0 -64
- package/guides/ai-doc-guidelines.md +0 -72
- package/guides/features/3dtile.md +0 -264
- package/guides/features/parameter.md +0 -178
- package/guides/plugin.md +0 -206
- /package/{guides → ai_guides}/release_notes/6.6.md +0 -0
- /package/{guides → ai_guides}/release_notes/6.7.md +0 -0
- /package/{guides → ai_guides}/support.md +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ModelOptions } from "../model";
|
|
2
|
+
import { MovePanoEffect } from '../types/movePanoEffect';
|
|
3
|
+
export interface FiveLoadOptions {
|
|
4
|
+
/** 替换 / 追加 */
|
|
5
|
+
mode?: 'replace' | "add";
|
|
6
|
+
/** 切换运动时间 */
|
|
7
|
+
duration?: number;
|
|
8
|
+
/** 切换运动全景图效果 */
|
|
9
|
+
effect?: MovePanoEffect;
|
|
10
|
+
model?: ModelOptions;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
* 请通过 model.textureOptions 设置
|
|
14
|
+
*/
|
|
15
|
+
textureOptions?: ModelOptions['textureOptions'];
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated
|
|
18
|
+
* 请通过 model.textureOptions 设置
|
|
19
|
+
*/
|
|
20
|
+
"3d-tiles"?: ModelOptions['3d-tiles'];
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
3
|
+
* - **Panorama**: 全景图游走模式
|
|
4
|
+
* - **Model**: 模型游走模式
|
|
5
|
+
* - **Floorplan**: 模型查看模式
|
|
6
|
+
* - **Topview**: 户型图模式
|
|
7
|
+
* - **Mapview**: 地图模式
|
|
8
|
+
* - **VRPanorama**: VR眼镜模式
|
|
9
|
+
*/
|
|
10
|
+
type Mode =
|
|
11
|
+
/** 模型查看模式 */
|
|
12
|
+
"Floorplan" |
|
|
13
|
+
/** 户型图模式 */
|
|
14
|
+
"Topview" |
|
|
15
|
+
/** 地图模式 */
|
|
16
|
+
"Mapview" |
|
|
17
|
+
/** 全景图游走模式 */
|
|
18
|
+
"Panorama" |
|
|
19
|
+
/** VR眼镜模式 */
|
|
20
|
+
"VRPanorama" |
|
|
21
|
+
/** 模型游走模式 */
|
|
22
|
+
"Model" |
|
|
23
|
+
/** XR眼镜模式*/
|
|
24
|
+
"XRPanorama";
|
|
25
|
+
declare function isThirdPersonMode(mode: Mode): boolean;
|
|
26
|
+
declare function isFristPersonMode(mode: Mode): boolean;
|
|
27
|
+
export { isFristPersonMode, isThirdPersonMode };
|
|
28
|
+
export type { Mode };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare class BVHVector3 {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
z: number;
|
|
5
|
+
constructor(x: number, y: number, z: number);
|
|
6
|
+
copy(v: BVHVector3): this;
|
|
7
|
+
set(x: number, y: number, z: number): this;
|
|
8
|
+
fromArray(array: number[], firstElementPos?: number): this;
|
|
9
|
+
toArray(array?: number[], offset?: number): number[];
|
|
10
|
+
add(v: BVHVector3): this;
|
|
11
|
+
multiplyScalar(scalar: number): this;
|
|
12
|
+
subVectors(a: BVHVector3, b: BVHVector3): this;
|
|
13
|
+
addScaledVector(v: BVHVector3, s: number): this;
|
|
14
|
+
dot(v: BVHVector3): number;
|
|
15
|
+
cross(v: BVHVector3): this;
|
|
16
|
+
crossVectors(a: BVHVector3, b: BVHVector3): this;
|
|
17
|
+
distanceTo(v: BVHVector3): number;
|
|
18
|
+
distanceToSquared(v: BVHVector3): number;
|
|
19
|
+
clone(): BVHVector3;
|
|
20
|
+
}
|
|
21
|
+
export declare class BVHIntersect {
|
|
22
|
+
pointA: BVHVector3;
|
|
23
|
+
pointB: BVHVector3;
|
|
24
|
+
pointC: BVHVector3;
|
|
25
|
+
index: number;
|
|
26
|
+
intersectionPoint: BVHVector3;
|
|
27
|
+
constructor(pointA: BVHVector3, pointB: BVHVector3, pointC: BVHVector3, index: number, intersectionPoint: BVHVector3);
|
|
28
|
+
}
|
|
29
|
+
export declare class BVHBox3 {
|
|
30
|
+
min: BVHVector3;
|
|
31
|
+
max: BVHVector3;
|
|
32
|
+
constructor(min: BVHVector3, max: BVHVector3);
|
|
33
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BVHObject } from './bvhObject';
|
|
2
|
+
import { BVHVector3, BVHIntersect } from './bvhMath';
|
|
3
|
+
export declare class BVHMesh extends BVHObject {
|
|
4
|
+
createTree(maxTrianglesPerNode: number, maxDepth: number, extents?: number[]): this;
|
|
5
|
+
trianglesInSphere(center: BVHVector3, radius: number): Float32Array;
|
|
6
|
+
intersectRay(rayOrigin: BVHVector3, rayDirection: BVHVector3, threshold?: number, onlyFirst?: boolean, filter?: (intersect: BVHIntersect) => boolean): BVHIntersect[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BVHVector3, BVHBox3 } from "./bvhMath";
|
|
2
|
+
/**
|
|
3
|
+
* A node in the BVH structure
|
|
4
|
+
* @param extents - the min coords of this node's bounding box
|
|
5
|
+
* @param startIndex - an index in the bbox array, where the first element of this node is located
|
|
6
|
+
* @param endIndex - an index in the bbox array, where the last of this node is located, plus 1 (meaning that its non-inclusive).
|
|
7
|
+
* @param level - distance of this node from the root for the bvh tree. root node has level=0, its children have level=1 etc.
|
|
8
|
+
*/
|
|
9
|
+
export declare class BVHNode {
|
|
10
|
+
id: number;
|
|
11
|
+
extents: number[];
|
|
12
|
+
startIndex: number;
|
|
13
|
+
endIndex: number;
|
|
14
|
+
deepth: number;
|
|
15
|
+
node0?: BVHNode;
|
|
16
|
+
node1?: BVHNode;
|
|
17
|
+
constructor(id: number, extents: number[], startIndex: number, endIndex: number, deepth: number);
|
|
18
|
+
}
|
|
19
|
+
export declare const BYTES_PER_NODE: number;
|
|
20
|
+
export declare function packBVHNode(root: BVHNode, length: number): ArrayBuffer;
|
|
21
|
+
export declare function containsNodeBox(point: BVHVector3, box: BVHBox3, threshold?: number): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 计算射线和 BVHNode 的相交
|
|
24
|
+
* @param rayOrigin - 射线原点
|
|
25
|
+
* @param invRayDirection - 1 / 射线方向
|
|
26
|
+
* @param node - BVHNode
|
|
27
|
+
* @param threshold - 扩大
|
|
28
|
+
*/
|
|
29
|
+
export declare function intersectNodeBox(rayOrigin: BVHVector3, invRayDirection: BVHVector3, box: BVHBox3, threshold?: number): number | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BVHVector3, BVHIntersect } from './bvhMath';
|
|
2
|
+
export type BVHAttr = {
|
|
3
|
+
array: ArrayLike<number>;
|
|
4
|
+
stride?: number;
|
|
5
|
+
offset?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare class BVHObject {
|
|
8
|
+
position: BVHAttr;
|
|
9
|
+
indices?: BVHAttr;
|
|
10
|
+
rootNodePacked?: ArrayBuffer;
|
|
11
|
+
offsetArray?: ArrayLike<number>;
|
|
12
|
+
constructor(position: BVHAttr, indices?: BVHAttr);
|
|
13
|
+
getPositionCount(): number;
|
|
14
|
+
getPositionByIndex(index: number, target: BVHVector3): BVHVector3;
|
|
15
|
+
createTree(maxTrianglesPerNode: number, maxDepth: number, extents?: number[]): this;
|
|
16
|
+
trianglesInSphere(center: BVHVector3, radius: number): Float32Array;
|
|
17
|
+
intersectRay(rayOrigin: BVHVector3, rayDirection: BVHVector3, threshold?: number, onlyFirst?: boolean, filter?: (intersect: BVHIntersect) => boolean): BVHIntersect[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BVHObject } from './bvhObject';
|
|
2
|
+
import { BVHVector3, BVHIntersect } from './bvhMath';
|
|
3
|
+
export declare class BVHPoints extends BVHObject {
|
|
4
|
+
createTree(maxPointsPerNode: number, maxDepth: number, extents?: number[]): this;
|
|
5
|
+
intersectRay(rayOrigin: BVHVector3, rayDirection: BVHVector3, threshold?: number, onlyFirst?: boolean, filter?: (intersect: BVHIntersect) => boolean): BVHIntersect[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { BVHMesh } from './bvhMesh';
|
|
3
|
+
import { BVHPoints } from './bvhPoints';
|
|
4
|
+
export declare function getBvhTreeForMesh(mesh: THREE.Mesh): BVHMesh | null;
|
|
5
|
+
export declare function bindBvhTreeForMesh(mesh: THREE.Mesh, bvh: BVHMesh): void;
|
|
6
|
+
export declare function unbindBvhTreeForMesh(mesh: THREE.Mesh, bvh: BVHMesh): void;
|
|
7
|
+
export declare function getBvhTreeForPoints(mesh: THREE.Points): BVHPoints | null;
|
|
8
|
+
export declare function bindBvhTreeForPoints(points: THREE.Points, bvh: BVHPoints): void;
|
|
9
|
+
export declare function unbindBvhTreeForPoints(mesh: THREE.Points): void;
|
|
10
|
+
export declare function generateBvhTree<T extends THREE.Object3D>(obj: T, useWorker?: boolean, maxItemPerNode?: number, maxTreeDepth?: number): Promise<T>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { WorkerType } from '../utils/worker';
|
|
2
|
+
export type BVHWorkerType = WorkerType<{
|
|
3
|
+
type: 'mesh' | 'points';
|
|
4
|
+
attributes: {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
array: ArrayLike<number>;
|
|
7
|
+
stride?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
indices?: {
|
|
12
|
+
array: ArrayLike<number>;
|
|
13
|
+
stride?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
};
|
|
16
|
+
maxItemPerNode: number;
|
|
17
|
+
maxTreeDepth: number;
|
|
18
|
+
extents?: number[];
|
|
19
|
+
}[], {
|
|
20
|
+
type: 'mesh' | 'points';
|
|
21
|
+
attributes: {
|
|
22
|
+
[key: string]: {
|
|
23
|
+
array: ArrayLike<number>;
|
|
24
|
+
stride?: number;
|
|
25
|
+
offset?: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
indices?: {
|
|
29
|
+
array: ArrayLike<number>;
|
|
30
|
+
stride?: number;
|
|
31
|
+
offset?: number;
|
|
32
|
+
};
|
|
33
|
+
rootNodePacked: ArrayBuffer;
|
|
34
|
+
offsetArray: ArrayLike<number>;
|
|
35
|
+
}[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { Sensor } from "./sensor";
|
|
3
|
+
declare class Cardboard {
|
|
4
|
+
renderer: THREE.WebGLRenderer;
|
|
5
|
+
sensor: Sensor;
|
|
6
|
+
scale: number;
|
|
7
|
+
private cameraL;
|
|
8
|
+
private cameraR;
|
|
9
|
+
constructor(renderer: THREE.WebGLRenderer);
|
|
10
|
+
render(scene: THREE.Scene, camera: THREE.Camera): void;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
export { Cardboard };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
declare class SensorSample {
|
|
3
|
+
sample: THREE.Vector3;
|
|
4
|
+
timestampS: number;
|
|
5
|
+
constructor(sample?: THREE.Vector3, timestampS?: number);
|
|
6
|
+
set(sample: THREE.Vector3, timestampS: number): void;
|
|
7
|
+
copy(sensorSample: SensorSample): void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* An implementation of a simple complementary filter, which fuses gyroscope and
|
|
11
|
+
* accelerometer data from the 'devicemotion' event.
|
|
12
|
+
*
|
|
13
|
+
* Accelerometer data is very noisy, but stable over the long term.
|
|
14
|
+
* Gyroscope data is smooth, but tends to drift over the long term.
|
|
15
|
+
*
|
|
16
|
+
* This fusion is relatively simple:
|
|
17
|
+
* 1. Get orientation estimates from accelerometer by applying a low-pass filter
|
|
18
|
+
* on that data.
|
|
19
|
+
* 2. Get orientation estimates from gyroscope by integrating over time.
|
|
20
|
+
* 3. Combine the two estimates, weighing (1) in the long term, but (2) for the
|
|
21
|
+
* short term.
|
|
22
|
+
*/
|
|
23
|
+
declare class ComplementaryFilter {
|
|
24
|
+
kFilter: number;
|
|
25
|
+
isDebug: boolean;
|
|
26
|
+
currentAccelMeasurement: SensorSample;
|
|
27
|
+
currentGyroMeasurement: SensorSample;
|
|
28
|
+
previousGyroMeasurement: SensorSample;
|
|
29
|
+
filterQ: THREE.Quaternion;
|
|
30
|
+
previousFilterQ: THREE.Quaternion;
|
|
31
|
+
accelQ: THREE.Quaternion;
|
|
32
|
+
isOrientationInitialized: boolean;
|
|
33
|
+
estimatedGravity: THREE.Vector3;
|
|
34
|
+
measuredGravity: THREE.Vector3;
|
|
35
|
+
gyroIntegralQ: THREE.Quaternion;
|
|
36
|
+
constructor(kFilter: number, isDebug: boolean);
|
|
37
|
+
addAccelMeasurement(vector: THREE.Vector3, timestampS: number): void;
|
|
38
|
+
addGyroMeasurement(vector: THREE.Vector3, timestampS: number): void;
|
|
39
|
+
getOrientation(): THREE.Quaternion;
|
|
40
|
+
private run_;
|
|
41
|
+
private accelToQuaternion_;
|
|
42
|
+
private gyroToQuaternionDelta_;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Given an orientation and the gyroscope data, predicts the future orientation
|
|
46
|
+
* of the head. This makes rendering appear faster.
|
|
47
|
+
*
|
|
48
|
+
* Also see: http://msl.cs.uiuc.edu/~lavalle/papers/LavYerKatAnt14.pdf
|
|
49
|
+
*
|
|
50
|
+
* @param predictionTimeS - time from head movement to the appearance of
|
|
51
|
+
* the corresponding image.
|
|
52
|
+
*/
|
|
53
|
+
declare class PosePredictor {
|
|
54
|
+
predictionTimeS: number;
|
|
55
|
+
isDebug: boolean;
|
|
56
|
+
previousQ: THREE.Quaternion;
|
|
57
|
+
previousTimestampS: number | null;
|
|
58
|
+
deltaQ: THREE.Quaternion;
|
|
59
|
+
outQ: THREE.Quaternion;
|
|
60
|
+
constructor(predictionTimeS: number, isDebug: boolean);
|
|
61
|
+
getPrediction(currentQ: THREE.Quaternion, gyro: THREE.Vector3, timestampS: number): THREE.Quaternion;
|
|
62
|
+
}
|
|
63
|
+
declare class Pose {
|
|
64
|
+
angularAcceleration: Float32Array | null;
|
|
65
|
+
angularVelocity: Float32Array | null;
|
|
66
|
+
linearAcceleration: Float32Array | null;
|
|
67
|
+
linearVelocity: Float32Array | null;
|
|
68
|
+
orientation: Float32Array | null;
|
|
69
|
+
position: Float32Array | null;
|
|
70
|
+
constructor();
|
|
71
|
+
}
|
|
72
|
+
declare class FrameData {
|
|
73
|
+
leftProjectionMatrix: Float32Array;
|
|
74
|
+
leftViewMatrix: Float32Array;
|
|
75
|
+
pose: Pose;
|
|
76
|
+
rightProjectionMatrix: Float32Array;
|
|
77
|
+
rightViewMatrix: Float32Array;
|
|
78
|
+
timestamp: number;
|
|
79
|
+
constructor();
|
|
80
|
+
}
|
|
81
|
+
declare class FieldOfView {
|
|
82
|
+
leftDegrees: number;
|
|
83
|
+
rightDegrees: number;
|
|
84
|
+
upDegrees: number;
|
|
85
|
+
downDegrees: number;
|
|
86
|
+
constructor();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The pose sensor, implemented using DeviceMotion APIs.
|
|
90
|
+
*/
|
|
91
|
+
declare class Sensor {
|
|
92
|
+
viewer: {
|
|
93
|
+
id?: string;
|
|
94
|
+
label?: string;
|
|
95
|
+
fov: number;
|
|
96
|
+
interLensDistance: number;
|
|
97
|
+
baselineLensDistance: number;
|
|
98
|
+
screenLensDistance: number;
|
|
99
|
+
distortionCoefficients: [number, number];
|
|
100
|
+
inverseCoefficients: number[];
|
|
101
|
+
};
|
|
102
|
+
device: {
|
|
103
|
+
widthMeters: number;
|
|
104
|
+
heightMeters: number;
|
|
105
|
+
bevelMeters: number;
|
|
106
|
+
};
|
|
107
|
+
depthNear: number;
|
|
108
|
+
depthFar: number;
|
|
109
|
+
yawOnly: boolean;
|
|
110
|
+
accelerometer: THREE.Vector3;
|
|
111
|
+
gyroscope: THREE.Vector3;
|
|
112
|
+
filter: ComplementaryFilter;
|
|
113
|
+
posePredictor: PosePredictor;
|
|
114
|
+
isFirefoxAndroid: boolean;
|
|
115
|
+
isIOS: boolean;
|
|
116
|
+
isDeviceMotionInRadians: boolean;
|
|
117
|
+
isWithoutDeviceMotion: boolean;
|
|
118
|
+
filterToWorldQ: THREE.Quaternion;
|
|
119
|
+
inverseWorldToScreenQ: THREE.Quaternion;
|
|
120
|
+
worldToScreenQ: THREE.Quaternion;
|
|
121
|
+
originalPoseAdjustQ: THREE.Quaternion;
|
|
122
|
+
resetQ: THREE.Quaternion;
|
|
123
|
+
private previousTimestampS;
|
|
124
|
+
private orientationOut_;
|
|
125
|
+
private _deviceOrientationQ?;
|
|
126
|
+
private deviceOrientationFixQ?;
|
|
127
|
+
private deviceOrientationFilterToWorldQ?;
|
|
128
|
+
constructor(kFilter: number, predictionTime: number, yawOnly: boolean, isDebug: boolean);
|
|
129
|
+
getPosition(): any;
|
|
130
|
+
getOrientation(): Float32Array<ArrayBufferLike>;
|
|
131
|
+
getPose(): Pose;
|
|
132
|
+
resetPose(): void;
|
|
133
|
+
getFrameData(frameData: FrameData): FrameData;
|
|
134
|
+
start(): () => void;
|
|
135
|
+
getEyeOffset(): {
|
|
136
|
+
left: number[];
|
|
137
|
+
right: number[];
|
|
138
|
+
};
|
|
139
|
+
getEyeProjectionMatrix(): {
|
|
140
|
+
left: number[];
|
|
141
|
+
right: number[];
|
|
142
|
+
};
|
|
143
|
+
getEyeFieldOfView(): {
|
|
144
|
+
left: FieldOfView;
|
|
145
|
+
right: FieldOfView;
|
|
146
|
+
};
|
|
147
|
+
private onDeviceOrientation_;
|
|
148
|
+
private onDeviceMotion_;
|
|
149
|
+
private updateDeviceMotion_;
|
|
150
|
+
private onOrientationChange_;
|
|
151
|
+
/**
|
|
152
|
+
* This is only needed if we are in an cross origin iframe on iOS to work around
|
|
153
|
+
* this issue: https://bugs.webkit.org/show_bug.cgi?id=152299.
|
|
154
|
+
*/
|
|
155
|
+
private onMessage_;
|
|
156
|
+
private setScreenTransform_;
|
|
157
|
+
}
|
|
158
|
+
export { Sensor, Pose, FrameData, FieldOfView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { Camera, CameraPose } from "../core/camera";
|
|
3
|
+
import { Scene } from "../core/scene";
|
|
4
|
+
import { ModelScene } from "../model";
|
|
5
|
+
import { Mode } from "../application/mode";
|
|
6
|
+
import { Pano } from "../utils/pano";
|
|
7
|
+
import { GestureEvent } from '../utils/event';
|
|
8
|
+
import { Works } from "../work";
|
|
9
|
+
import { State } from "../types/state";
|
|
10
|
+
import { Pose } from "../types/pose";
|
|
11
|
+
import { Viewport } from "../types/viewport";
|
|
12
|
+
import { ImageOptions } from "../types/imageOptions";
|
|
13
|
+
import { MovePanoEffect } from "../types/movePanoEffect";
|
|
14
|
+
import { Subscribe } from "../utils/subscribe";
|
|
15
|
+
import { ControllerEventTypes } from "./events";
|
|
16
|
+
import { Motion } from "../utils/motion";
|
|
17
|
+
type CameraMotion = Motion<"longitude" | "latitude" | "fov">;
|
|
18
|
+
type PostProcessingType = 'edl' | 'hq' | 'luminance' | null;
|
|
19
|
+
interface BaseControllerInitArgs {
|
|
20
|
+
fiveId: string;
|
|
21
|
+
works: Works;
|
|
22
|
+
scene: Scene;
|
|
23
|
+
modelScene: ModelScene;
|
|
24
|
+
xrCustomObjectsScene: THREE.Scene;
|
|
25
|
+
helper: THREE.Group;
|
|
26
|
+
camera: Camera;
|
|
27
|
+
renderer: THREE.WebGLRenderer;
|
|
28
|
+
viewport: Viewport;
|
|
29
|
+
element: HTMLElement;
|
|
30
|
+
extraElements: HTMLElement[];
|
|
31
|
+
imageOptions: ImageOptions;
|
|
32
|
+
enableWheel: boolean;
|
|
33
|
+
videoTexture: THREE.VideoTexture;
|
|
34
|
+
initial: {
|
|
35
|
+
/** 初始化状态 */
|
|
36
|
+
state: Partial<State>;
|
|
37
|
+
currentState: State;
|
|
38
|
+
/** 状态切换动画时长 */
|
|
39
|
+
duration: number;
|
|
40
|
+
/** 动画模式 */
|
|
41
|
+
effect: MovePanoEffect;
|
|
42
|
+
/** 是否是用户触发的 */
|
|
43
|
+
userAction: boolean;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
declare class BaseController extends Subscribe<ControllerEventTypes> implements BaseControllerInitArgs {
|
|
47
|
+
mode: Mode;
|
|
48
|
+
fiveId: string;
|
|
49
|
+
needsRender: boolean;
|
|
50
|
+
destroyed: boolean;
|
|
51
|
+
cameraMotion: CameraMotion;
|
|
52
|
+
userAction: boolean;
|
|
53
|
+
/** 资源等待中 */
|
|
54
|
+
pending: Set<string>;
|
|
55
|
+
scene: Scene;
|
|
56
|
+
modelScene: ModelScene;
|
|
57
|
+
xrCustomObjectsScene: THREE.Scene;
|
|
58
|
+
helper: THREE.Group;
|
|
59
|
+
camera: Camera;
|
|
60
|
+
renderer: THREE.WebGLRenderer;
|
|
61
|
+
viewport: Viewport;
|
|
62
|
+
element: HTMLElement;
|
|
63
|
+
works: Works;
|
|
64
|
+
imageOptions: ImageOptions;
|
|
65
|
+
videoTexture: THREE.VideoTexture;
|
|
66
|
+
extraElements: HTMLElement[];
|
|
67
|
+
enableWheel: boolean;
|
|
68
|
+
initial: {
|
|
69
|
+
state: Partial<State>;
|
|
70
|
+
currentState: State;
|
|
71
|
+
duration: number;
|
|
72
|
+
effect: MovePanoEffect;
|
|
73
|
+
userAction: boolean;
|
|
74
|
+
};
|
|
75
|
+
currentPano: Pano;
|
|
76
|
+
protected panState?: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
defaultPrevented: boolean;
|
|
80
|
+
pointerLength: number;
|
|
81
|
+
};
|
|
82
|
+
protected pressState?: {
|
|
83
|
+
event: GestureEvent;
|
|
84
|
+
timeStamp: number;
|
|
85
|
+
stop: () => void;
|
|
86
|
+
};
|
|
87
|
+
protected pinchState?: {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
};
|
|
91
|
+
protected mouseWheelState?: {
|
|
92
|
+
timer: any;
|
|
93
|
+
};
|
|
94
|
+
protected mouseMoveState?: {
|
|
95
|
+
event: GestureEvent;
|
|
96
|
+
timeStamp: number;
|
|
97
|
+
};
|
|
98
|
+
/** 相机旋转是否在惯性运动 */
|
|
99
|
+
protected inMomentumMovement: {
|
|
100
|
+
uuid: string;
|
|
101
|
+
event?: GestureEvent;
|
|
102
|
+
} | null;
|
|
103
|
+
protected initAnimationReady: Promise<void>;
|
|
104
|
+
protected initAnimationIsReady: boolean;
|
|
105
|
+
private eventUnbinds;
|
|
106
|
+
static parseArgs(args: BaseControllerInitArgs): Required<BaseControllerInitArgs>;
|
|
107
|
+
static initAnimationEndState(args: BaseControllerInitArgs): State;
|
|
108
|
+
constructor(args: BaseControllerInitArgs);
|
|
109
|
+
/** 动态更新配置 */
|
|
110
|
+
updateConfiguration(args: {}): boolean;
|
|
111
|
+
/** 析构函数 */
|
|
112
|
+
destroy(): void;
|
|
113
|
+
/** 是否准备好,即不在用户操作中,并且不再动画中 */
|
|
114
|
+
isReady(): boolean;
|
|
115
|
+
bindExtraElement(element: HTMLElement): void;
|
|
116
|
+
unbindExtraElement(element: HTMLElement): void;
|
|
117
|
+
/** 生命周期: 更新模型 */
|
|
118
|
+
updateModel(modelScene: ModelScene): void;
|
|
119
|
+
/** 生命周期: 更新 Work */
|
|
120
|
+
updateWork(works: Works, state: Partial<State>, options: {
|
|
121
|
+
duration: number;
|
|
122
|
+
effect: MovePanoEffect;
|
|
123
|
+
}, userAction: boolean): boolean;
|
|
124
|
+
/** 生命周期: 更新当前时间 */
|
|
125
|
+
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
126
|
+
/** 生命周期: 更新渲染 */
|
|
127
|
+
render(): boolean;
|
|
128
|
+
/** 转动摄像头 */
|
|
129
|
+
updateCamera(pose: Partial<Pose>, duration: number, userAction: boolean): Promise<void>;
|
|
130
|
+
/** 通过帧动画转动摄像头 */
|
|
131
|
+
updateCameraWithKeyframes(keyframes: {
|
|
132
|
+
progress: number;
|
|
133
|
+
value: Pose;
|
|
134
|
+
key?: string;
|
|
135
|
+
}[], duration: number, userAction: boolean): Promise<void>;
|
|
136
|
+
/** 获取目标姿态 */
|
|
137
|
+
getTargetState(): State;
|
|
138
|
+
/** 初始化动画 */
|
|
139
|
+
protected initAnimation(): Promise<void>;
|
|
140
|
+
/** 改变相机 */
|
|
141
|
+
protected setCamera(cameraPose?: Partial<CameraPose>): void;
|
|
142
|
+
stopMomentumMovement(): void;
|
|
143
|
+
/** 用户 Pan 事件 */
|
|
144
|
+
protected onPanGesture(event: GestureEvent): void;
|
|
145
|
+
/** 用户 Tap 事件 */
|
|
146
|
+
protected onTapGesture(event: GestureEvent): void;
|
|
147
|
+
/** 用户 DblTap 事件 */
|
|
148
|
+
protected onDblTapGesture(event: GestureEvent): void;
|
|
149
|
+
/** 用户 Tap 事件 */
|
|
150
|
+
protected onPressGesture(event: GestureEvent): void;
|
|
151
|
+
/** 用户 Pinch 事件 */
|
|
152
|
+
protected onPinchGesture(event: GestureEvent): void;
|
|
153
|
+
/** 用户 MouseWheel 事件 */
|
|
154
|
+
protected onMouseWheel(event: GestureEvent): void;
|
|
155
|
+
/** 用户 MouseMove 事件 */
|
|
156
|
+
protected onMouseMove(event: GestureEvent): void;
|
|
157
|
+
/** 计算屏幕坐标位置到屏幕标准空间 x: [-1, 1], y: [-1, 1] */
|
|
158
|
+
protected relativeClientPosition(mouseXY: {
|
|
159
|
+
x: number;
|
|
160
|
+
y: number;
|
|
161
|
+
}): THREE.Vector2;
|
|
162
|
+
/** 从屏幕标准空间 得到 射线 */
|
|
163
|
+
protected createRaycasterFromCamera(coords: THREE.Vector2, camera: Camera): THREE.Raycaster;
|
|
164
|
+
/** 用户事件绑定 */
|
|
165
|
+
private bindEvents;
|
|
166
|
+
}
|
|
167
|
+
export { BaseController, CameraMotion, PostProcessingType, BaseControllerInitArgs };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { GestureEvent, BaseEvent, StateEvent, IntersectEvent, PanoEvent, PanoTextureEvent, XRSessionEvent, XRGestureEvent, XRControllerEvent } from "../utils/event";
|
|
2
|
+
type ControllerEventTypes = {
|
|
3
|
+
/** 手势 滑动屏幕 */
|
|
4
|
+
"gesture.pan"(event: GestureEvent): void;
|
|
5
|
+
/** 手势 点击屏幕 */
|
|
6
|
+
"gesture.tap"(event: GestureEvent): void;
|
|
7
|
+
/** 手势 双击屏幕 */
|
|
8
|
+
"gesture.dbltap"(event: GestureEvent): void;
|
|
9
|
+
/** 手势 长按屏幕 */
|
|
10
|
+
"gesture.press"(event: GestureEvent): void;
|
|
11
|
+
/** 手势 双指缩放 */
|
|
12
|
+
"gesture.pinch"(event: GestureEvent): void;
|
|
13
|
+
/** 手势 鼠标滚轮 */
|
|
14
|
+
"gesture.mousewheel"(event: GestureEvent): void;
|
|
15
|
+
/** 手势 鼠标移动 */
|
|
16
|
+
"gesture.mousemove"(event: GestureEvent): void;
|
|
17
|
+
/** 手势 惯性 */
|
|
18
|
+
"gesture.momentum"(event: GestureEvent): void;
|
|
19
|
+
/** 手势开始 */
|
|
20
|
+
"gesture.create"(event: GestureEvent): void;
|
|
21
|
+
/** 模态切换动画 开始 */
|
|
22
|
+
"initAnimation.start"(event: StateEvent): void;
|
|
23
|
+
/** 模态切换动画 结束 */
|
|
24
|
+
"initAnimation.end"(event: StateEvent): void;
|
|
25
|
+
/** 相机改变 */
|
|
26
|
+
"camera.update"(event: StateEvent): void;
|
|
27
|
+
"intersect.update"(event: IntersectEvent): void;
|
|
28
|
+
/** 选择 */
|
|
29
|
+
"pano.select"(event: PanoEvent): void;
|
|
30
|
+
/** 请求点位 */
|
|
31
|
+
"pano.request"(event: PanoEvent): void;
|
|
32
|
+
/** 运动去点位 */
|
|
33
|
+
"pano.moveTo"(event: PanoEvent): void;
|
|
34
|
+
/** 运动点位过程 */
|
|
35
|
+
"pano.moving"(event: PanoEvent): void;
|
|
36
|
+
/** 运动到达点位 */
|
|
37
|
+
"pano.arrived"(event: PanoEvent): void;
|
|
38
|
+
/** 取消运动点位 */
|
|
39
|
+
"pano.cancel"(event: PanoEvent): void;
|
|
40
|
+
/** 运动点位出错 */
|
|
41
|
+
"pano.error"(event: PanoEvent): void;
|
|
42
|
+
/** 加载全景材质 */
|
|
43
|
+
"pano.texture.load"(event: PanoTextureEvent): void;
|
|
44
|
+
/** 加载全景材质进度 */
|
|
45
|
+
"pano.texture.progress"(event: PanoTextureEvent): void;
|
|
46
|
+
/** 加载全景材质成功 */
|
|
47
|
+
"pano.texture.success"(event: PanoTextureEvent): void;
|
|
48
|
+
/** 加载全景材质失败 */
|
|
49
|
+
"pano.texture.error"(event: PanoTextureEvent): void;
|
|
50
|
+
/** 加载全景材质中止 */
|
|
51
|
+
"pano.texture.abort"(event: PanoTextureEvent): void;
|
|
52
|
+
/** VRPanorama 请求退出 */
|
|
53
|
+
"vr.requestExit"(event: BaseEvent): void;
|
|
54
|
+
/** XR 退出 */
|
|
55
|
+
"xr.session.end"(event: XRSessionEvent): void;
|
|
56
|
+
/** XR 进入 */
|
|
57
|
+
"xr.session.start"(event: XRSessionEvent): void;
|
|
58
|
+
/** XR 手势(按钮) */
|
|
59
|
+
"xr.gesture.tap"(event: XRGestureEvent): void;
|
|
60
|
+
/** XR 手势(按钮) */
|
|
61
|
+
"xr.gesture.press"(event: XRGestureEvent): void;
|
|
62
|
+
/** XR 手势(按钮) */
|
|
63
|
+
"xr.gesture.buttonUp"(event: XRGestureEvent): void;
|
|
64
|
+
/** XR 手势(按钮) */
|
|
65
|
+
"xr.gesture.buttonDown"(event: XRGestureEvent): void;
|
|
66
|
+
/** XR手柄更新*/
|
|
67
|
+
"xr.controller.update"(event: XRControllerEvent): void;
|
|
68
|
+
/** 抛出错误 */
|
|
69
|
+
"error"(error: Error): void;
|
|
70
|
+
};
|
|
71
|
+
export { ControllerEventTypes };
|