@realsee/five 6.6.0-alpha.2 → 6.6.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/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.Fetcher.html +2 -2
- package/docs/classes/five.Five.html +60 -58
- package/docs/classes/five.Model.html +33 -33
- package/docs/classes/five.ModelScene.html +17 -18
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +2 -2
- package/docs/classes/five.PBMMeshMaterial.html +6 -6
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -5
- package/docs/classes/five.PBMSkinnedMesh.html +2 -2
- 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 +52 -52
- package/docs/classes/five.Tile3DModel.html +26 -26
- package/docs/classes/five.TileNode.html +2 -2
- package/docs/classes/five.TileRequestScheduler.html +1 -1
- package/docs/classes/five.Tileset.html +2 -2
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +17 -17
- package/docs/classes/five.WorkResolvedObserver.html +18 -14
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.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 +5 -5
- package/docs/classes/plugins.RoundedBoxGeometry.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 +19 -0
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/functions/five.createDebugBoundingMesh.html +1 -1
- package/docs/functions/five.defaultImageURLTransform.html +1 -1
- package/docs/functions/five.isBoundingVolume.html +1 -1
- package/docs/functions/five.makeBoundingVolume.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/interfaces/five.AddableObject.html +3 -3
- package/docs/interfaces/five.AjaxOptions.html +5 -5
- package/docs/interfaces/five.BaseEvent.html +1 -1
- package/docs/interfaces/five.BoundingVolume.html +2 -2
- package/docs/interfaces/five.BoxBoundingVolume.html +2 -2
- package/docs/interfaces/five.EventCallback.html +1 -1
- package/docs/interfaces/five.FiveInitArgs.html +2 -2
- package/docs/interfaces/five.FiveLoadOptions.html +1 -1
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +1 -1
- package/docs/interfaces/five.ImageOptions.html +17 -12
- package/docs/interfaces/five.ImageURLOptions.html +7 -5
- package/docs/interfaces/five.IntersectEvent.html +1 -1
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +6 -3
- package/docs/interfaces/five.KTX2.html +2 -2
- package/docs/interfaces/five.LoosePanoWork.html +2 -2
- package/docs/interfaces/five.LooseWork.html +2 -2
- package/docs/interfaces/five.LooseWorkInitial.html +2 -2
- package/docs/interfaces/five.LooseWorkModel.html +2 -2
- package/docs/interfaces/five.LooseWorkObserver.html +2 -2
- package/docs/interfaces/five.LooseWorkPanorama.html +4 -2
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModeChangeEvent.html +1 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +1 -1
- package/docs/interfaces/five.ModelLike.html +2 -2
- package/docs/interfaces/five.ModelSceneEvent.html +1 -1
- package/docs/interfaces/five.MovePanoOptions.html +1 -1
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +4 -4
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
- package/docs/interfaces/five.NetworkResponseError.html +2 -2
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +1 -1
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -2
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -2
- package/docs/interfaces/five.PanoCircleMeshInterface.html +3 -3
- package/docs/interfaces/five.PanoEvent.html +1 -1
- package/docs/interfaces/five.PanoTextureEvent.html +1 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +37 -37
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +51 -51
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RegionBoundingVolume.html +2 -2
- package/docs/interfaces/five.RenderEvent.html +1 -1
- package/docs/interfaces/five.ResolvedParameterValue.html +51 -51
- package/docs/interfaces/five.SphereBoundingVolume.html +2 -2
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +1 -1
- package/docs/interfaces/five.TextureOptions.html +13 -8
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +2 -2
- package/docs/interfaces/five.TilesetHeader.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +5 -5
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +26 -26
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkModel.html +6 -6
- package/docs/interfaces/five.WorkModelLayer.html +2 -2
- package/docs/interfaces/five.WorkObserver.html +20 -15
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorksEvent.html +1 -1
- package/docs/interfaces/five.XRControllerEvent.html +1 -1
- package/docs/interfaces/five.XRGestureEvent.html +1 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginController.html +4 -4
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +4 -4
- package/docs/interfaces/plugins.ItemMaskController.html +4 -4
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +3 -3
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +14 -10
- package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.ConfigChangeEvent.html +7 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +6 -4
- package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +2 -2
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +3 -3
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +5 -5
- package/docs/interfaces/react.FiveInjectionTypes.html +14 -14
- package/docs/interfaces/vfx.ParticleGPUArgs.html +60 -0
- package/docs/interfaces/vfx.ParticleGPUTweenKeyframe.html +3 -0
- package/docs/modules/plugins.PanoAnimePluginType.html +1 -1
- package/docs/modules/vfx.html +1 -1
- package/docs/types/five.AjaxResponseType.html +1 -1
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
- package/docs/types/five.EventTypes.html +1 -1
- package/docs/types/five.Mode.html +1 -1
- package/docs/types/five.Models.html +5 -5
- package/docs/types/five.NetWorkMeta.html +2 -2
- package/docs/types/five.NetworkError.html +1 -1
- package/docs/types/five.NetworkErrorCallback.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.NetworkResponse.html +2 -2
- package/docs/types/five.NetworkState.html +1 -1
- package/docs/types/five.NetworkSuccessCallback.html +1 -1
- package/docs/types/five.NetworkType.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/five.SubscribeEventMap.html +1 -1
- package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -1
- package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -1
- package/docs/types/react.StoreActionMapType.html +1 -1
- package/docs/types/vfx.ParticleGPUType.html +1 -0
- package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
- package/docs/types/vue.Project2d.html +1 -1
- package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
- package/docs/variables/five.ktx2.html +1 -1
- package/docs/variables/react.useFiveScene.html +1 -1
- package/five/declare.d.ts +34 -0
- package/five/index.d.ts +55 -26
- package/five/index.js +77 -77
- package/five/index.mjs +5279 -4977
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +2 -2
- package/plugins/index.d.ts +26 -1
- package/plugins/index.js +10 -10
- package/plugins/index.mjs +53 -48
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +9 -9
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +126 -19
- package/umd/five-vue.js +2 -2
- package/umd/five.js +77 -77
- package/vfx/index.d.ts +99 -0
- package/vfx/index.js +126 -19
- package/vfx/index.mjs +325 -119
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +108 -94
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>useFiveScene | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/react.html">react</a></li><li><a href="" aria-current="page">useFiveScene</a></li></ul><h1 class="deprecated">Variable useFiveScene<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">useFiveScene</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">scene</span><span class="tsd-signature-symbol">:</span> <a href="../classes/five.Scene.html" class="tsd-signature-type tsd-kind-class">Scene</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span> <span class="tsd-signature-symbol">|</span> (<span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span>)<span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">deps</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">DependencyList</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> = useFiveSceneEffect</span></div><div class="tsd-type-declaration"><h4>Type
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>useFiveScene | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/react.html">react</a></li><li><a href="" aria-current="page">useFiveScene</a></li></ul><h1 class="deprecated">Variable useFiveScene<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">useFiveScene</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">scene</span><span class="tsd-signature-symbol">:</span> <a href="../classes/five.Scene.html" class="tsd-signature-type tsd-kind-class">Scene</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span> <span class="tsd-signature-symbol">|</span> (<span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span>)<span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">deps</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">DependencyList</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> = useFiveSceneEffect</span></div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="__type"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">scene</span><span class="tsd-signature-symbol">:</span> <a href="../classes/five.Scene.html" class="tsd-signature-type tsd-kind-class">Scene</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span> <span class="tsd-signature-symbol">|</span> (<span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span>)<span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">deps</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">DependencyList</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Five React Hooks: 操作 Five 的 Scene</p>
|
|
2
2
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">scene</span><span class="tsd-signature-symbol">:</span> <a href="../classes/five.Scene.html" class="tsd-signature-type tsd-kind-class">Scene</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span> <span class="tsd-signature-symbol">|</span> (<span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span>)</span><div class="tsd-comment tsd-typography"><p>获取 Five 的 Scene 的回调函数</p>
|
|
3
3
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">deps</span>: <span class="tsd-signature-type">DependencyList</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code><span class="hl-0">useFiveSceneEffect</span><span class="hl-1">(</span><span class="hl-4">scene</span><span class="hl-1"> </span><span class="hl-6">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// object is a THREE.Object3D</span><br/><span class="hl-1"> </span><span class="hl-4">scene</span><span class="hl-1">.</span><span class="hl-0">add</span><span class="hl-1">(</span><span class="hl-4">object</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> () </span><span class="hl-6">=></span><span class="hl-1"> </span><span class="hl-4">scene</span><span class="hl-1">.</span><span class="hl-0">remove</span><span class="hl-1">(</span><span class="hl-4">object</span><span class="hl-1">); </span><span class="hl-5">// 析构函数</span><br/><span class="hl-1">});</span>
|
|
4
4
|
</code><button>Copy</button></pre>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
|
|
3
|
+
declare module 'three' {
|
|
4
|
+
|
|
5
|
+
export interface Raycaster {
|
|
6
|
+
/**
|
|
7
|
+
* 只捕获第一个焦点
|
|
8
|
+
*/
|
|
9
|
+
firstHitOnly?: boolean;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 对焦点进行筛选
|
|
13
|
+
*/
|
|
14
|
+
hitFilter?: (intersect: THREE.Intersection) => boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 是否由近及远排序, 默认 true
|
|
18
|
+
*/
|
|
19
|
+
sortByDistance?: boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 作用楼层
|
|
23
|
+
*/
|
|
24
|
+
floorIndex?: number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 作用楼层
|
|
28
|
+
* @deprecated
|
|
29
|
+
* use floorIndex instead.
|
|
30
|
+
*/
|
|
31
|
+
floor?: number | null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
package/five/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="./declare" />
|
|
2
|
+
|
|
1
3
|
import * as THREE_2 from 'three';
|
|
2
4
|
|
|
3
5
|
export declare interface AddableObject extends THREE_2.Object3D {
|
|
@@ -83,7 +85,7 @@ export declare interface BoundingVolume {
|
|
|
83
85
|
distanceToPoint(point: THREE_2.Vector3): number;
|
|
84
86
|
distanceToPlane(plane: THREE_2.Plane): number;
|
|
85
87
|
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
86
|
-
intersectRay(ray: THREE_2.Ray, far?: number): boolean;
|
|
88
|
+
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
87
89
|
clone(): BoundingVolume;
|
|
88
90
|
copy(boundingVolume: this): this;
|
|
89
91
|
fromJson(json: any): this;
|
|
@@ -110,7 +112,7 @@ export declare class BoxBoundingVolume implements BoundingVolume {
|
|
|
110
112
|
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
111
113
|
toGeometry(): THREE_2.BufferGeometry;
|
|
112
114
|
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
113
|
-
intersectRay(ray: THREE_2.Ray, far?: number): boolean;
|
|
115
|
+
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
export declare type BoxBoundingVolumeJson = {
|
|
@@ -411,6 +413,8 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
411
413
|
static set dracoPath(path: string);
|
|
412
414
|
static get ktx2Path(): string;
|
|
413
415
|
static set ktx2Path(path: string);
|
|
416
|
+
static get useNativeImageBitmap(): boolean;
|
|
417
|
+
static set useNativeImageBitmap(enable: boolean);
|
|
414
418
|
/**
|
|
415
419
|
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
416
420
|
* @description
|
|
@@ -558,8 +562,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
558
562
|
private analysis?;
|
|
559
563
|
private renderSwitch01;
|
|
560
564
|
private currentUpdateArgs;
|
|
561
|
-
private meshReplaceMaterialMap;
|
|
562
|
-
private meshOriginMaterialMap;
|
|
563
565
|
enableLayeringRendering: boolean;
|
|
564
566
|
private _builtinRenderer;
|
|
565
567
|
private _buildInRendererType;
|
|
@@ -776,6 +778,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
776
778
|
* - panoIndex: number
|
|
777
779
|
* - longitude: number
|
|
778
780
|
* - latitude: number
|
|
781
|
+
* - distance: number
|
|
779
782
|
* - fov: number
|
|
780
783
|
* - offset: THREE.Vector3
|
|
781
784
|
*
|
|
@@ -1162,7 +1165,7 @@ export declare function headingToLongitude(heading: number): number;
|
|
|
1162
1165
|
/**
|
|
1163
1166
|
* 图片参数
|
|
1164
1167
|
*/
|
|
1165
|
-
export declare interface ImageOptions {
|
|
1168
|
+
export declare interface ImageOptions extends Omit<ImageURLOptions, 'key'> {
|
|
1166
1169
|
/**
|
|
1167
1170
|
* url 地址转化
|
|
1168
1171
|
* @param url - 原始地址
|
|
@@ -1170,15 +1173,6 @@ export declare interface ImageOptions {
|
|
|
1170
1173
|
* @returns 转化后地址
|
|
1171
1174
|
*/
|
|
1172
1175
|
transform?: (url: string, options: ImageURLOptions) => string;
|
|
1173
|
-
/** 图片尺寸参数 尽量使用 2 的幂次 如 512 1024 2048 */
|
|
1174
|
-
size?: ImageURLOptions['size'];
|
|
1175
|
-
/** 图片质量参数(0-100) */
|
|
1176
|
-
quality?: ImageURLOptions['quality'];
|
|
1177
|
-
/** 图片格式参数 */
|
|
1178
|
-
format?: ImageURLOptions['format'];
|
|
1179
|
-
/** 锐化参数 海外不支持 */
|
|
1180
|
-
sharpen?: ImageURLOptions['sharpen'];
|
|
1181
|
-
mappings?: ImageURLMappings;
|
|
1182
1176
|
}
|
|
1183
1177
|
|
|
1184
1178
|
export declare function imageSupport(): Promise<{
|
|
@@ -1211,7 +1205,9 @@ export declare interface ImageURLOptions {
|
|
|
1211
1205
|
cut?: [x: number, y: number, width: number, height: number];
|
|
1212
1206
|
/** 锐化参数 海外不支持 */
|
|
1213
1207
|
sharpen?: number;
|
|
1214
|
-
/**
|
|
1208
|
+
/** 腾讯云在做裁切, 旋转等操作时,需要此参数,应用 exif orientation */
|
|
1209
|
+
forceUseExifOrientation?: boolean;
|
|
1210
|
+
/** 域名匹配规则 */
|
|
1215
1211
|
mappings?: ImageURLMappings;
|
|
1216
1212
|
}
|
|
1217
1213
|
|
|
@@ -1236,6 +1232,12 @@ export declare interface IntersectEvent extends BaseEvent {
|
|
|
1236
1232
|
|
|
1237
1233
|
export declare interface Intersection extends THREE_2.Intersection {
|
|
1238
1234
|
/** 楼层 */
|
|
1235
|
+
floorIndex: number;
|
|
1236
|
+
/**
|
|
1237
|
+
* 楼层
|
|
1238
|
+
* @deprecated
|
|
1239
|
+
* use floorIndex instead.
|
|
1240
|
+
*/
|
|
1239
1241
|
floor: number;
|
|
1240
1242
|
model?: Model;
|
|
1241
1243
|
viewLayer?: ViewLayer;
|
|
@@ -1909,6 +1911,8 @@ export declare interface LooseWorkPanorama extends Record<CubeFace, string> {
|
|
|
1909
1911
|
video?: LooseWorkVideo;
|
|
1910
1912
|
tiles?: number[];
|
|
1911
1913
|
size_list?: number[];
|
|
1914
|
+
derived_id?: number;
|
|
1915
|
+
derived_id_str?: string;
|
|
1912
1916
|
}
|
|
1913
1917
|
|
|
1914
1918
|
export declare interface LooseWorkVideo {
|
|
@@ -1988,6 +1992,9 @@ export declare interface Model {
|
|
|
1988
1992
|
dispatchEvent(event: {
|
|
1989
1993
|
type: 'load';
|
|
1990
1994
|
}): void;
|
|
1995
|
+
dispatchEvent(event: {
|
|
1996
|
+
type: 'dispose';
|
|
1997
|
+
}): void;
|
|
1991
1998
|
dispatchEvent(event: {
|
|
1992
1999
|
type: 'shownFloorChange';
|
|
1993
2000
|
floorIndex: number | null;
|
|
@@ -2003,11 +2010,29 @@ export declare interface Model {
|
|
|
2003
2010
|
addEventListener(type: 'load', listener: (event: THREE_2.Event & {
|
|
2004
2011
|
type: 'load';
|
|
2005
2012
|
}) => void): void;
|
|
2013
|
+
addEventListener(type: 'dispose', listener: (event: THREE_2.Event & {
|
|
2014
|
+
type: 'dispose';
|
|
2015
|
+
}) => void): void;
|
|
2006
2016
|
addEventListener(type: 'changeShownFloor', listener: (event: THREE_2.Event & {
|
|
2007
2017
|
type: 'changeShownFloor';
|
|
2008
2018
|
floorIndex: number | null;
|
|
2009
2019
|
}) => void): void;
|
|
2010
2020
|
addEventListener(type: string, listener: (event: THREE_2.Event) => void): void;
|
|
2021
|
+
removeEventListener(type: 'error', listener: (event: THREE_2.Event & {
|
|
2022
|
+
type: 'error';
|
|
2023
|
+
error: Error;
|
|
2024
|
+
}) => void): void;
|
|
2025
|
+
removeEventListener(type: 'load', listener: (event: THREE_2.Event & {
|
|
2026
|
+
type: 'load';
|
|
2027
|
+
}) => void): void;
|
|
2028
|
+
removeEventListener(type: 'dispose', listener: (event: THREE_2.Event & {
|
|
2029
|
+
type: 'dispose';
|
|
2030
|
+
}) => void): void;
|
|
2031
|
+
removeEventListener(type: 'changeShownFloor', listener: (event: THREE_2.Event & {
|
|
2032
|
+
type: 'changeShownFloor';
|
|
2033
|
+
floorIndex: number | null;
|
|
2034
|
+
}) => void): void;
|
|
2035
|
+
removeEventListener(type: string, listener: (event: THREE_2.Event) => void): void;
|
|
2011
2036
|
}
|
|
2012
2037
|
|
|
2013
2038
|
/**
|
|
@@ -2067,11 +2092,10 @@ export declare class Model extends THREE_2.Object3D {
|
|
|
2067
2092
|
/**
|
|
2068
2093
|
* 计算模型射线碰撞检测
|
|
2069
2094
|
* @param raycaster - THREE 射线对象
|
|
2070
|
-
* @param
|
|
2071
|
-
* @param sortByDistance - 是否对结果进行排序
|
|
2095
|
+
* @param target - 返回碰撞
|
|
2072
2096
|
* @returns 返回碰撞
|
|
2073
2097
|
*/
|
|
2074
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster,
|
|
2098
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
2075
2099
|
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene): boolean;
|
|
2076
2100
|
localToEnu(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
2077
2101
|
enuToLocal(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
@@ -2227,11 +2251,10 @@ export declare class ModelScene extends THREE_2.Scene {
|
|
|
2227
2251
|
/**
|
|
2228
2252
|
* 计算模型射线碰撞检测
|
|
2229
2253
|
* @param raycaster - THREE 射线对象
|
|
2230
|
-
* @param
|
|
2231
|
-
* @param sortByDistance - 根据距离排序
|
|
2254
|
+
* @param target - 返回碰撞点
|
|
2232
2255
|
* @returns 返回碰撞点
|
|
2233
2256
|
*/
|
|
2234
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster,
|
|
2257
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
2235
2258
|
update(renderer: THREE_2.WebGLRenderer, camera: Camera): boolean;
|
|
2236
2259
|
/**
|
|
2237
2260
|
* @deprecated
|
|
@@ -2640,9 +2663,9 @@ export declare interface Parameter extends Readonly<Partial<ParameterValue>> {
|
|
|
2640
2663
|
export declare class Parameter {
|
|
2641
2664
|
static createDefault(): Required<ParameterValue>;
|
|
2642
2665
|
static resolveValue(...values: Partial<ParameterValue>[]): ResolvedParameterValue;
|
|
2643
|
-
private value;
|
|
2644
2666
|
id: string;
|
|
2645
2667
|
versionNumber: number;
|
|
2668
|
+
private value;
|
|
2646
2669
|
constructor(initialValue?: Partial<ParameterValue>);
|
|
2647
2670
|
get version(): string;
|
|
2648
2671
|
resolveValue(...baseValues: Partial<ParameterValue>[]): ResolvedParameterValue;
|
|
@@ -3176,7 +3199,7 @@ export declare class RegionBoundingVolume implements BoundingVolume {
|
|
|
3176
3199
|
distanceSquaredToPoint(point: THREE_2.Vector3): number;
|
|
3177
3200
|
distanceToPlane(plane: THREE_2.Plane): number;
|
|
3178
3201
|
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
3179
|
-
intersectRay(ray: THREE_2.Ray): boolean;
|
|
3202
|
+
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
3180
3203
|
}
|
|
3181
3204
|
|
|
3182
3205
|
export declare type RegionBoundingVolumeJson = {
|
|
@@ -3223,7 +3246,7 @@ export declare class SphereBoundingVolume implements BoundingVolume {
|
|
|
3223
3246
|
distanceToPoint(point: THREE_2.Vector3): number;
|
|
3224
3247
|
distanceToPlane(plane: THREE_2.Plane): number;
|
|
3225
3248
|
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
3226
|
-
intersectRay(ray: THREE_2.Ray, far?: number): boolean;
|
|
3249
|
+
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
3227
3250
|
}
|
|
3228
3251
|
|
|
3229
3252
|
export declare type SphereBoundingVolumeJson = {
|
|
@@ -3476,7 +3499,7 @@ export declare class Tile3DModel extends THREE_2.Object3D {
|
|
|
3476
3499
|
loadAllTilesets(): Promise<void>;
|
|
3477
3500
|
loadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3478
3501
|
unloadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3479
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster,
|
|
3502
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
3480
3503
|
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene, model: Model): boolean;
|
|
3481
3504
|
dispose(): void;
|
|
3482
3505
|
/**
|
|
@@ -3688,7 +3711,7 @@ export declare class TileNode extends THREE_2.Object3D {
|
|
|
3688
3711
|
private disposers;
|
|
3689
3712
|
constructor(name: string, contentObject: THREE_2.Object3D, disposer?: () => void);
|
|
3690
3713
|
generateBvhTree(): Promise<this>;
|
|
3691
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster,
|
|
3714
|
+
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
3692
3715
|
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene, tile3d: Tile3DModel, tile: Tile, parameterValue: ResolvedParameterValue): boolean;
|
|
3693
3716
|
dispose(): void;
|
|
3694
3717
|
clone(): this;
|
|
@@ -4136,6 +4159,12 @@ export declare interface WorkObserver {
|
|
|
4136
4159
|
index: number;
|
|
4137
4160
|
/** 序号 */
|
|
4138
4161
|
panoIndex: number;
|
|
4162
|
+
/**
|
|
4163
|
+
* 序号
|
|
4164
|
+
* @example
|
|
4165
|
+
* `${workCode}[${panoIndex}]`
|
|
4166
|
+
*/
|
|
4167
|
+
panoId: string;
|
|
4139
4168
|
/** 点位所在楼层 */
|
|
4140
4169
|
floorIndex: number;
|
|
4141
4170
|
/** 点位 derived_id */
|