@realsee/five 6.8.0-alpha.29 → 6.8.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_READ_ME.md +6 -1
- package/AI_CONTEXT.md +6 -1
- package/README.md +10 -3
- package/ai_guides/README.md +28 -0
- package/ai_guides/api.md +74 -13
- package/ai_guides/features/3dtile.md +1 -1
- package/ai_guides/features/camera-animation.md +18 -1
- package/ai_guides/features/clipper.md +2 -2
- package/ai_guides/features/coordinate-system.md +20 -2
- package/ai_guides/features/event.md +3 -3
- package/ai_guides/features/five.md +17 -17
- package/ai_guides/features/flowing-light-2d-pass.md +1 -1
- package/ai_guides/features/flowing-light-3d-pass.md +1 -1
- package/ai_guides/features/gaussian-blur-pass.md +1 -1
- package/ai_guides/features/gesture.md +1 -1
- package/ai_guides/features/get-screen-pixels.md +2 -2
- package/ai_guides/features/image-options.md +2 -2
- package/ai_guides/features/load-external-model.md +4 -2
- package/ai_guides/features/load-progress.md +1 -1
- package/ai_guides/features/material.md +17 -11
- package/ai_guides/features/mode.md +1 -1
- package/ai_guides/features/model.md +1 -1
- package/ai_guides/features/move-pano-effect.md +1 -1
- package/ai_guides/features/multi-work.md +1 -1
- package/ai_guides/features/pano-filter.md +2 -1
- package/ai_guides/features/pano-tile.md +1 -1
- package/ai_guides/features/pano-uv.md +1 -1
- package/ai_guides/features/parameter.md +1 -1
- package/ai_guides/features/plugin.md +1 -1
- package/ai_guides/features/postprocessing.md +1 -1
- package/ai_guides/features/raycast.md +5 -2
- package/ai_guides/features/request-proxy.md +1 -1
- package/ai_guides/features/screen-project.md +2 -1
- package/ai_guides/features/state.md +21 -1
- package/ai_guides/features/view-layer.md +1 -1
- package/ai_guides/features/work.md +1 -1
- package/ai_guides/glossary.md +2 -2
- package/ai_guides/template.md +11 -0
- package/docs/00_FOR_AI_AGENTS.md +3 -2
- package/docs/README.md +3 -2
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +1 -1
- package/docs/classes/five.EyeDomeLightingPass.html +1 -1
- package/docs/classes/five.FivePass.html +1 -1
- package/docs/classes/five.Model.html +1 -1
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.Parameter.html +1 -1
- package/docs/classes/five.Tile3D.html +1 -1
- package/docs/classes/five.Tileset.html +3 -2
- package/docs/classes/five.WorkResolvedObserver.html +1 -1
- 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.CSS3DObject.html +1 -1
- package/docs/classes/plugins.CSS3DSprite.html +1 -1
- 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 +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +121 -1
- package/docs/documents/api.html +101 -23
- package/docs/documents/features_3dtile.html +1 -1
- package/docs/documents/features_camera-animation.html +18 -2
- package/docs/documents/features_clipper.html +2 -2
- package/docs/documents/features_coordinate-system.html +52 -3
- package/docs/documents/features_event.html +3 -3
- package/docs/documents/features_five.html +17 -17
- package/docs/documents/features_flowing-light-2d-pass.html +1 -1
- package/docs/documents/features_flowing-light-3d-pass.html +1 -1
- package/docs/documents/features_gaussian-blur-pass.html +1 -1
- package/docs/documents/features_gesture.html +1 -1
- package/docs/documents/features_get-screen-pixels.html +2 -2
- package/docs/documents/features_image-options.html +2 -2
- package/docs/documents/features_load-external-model.html +4 -2
- package/docs/documents/features_load-progress.html +1 -1
- package/docs/documents/features_material.html +3 -3
- package/docs/documents/features_mode.html +1 -1
- package/docs/documents/features_model.html +1 -1
- package/docs/documents/features_move-pano-effect.html +1 -1
- package/docs/documents/features_multi-work.html +1 -1
- package/docs/documents/features_pano-filter.html +2 -1
- package/docs/documents/features_pano-tile.html +1 -1
- package/docs/documents/features_pano-uv.html +1 -1
- package/docs/documents/features_parameter.html +1 -1
- package/docs/documents/features_plugin.html +1 -1
- package/docs/documents/features_postprocessing.html +1 -1
- package/docs/documents/features_raycast.html +5 -2
- package/docs/documents/features_request-proxy.html +1 -1
- package/docs/documents/features_screen-project.html +2 -1
- package/docs/documents/features_state.html +8 -1
- package/docs/documents/features_view-layer.html +1 -1
- package/docs/documents/features_work.html +1 -1
- package/docs/documents/glossary.html +3 -3
- package/docs/documents/template.html +9 -0
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +121 -1
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +1 -1
- package/docs/interfaces/five.ParameterTilesetValue.html +1 -1
- package/docs/interfaces/five.ParameterValue.html +1 -1
- package/docs/interfaces/five.ResolvedParameterValue.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +1 -1
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkObserver.html +1 -1
- package/docs/interfaces/five.WorkObserverProto.html +1 -1
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.CSS3DPluginController.html +1 -1
- package/docs/interfaces/plugins.CSS3DPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.CSS3DPluginType.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.GaussianSplattingEntranceAnimationController.html +1 -1
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.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 +1 -1
- package/docs/types/five.ParseOptions.html +1 -1
- package/five/index.js +5 -5
- package/five/index.mjs +9 -9
- package/five/model/tile3d/tileset.d.ts +1 -0
- 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/llms.txt +36 -1
- package/package.json +3 -3
- package/plugins/index.js +2 -2
- package/plugins/index.mjs +2 -2
- 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 +2 -2
- 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 +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +5 -5
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
package/docs/documents/api.html
CHANGED
|
@@ -92,17 +92,26 @@
|
|
|
92
92
|
</table>
|
|
93
93
|
<h2 id="initialization-configuration-" class="tsd-anchor-link">Initialization Configuration (<code>FiveInitArgs</code>)<a href="#initialization-configuration-" 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></h2>
|
|
94
94
|
<p>Configuration object passed to the <code>Five</code> constructor.</p>
|
|
95
|
-
<pre><code class="typescript"><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">FiveInitArgs</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** External WebGLRenderer. If provided, internal renderer creation is skipped. */</span><br/><span class="hl-1"> </span><span class="hl-6">renderer</span><span class="hl-1">?: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderer</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Width/Height of the viewport relative to container (0-1). */</span><br/><span class="hl-1"> </span><span class="hl-6">viewport</span><span class="hl-1">?: { </span><span class="hl-6">left</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">; </span><span class="hl-6">bottom</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">; </span><span class="hl-6">width</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">; </span><span class="hl-6">height</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1"> };</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Canvas background color. Default: 0x181A1C */</span><br/><span class="hl-1"> </span><span class="hl-6">backgroundColor</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1"> | </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Color</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Canvas background alpha (0-1). Default: 1 */</span><br/><span class="hl-1"> </span><span class="hl-6">backgroundAlpha</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Enable antialiasing. Default: false */</span><br/><span class="hl-1"> </span><span class="hl-6">antialias</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Auto-play rendering loop. Default: true */</span><br/><span class="hl-1"> </span><span class="hl-6">play</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Enable on-demand rendering to save battery. Default: true */</span><br/><span class="hl-1"> </span><span class="hl-6">onlyRenderIfNeeds</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Max FPS limit. false = unlimited. Default: false */</span><br/><span class="hl-1"> </span><span class="hl-6">maxFps</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1"> | </span><span class="hl-7">false</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Mode transition duration in ms. Default: 1000 */</span><br/><span class="hl-1"> </span><span class="hl-6">modeChangeDuration</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Initial plugins to load. */</span><br/><span class="hl-1"> </span><span class="hl-6">plugins</span><span class="hl-1">?: </span><span class="hl-7">FivePlugin</span><span class="hl-1">[];</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Dynamic image configuration for optimization. */</span><br/><span class="hl-1"> </span><span class="hl-6">imageOptions</span><span class="hl-1">?: </span><span class="hl-7">ImageOptions</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Dynamic texture configuration for optimization. */</span><br/><span class="hl-1"> </span><span class="hl-6">textureOptions</span><span class="hl-1">?: </span><span class="hl-7">TextureOptions</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
|
|
95
|
+
<pre><code class="typescript"><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">FiveInitArgs</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** External WebGLRenderer. If provided, internal renderer creation is skipped. */</span><br/><span class="hl-1"> </span><span class="hl-6">renderer</span><span class="hl-1">?: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderer</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Width/Height of the viewport relative to container (0-1). */</span><br/><span class="hl-1"> </span><span class="hl-6">viewport</span><span class="hl-1">?: { </span><span class="hl-6">left</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">; </span><span class="hl-6">bottom</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">; </span><span class="hl-6">width</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">; </span><span class="hl-6">height</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1"> };</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Canvas background color. Default: 0x181A1C */</span><br/><span class="hl-1"> </span><span class="hl-6">backgroundColor</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1"> | </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Color</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Canvas background alpha (0-1). Default: 1 */</span><br/><span class="hl-1"> </span><span class="hl-6">backgroundAlpha</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Enable antialiasing. Default: false */</span><br/><span class="hl-1"> </span><span class="hl-6">antialias</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Auto-play rendering loop. Default: true */</span><br/><span class="hl-1"> </span><span class="hl-6">play</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Enable on-demand rendering to save battery. Default: true */</span><br/><span class="hl-1"> </span><span class="hl-6">onlyRenderIfNeeds</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Max FPS limit. false = unlimited. Default: false */</span><br/><span class="hl-1"> </span><span class="hl-6">maxFps</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1"> | </span><span class="hl-7">false</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Mode transition duration in ms. Default: 1000 */</span><br/><span class="hl-1"> </span><span class="hl-6">modeChangeDuration</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Enable mouse wheel zoom. Default: true */</span><br/><span class="hl-1"> </span><span class="hl-6">enableWheel</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Initial plugins to load. */</span><br/><span class="hl-1"> </span><span class="hl-6">plugins</span><span class="hl-1">?: </span><span class="hl-7">FivePlugin</span><span class="hl-1">[];</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Dynamic image configuration for optimization. */</span><br/><span class="hl-1"> </span><span class="hl-6">imageOptions</span><span class="hl-1">?: </span><span class="hl-7">ImageOptions</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Dynamic texture configuration for optimization. */</span><br/><span class="hl-1"> </span><span class="hl-6">textureOptions</span><span class="hl-1">?: </span><span class="hl-7">TextureOptions</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Request URL interceptor for auth/CDN. */</span><br/><span class="hl-1"> </span><span class="hl-5">requestProxy</span><span class="hl-1">?: (</span><span class="hl-6">url</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> </span><span class="hl-7">string</span><span class="hl-1"> | </span><span class="hl-7">Promise</span><span class="hl-1"><</span><span class="hl-7">string</span><span class="hl-1">>;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/** Per-mode configuration (panorama, mapview, floorplan, topview, model). */</span><br/><span class="hl-1"> </span><span class="hl-6">panorama</span><span class="hl-1">?: </span><span class="hl-7">PanoramaConfig</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">mapview</span><span class="hl-1">?: </span><span class="hl-7">MapviewConfig</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">floorplan</span><span class="hl-1">?: </span><span class="hl-7">FloorplanConfig</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">topview</span><span class="hl-1">?: </span><span class="hl-7">TopviewConfig</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">model</span><span class="hl-1">?: </span><span class="hl-7">ModelConfig</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
|
|
96
96
|
</code><button type="button">Copy</button></pre>
|
|
97
97
|
|
|
98
|
+
<blockquote>
|
|
99
|
+
<p>详细的模式配置参数见 <a href="../../ai_guides/features/mode.md#configuration">Mode</a>。
|
|
100
|
+
图片加载策略见 <a href="features_image-options.html">ImageOptions</a>。
|
|
101
|
+
请求代理见 <a href="features_request-proxy.html">Request Proxy</a>。
|
|
102
|
+
完整初始化参数见 <a href="features_five.html">Five</a> 和 <a href="features_parameter.html">Parameter</a>。</p>
|
|
103
|
+
</blockquote>
|
|
98
104
|
<h2 id="core-methods" class="tsd-anchor-link">Core Methods<a href="#core-methods" 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></h2>
|
|
99
105
|
<h3 id="_" class="tsd-anchor-link"><code>load(work, state?, options?)</code><a href="#_" 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></h3>
|
|
100
106
|
<p>Loads a "Work" (dataset) into the Five instance.</p>
|
|
101
107
|
<ul>
|
|
102
108
|
<li><strong>work</strong>: The data object (<code>LooseWork</code> or <code>Work</code>) containing scene information.</li>
|
|
103
109
|
<li><strong>state</strong>: Initial state overrides. <code>"inherit"</code>, <code>"initial"</code>, or a <code>State</code> object.</li>
|
|
104
|
-
<li><strong>options</strong>: Loading options (e.g., transition duration).</li>
|
|
110
|
+
<li><strong>options</strong>: Loading options (e.g., transition duration, <code>mode: "add" | "replace"</code>).</li>
|
|
105
111
|
</ul>
|
|
112
|
+
<blockquote>
|
|
113
|
+
<p>详见 <a href="features_work.html">Work</a> 和 <a href="features_multi-work.html">Multi-Work</a>。</p>
|
|
114
|
+
</blockquote>
|
|
106
115
|
<h3 id="_-1" class="tsd-anchor-link"><code>appendTo(element, size?)</code><a href="#_-1" 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></h3>
|
|
107
116
|
<p>Mounts the Five canvas to a DOM element.</p>
|
|
108
117
|
<ul>
|
|
@@ -116,6 +125,9 @@
|
|
|
116
125
|
<li><strong>immediately</strong>: If <code>true</code>, skips animation.</li>
|
|
117
126
|
<li><strong>userAction</strong>: Marks the change as triggered by user interaction.</li>
|
|
118
127
|
</ul>
|
|
128
|
+
<blockquote>
|
|
129
|
+
<p>详见 <a href="features_state.html">State</a>。</p>
|
|
130
|
+
</blockquote>
|
|
119
131
|
<h3 id="_-3" class="tsd-anchor-link"><code>changeMode(mode, state?, options?)</code><a href="#_-3" 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></h3>
|
|
120
132
|
<p>Switches the viewing mode (e.g., from <code>Panorama</code> to <code>Model</code>).</p>
|
|
121
133
|
<ul>
|
|
@@ -123,47 +135,79 @@
|
|
|
123
135
|
<li><strong>state</strong>: Target state after mode change.</li>
|
|
124
136
|
<li><strong>options</strong>: Animation duration and effect.</li>
|
|
125
137
|
</ul>
|
|
138
|
+
<blockquote>
|
|
139
|
+
<p>详见 <a href="features_mode.html">Mode</a>。</p>
|
|
140
|
+
</blockquote>
|
|
126
141
|
<h3 id="_-4" class="tsd-anchor-link"><code>moveToPano(panoIndex, options?)</code><a href="#_-4" 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></h3>
|
|
127
142
|
<p>Moves to a specific panorama spot.</p>
|
|
128
143
|
<ul>
|
|
129
144
|
<li><strong>panoIndex</strong>: Index of the panorama.</li>
|
|
130
|
-
<li><strong>options</strong>: <code>{ effect?: MovePanoEffect, duration?: number }</code>.</li>
|
|
145
|
+
<li><strong>options</strong>: <code>{ effect?: MovePanoEffect, duration?: number, effectEasing?: Function }</code>.</li>
|
|
131
146
|
</ul>
|
|
132
|
-
<
|
|
147
|
+
<blockquote>
|
|
148
|
+
<p>详见 <a href="features_move-pano-effect.html">Move Pano Effect</a> 和 <a href="features_camera-animation.html">Camera Animation</a>。</p>
|
|
149
|
+
</blockquote>
|
|
150
|
+
<h3 id="_-5" class="tsd-anchor-link"><code>updateCamera(pose, duration, userAction?)</code><a href="#_-5" 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></h3>
|
|
151
|
+
<p>Animates the camera to a target pose without changing pano index.</p>
|
|
152
|
+
<ul>
|
|
153
|
+
<li><strong>pose</strong>: Partial <code>Pose</code> object (longitude, latitude, fov, etc.).</li>
|
|
154
|
+
<li><strong>duration</strong>: Animation duration in ms.</li>
|
|
155
|
+
<li><strong>returns</strong>: <code>Promise<void></code> (rejects if interrupted).</li>
|
|
156
|
+
</ul>
|
|
157
|
+
<blockquote>
|
|
158
|
+
<p>详见 <a href="features_camera-animation.html">Camera Animation</a>。</p>
|
|
159
|
+
</blockquote>
|
|
160
|
+
<h3 id="_-6" class="tsd-anchor-link"><code>ready(args?)</code><a href="#_-6" 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></h3>
|
|
161
|
+
<p>Returns a Promise that resolves when Five is stable (state synced, model loaded, optionally tiles loaded).</p>
|
|
162
|
+
<ul>
|
|
163
|
+
<li><strong>args</strong>: <code>{ tile?: boolean }</code> — if <code>tile: true</code> in Panorama mode, waits for tile loading.</li>
|
|
164
|
+
</ul>
|
|
165
|
+
<h3 id="_-7" class="tsd-anchor-link"><code>refresh(size?)</code><a href="#_-7" 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></h3>
|
|
133
166
|
<p>Resizes the renderer to fit the container or specified size.</p>
|
|
134
|
-
<h3 id="_-
|
|
167
|
+
<h3 id="_-8" class="tsd-anchor-link"><code>getElement()</code><a href="#_-8" 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></h3>
|
|
135
168
|
<p>Returns the <code><canvas></code> element used by Five.</p>
|
|
136
|
-
<h3 id="_-
|
|
169
|
+
<h3 id="_-9" class="tsd-anchor-link"><code>project2d(vector, testModel?)</code><a href="#_-9" 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></h3>
|
|
137
170
|
<p>Projects a 3D point to 2D screen coordinates.</p>
|
|
138
171
|
<ul>
|
|
139
172
|
<li><strong>vector</strong>: <code>THREE.Vector3</code> (World Space).</li>
|
|
140
173
|
<li><strong>testModel</strong>: <code>boolean</code> (default <code>false</code>). If <code>true</code>, checks for occlusion.</li>
|
|
141
174
|
<li><strong>returns</strong>: <code>THREE.Vector2</code> (Screen Space, px) or <code>null</code>.</li>
|
|
142
175
|
</ul>
|
|
143
|
-
<
|
|
176
|
+
<blockquote>
|
|
177
|
+
<p>详见 <a href="features_screen-project.html">Screen & Space Projection</a>。</p>
|
|
178
|
+
</blockquote>
|
|
179
|
+
<h3 id="_-10" class="tsd-anchor-link"><code>getPixels(options)</code><a href="#_-10" 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></h3>
|
|
144
180
|
<p>Get pixel data from the renderer (e.g. for color picking or magnifier).</p>
|
|
145
181
|
<ul>
|
|
146
|
-
<li><strong>x, y
|
|
147
|
-
<li><strong>width, height</strong>: Size of the rectangle.</li>
|
|
182
|
+
<li><strong>options</strong>: <code>{ x, y, width, height, pixelRatio?, flipY?, buffer?, skipPanorama?, helperVisible? }</code></li>
|
|
148
183
|
<li><strong>returns</strong>: <code>Uint8Array</code> (RGBA data).</li>
|
|
149
184
|
</ul>
|
|
150
|
-
<
|
|
185
|
+
<blockquote>
|
|
186
|
+
<p>详见 <a href="features_get-screen-pixels.html">Get Screen Pixels</a>。</p>
|
|
187
|
+
</blockquote>
|
|
188
|
+
<h3 id="_-11" class="tsd-anchor-link"><code>intersectRaycaster(raycaster)</code><a href="#_-11" 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></h3>
|
|
151
189
|
<p>(On <code>five.model</code>) Performs raycasting against the scene models.</p>
|
|
152
190
|
<ul>
|
|
153
|
-
<li><strong>raycaster</strong>: <code>THREE.Raycaster</code
|
|
154
|
-
<li><strong>returns</strong>: <code>THREE.Intersection[]</code
|
|
191
|
+
<li><strong>raycaster</strong>: <code>THREE.Raycaster</code> (supports extended props: <code>firstHitOnly</code>, <code>hitFilter</code>, <code>sortByDistance</code>, <code>floorIndex</code>).</li>
|
|
192
|
+
<li><strong>returns</strong>: <code>THREE.Intersection[]</code> (extended with <code>tile</code>, <code>viewLayer</code>, <code>model</code> fields).</li>
|
|
155
193
|
</ul>
|
|
156
|
-
<
|
|
157
|
-
<p
|
|
194
|
+
<blockquote>
|
|
195
|
+
<p>详见 <a href="features_raycast.html">Raycast</a>。</p>
|
|
196
|
+
</blockquote>
|
|
197
|
+
<h3 id="_-12" class="tsd-anchor-link"><code>addPass(pass)</code> / <code>removePass(pass)</code><a href="#_-12" 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></h3>
|
|
198
|
+
<p>Add or remove a post-processing pass to/from the rendering chain.</p>
|
|
158
199
|
<ul>
|
|
159
|
-
<li><strong>pass</strong>: <code>FivePass</code> instance (e.g. <code>
|
|
200
|
+
<li><strong>pass</strong>: <code>FivePass</code> instance (e.g. <code>GaussianBlurPass</code>, <code>FlowingLight2DPass</code>).</li>
|
|
160
201
|
</ul>
|
|
161
|
-
<
|
|
162
|
-
<p
|
|
163
|
-
|
|
164
|
-
<
|
|
165
|
-
|
|
166
|
-
<
|
|
202
|
+
<blockquote>
|
|
203
|
+
<p>详见 <a href="features_postprocessing.html">Postprocessing</a>。</p>
|
|
204
|
+
</blockquote>
|
|
205
|
+
<h3 id="_-13" class="tsd-anchor-link"><code>updateConfiguration(config)</code><a href="#_-13" 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></h3>
|
|
206
|
+
<p>Dynamically update mode configurations after initialization (e.g., panorama, mapview settings).</p>
|
|
207
|
+
<blockquote>
|
|
208
|
+
<p>详见 <a href="../../ai_guides/features/mode.md#%E5%8A%A8%E6%80%81%E4%BF%AE%E6%94%B9%E9%85%8D%E7%BD%AE-update-configuration">Mode</a>。</p>
|
|
209
|
+
</blockquote>
|
|
210
|
+
<h3 id="_-14" class="tsd-anchor-link"><code>dispose()</code><a href="#_-14" 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></h3>
|
|
167
211
|
<p>Destroys the Five instance and releases resources.</p>
|
|
168
212
|
<h2 id="state-management" class="tsd-anchor-link">State Management<a href="#state-management" 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></h2>
|
|
169
213
|
<p>The <code>State</code> interface defines the complete status of the Five instance at any moment.</p>
|
|
@@ -171,7 +215,10 @@
|
|
|
171
215
|
</code><button type="button">Copy</button></pre>
|
|
172
216
|
|
|
173
217
|
<h2 id="data-structures" class="tsd-anchor-link">Data Structures<a href="#data-structures" 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></h2>
|
|
174
|
-
<
|
|
218
|
+
<blockquote>
|
|
219
|
+
<p>以下为核心数据结构摘要。完整定义见 <a href="features_work.html">Work</a>、<a href="features_state.html">State</a>、<a href="features_model.html">Model</a>。</p>
|
|
220
|
+
</blockquote>
|
|
221
|
+
<h3 id="_-15" class="tsd-anchor-link"><code>Work</code><a href="#_-15" 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></h3>
|
|
175
222
|
<p>The main data object containing the scene description.</p>
|
|
176
223
|
<pre><code class="typescript"><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Work</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">workCode</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">; </span><span class="hl-8">// Unique identifier</span><br/><span class="hl-1"> </span><span class="hl-6">name</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">; </span><span class="hl-8">// Project name</span><br/><span class="hl-1"> </span><span class="hl-6">observers</span><span class="hl-1">: </span><span class="hl-7">WorkObserver</span><span class="hl-1">[]; </span><span class="hl-8">// List of panorama points</span><br/><span class="hl-1"> </span><span class="hl-6">model</span><span class="hl-1">: </span><span class="hl-7">WorkModel</span><span class="hl-1">; </span><span class="hl-8">// 3D model data</span><br/><span class="hl-1"> </span><span class="hl-6">initial</span><span class="hl-1">: </span><span class="hl-7">WorkInitial</span><span class="hl-1">; </span><span class="hl-8">// Initial view state</span><br/><span class="hl-1"> </span><span class="hl-6">transform</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Matrix4</span><span class="hl-1">; </span><span class="hl-8">// World transform matrix</span><br/><span class="hl-1">}</span>
|
|
177
224
|
</code><button type="button">Copy</button></pre>
|
|
@@ -243,6 +290,9 @@
|
|
|
243
290
|
</tr>
|
|
244
291
|
</tbody>
|
|
245
292
|
</table>
|
|
293
|
+
<blockquote>
|
|
294
|
+
<p>手势事件详解及不同 Mode 下的默认行为见 <a href="features_gesture.html">Gesture</a>。</p>
|
|
295
|
+
</blockquote>
|
|
246
296
|
<h4 id="state-mode" class="tsd-anchor-link">State & Mode<a href="#state-mode" 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>
|
|
247
297
|
<table>
|
|
248
298
|
<thead>
|
|
@@ -270,6 +320,9 @@
|
|
|
270
320
|
</tr>
|
|
271
321
|
</tbody>
|
|
272
322
|
</table>
|
|
323
|
+
<blockquote>
|
|
324
|
+
<p>状态管理详见 <a href="features_state.html">State</a>,模式切换详见 <a href="features_mode.html">Mode</a>。</p>
|
|
325
|
+
</blockquote>
|
|
273
326
|
<h4 id="lifecycle-resources" class="tsd-anchor-link">Lifecycle & Resources<a href="#lifecycle-resources" 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>
|
|
274
327
|
<table>
|
|
275
328
|
<thead>
|
|
@@ -296,6 +349,16 @@
|
|
|
296
349
|
<td style="text-align:left"><code>ModelSceneEvent</code></td>
|
|
297
350
|
</tr>
|
|
298
351
|
<tr>
|
|
352
|
+
<td style="text-align:left"><code>models.refined</code></td>
|
|
353
|
+
<td style="text-align:left">Triggered when all models finish texture refinement.</td>
|
|
354
|
+
<td style="text-align:left"><code>ModelSceneEvent</code></td>
|
|
355
|
+
</tr>
|
|
356
|
+
<tr>
|
|
357
|
+
<td style="text-align:left"><code>model.load</code></td>
|
|
358
|
+
<td style="text-align:left">Triggered when a single model geometry is loaded.</td>
|
|
359
|
+
<td style="text-align:left"><code>ModelEvent</code></td>
|
|
360
|
+
</tr>
|
|
361
|
+
<tr>
|
|
299
362
|
<td style="text-align:left"><code>model.tileLoad</code></td>
|
|
300
363
|
<td style="text-align:left">Triggered when a 3D tile is loaded.</td>
|
|
301
364
|
<td style="text-align:left"><code>ModelTileEvent</code></td>
|
|
@@ -306,6 +369,16 @@
|
|
|
306
369
|
<td style="text-align:left"><code>ModelTileEvent</code></td>
|
|
307
370
|
</tr>
|
|
308
371
|
<tr>
|
|
372
|
+
<td style="text-align:left"><code>model.changeShownFloor</code></td>
|
|
373
|
+
<td style="text-align:left">Triggered when floor visibility changes.</td>
|
|
374
|
+
<td style="text-align:left"><code>ModelEvent</code></td>
|
|
375
|
+
</tr>
|
|
376
|
+
<tr>
|
|
377
|
+
<td style="text-align:left"><code>model.error</code></td>
|
|
378
|
+
<td style="text-align:left">Triggered when model loading fails.</td>
|
|
379
|
+
<td style="text-align:left"><code>ModelErrorEvent</code></td>
|
|
380
|
+
</tr>
|
|
381
|
+
<tr>
|
|
309
382
|
<td style="text-align:left"><code>pano.prepare</code></td>
|
|
310
383
|
<td style="text-align:left">Triggered before switching to a new pano. <code>ExtendableEvent</code>, supports <code>waitUntil</code>.</td>
|
|
311
384
|
<td style="text-align:left"><code>PanoPrepareEvent</code></td>
|
|
@@ -347,6 +420,11 @@
|
|
|
347
420
|
</tr>
|
|
348
421
|
</tbody>
|
|
349
422
|
</table>
|
|
423
|
+
<blockquote>
|
|
424
|
+
<p>事件系统详解见 <a href="features_event.html">Event</a>。手势事件详解见 <a href="features_gesture.html">Gesture</a>。
|
|
425
|
+
<code>pano.prepare</code> 的 <code>waitUntil</code> / <code>preventDefault</code> 用法见 <a href="../../ai_guides/features/event.md#event-%E5%AF%B9%E8%B1%A1">Event - Event 对象</a>。
|
|
426
|
+
模型生命周期事件见 <a href="../../ai_guides/features/model.md#events">Model</a> 和 <a href="features_load-progress.html">Load Progress</a>。</p>
|
|
427
|
+
</blockquote>
|
|
350
428
|
<h3 id="legacy-events-deprecated" class="tsd-anchor-link">Legacy Events (Deprecated)<a href="#legacy-events-deprecated" 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></h3>
|
|
351
429
|
<p>Older events are still supported for compatibility but should be avoided in new code.</p>
|
|
352
430
|
<table>
|
|
@@ -384,4 +462,4 @@
|
|
|
384
462
|
<pre><code class="typescript"><span class="hl-8">// Recommended: Use the new event system</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-5">on</span><span class="hl-1">(</span><span class="hl-9">'gesture.tap'</span><span class="hl-1">, (</span><span class="hl-6">event</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-9">'User tapped at:'</span><span class="hl-1">, </span><span class="hl-6">event</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-8">// Legacy (Avoid):</span><br/><span class="hl-8">// five.on('wantsTapGesture', (raycaster) => { ... });</span>
|
|
385
463
|
</code><button type="button">Copy</button></pre>
|
|
386
464
|
|
|
387
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#five-sdk-api-reference"><span>Five <wbr/>SDK <wbr/>API <wbr/>Reference</span></a><ul><li><a href="#core-class"><span>Core <wbr/>Class: </span></a></li><li><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><a href="#static-properties"><span>Static <wbr/>Properties</span></a></li></ul></li><li><a href="#initialization-configuration-"><span>Initialization <wbr/>Configuration ()</span></a></li><li><a href="#core-methods"><span>Core <wbr/>Methods</span></a></li><li><ul><li><a href="#_"><span></span></a></li><li><a href="#_-1"><span></span></a></li><li><a href="#_-2"><span></span></a></li><li><a href="#_-3"><span></span></a></li><li><a href="#_-4"><span></span></a></li><li><a href="#_-5"><span></span></a></li><li><a href="#_-6"><span></span></a></li><li><a href="#_-7"><span></span></a></li><li><a href="#_-8"><span></span></a></li><li><a href="#_-9"><span></span></a></li><li><a href="#_-10"><span></span></a></li><li><a href="#_-11"><span></span></a></li><li><a href="#_-12"><span></span></a></li></ul></li><li><a href="#state-management"><span>State <wbr/>Management</span></a></li><li><a href="#data-structures"><span>Data <wbr/>Structures</span></a></li><li><ul><li><a href="#_-
|
|
465
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#five-sdk-api-reference"><span>Five <wbr/>SDK <wbr/>API <wbr/>Reference</span></a><ul><li><a href="#core-class"><span>Core <wbr/>Class: </span></a></li><li><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><a href="#static-properties"><span>Static <wbr/>Properties</span></a></li></ul></li><li><a href="#initialization-configuration-"><span>Initialization <wbr/>Configuration ()</span></a></li><li><a href="#core-methods"><span>Core <wbr/>Methods</span></a></li><li><ul><li><a href="#_"><span></span></a></li><li><a href="#_-1"><span></span></a></li><li><a href="#_-2"><span></span></a></li><li><a href="#_-3"><span></span></a></li><li><a href="#_-4"><span></span></a></li><li><a href="#_-5"><span></span></a></li><li><a href="#_-6"><span></span></a></li><li><a href="#_-7"><span></span></a></li><li><a href="#_-8"><span></span></a></li><li><a href="#_-9"><span></span></a></li><li><a href="#_-10"><span></span></a></li><li><a href="#_-11"><span></span></a></li><li><a href="#_-12"><span> / </span></a></li><li><a href="#_-13"><span></span></a></li><li><a href="#_-14"><span></span></a></li></ul></li><li><a href="#state-management"><span>State <wbr/>Management</span></a></li><li><a href="#data-structures"><span>Data <wbr/>Structures</span></a></li><li><ul><li><a href="#_-15"><span></span></a></li><li><a href="#panorama-point"><span> (<wbr/>Panorama <wbr/>Point)</span></a></li></ul></li><li><a href="#events"><span>Events</span></a></li><li><ul><li><a href="#recommended-events-modern"><span>Recommended <wbr/>Events (<wbr/>Modern)</span></a></li><li><ul><li><a href="#interaction-gestures"><span>Interaction & <wbr/>Gestures</span></a></li><li><a href="#state-mode"><span>State & <wbr/>Mode</span></a></li><li><a href="#lifecycle-resources"><span>Lifecycle & <wbr/>Resources</span></a></li></ul></li><li><a href="#legacy-events-deprecated"><span>Legacy <wbr/>Events (<wbr/>Deprecated)</span></a></li><li><a href="#usage-example"><span>Usage <wbr/>Example</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
<li><a href="features_work.html">Work</a>: 了解 Work 数据结构。</li>
|
|
211
211
|
</ul>
|
|
212
212
|
<hr>
|
|
213
|
-
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">3dtile</span><span class="hl-1">, </span><span class="hl-2">viewLayer</span><span class="hl-1">, </span><span class="hl-2">performance</span><span class="hl-1">, </span><span class="hl-2">lod</span><span class="hl-1">, </span><span class="hl-2">optimization</span><span class="hl-1">]</span>
|
|
213
|
+
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">大场景</span><span class="hl-1">, </span><span class="hl-2">瓦片</span><span class="hl-1">, </span><span class="hl-2">显存</span><span class="hl-1">, </span><span class="hl-2">画质</span><span class="hl-1">, </span><span class="hl-2">性能优化</span><span class="hl-1">, </span><span class="hl-2">流式加载</span><span class="hl-1">, </span><span class="hl-2">3dtile</span><span class="hl-1">, </span><span class="hl-2">viewLayer</span><span class="hl-1">, </span><span class="hl-2">performance</span><span class="hl-1">, </span><span class="hl-2">lod</span><span class="hl-1">, </span><span class="hl-2">optimization</span><span class="hl-1">, </span><span class="hl-2">tile-loading</span><span class="hl-1">, </span><span class="hl-2">memory</span><span class="hl-1">, </span><span class="hl-2">sse</span><span class="hl-1">, </span><span class="hl-2">screen-space-error</span><span class="hl-1">]</span>
|
|
214
214
|
</code><button type="button">Copy</button></pre>
|
|
215
215
|
|
|
216
216
|
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#3dtile-3d-瓦片"><span>3<wbr/>D<wbr/>Tile (3<wbr/>D 瓦片)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#1-lod-screen-space-error-sse"><span>1. <wbr/>LOD & <wbr/>Screen <wbr/>Space <wbr/>Error (<wbr/>SSE)</span></a></li><li><a href="#2-显存管理-cache-management"><span>2. 显存管理 (<wbr/>Cache <wbr/>Management)</span></a></li><li><a href="#3-viewlayer-与-3dtile"><span>3. <wbr/>View<wbr/>Layer 与 3<wbr/>D<wbr/>Tile</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#core-quality-performance-核心画质与性能"><span>Core <wbr/>Quality & <wbr/>Performance (核心画质与性能)</span></a></li><li><a href="#geometric-error-control-几何误差控制"><span>Geometric <wbr/>Error <wbr/>Control (几何误差控制)</span></a></li><li><a href="#network-loading-网络与加载"><span>Network & <wbr/>Loading (网络与加载)</span></a></li><li><a href="#legacy-lod-control-不推荐"><span>Legacy <wbr/>LOD <wbr/>Control (不推荐)</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-adjusting-quality-memory-调整画质与内存平衡"><span>1. <wbr/>Adjusting <wbr/>Quality & <wbr/>Memory (调整画质与内存平衡)</span></a></li><li><a href="#2-multi-viewlayer-optimization-多-viewlayer-优化"><span>2. <wbr/>Multi-<wbr/>View<wbr/>Layer <wbr/>Optimization (多 <wbr/>View<wbr/>Layer 优化)</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -45,6 +45,20 @@
|
|
|
45
45
|
<pre><code class="typescript"><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-5">changeMode</span><span class="hl-1">(</span><span class="hl-6">mode</span><span class="hl-1">: </span><span class="hl-6">Mode</span><span class="hl-1">, </span><span class="hl-6">options</span><span class="hl-1">?, </span><span class="hl-6">animationOptions</span><span class="hl-1">?): </span><span class="hl-7">Promise</span><span class="hl-1"><</span><span class="hl-3">void</span><span class="hl-1">></span>
|
|
46
46
|
</code><button type="button">Copy</button></pre>
|
|
47
47
|
|
|
48
|
+
<h3 id="4-updatecamera" class="tsd-anchor-link">4. updateCamera<a href="#4-updatecamera" 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></h3>
|
|
49
|
+
<p>在不切换全景点位的情况下,将相机平滑动画到目标位姿。适用于"定点环顾"或"聚焦某个方向"等场景。</p>
|
|
50
|
+
<pre><code class="typescript"><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-5">updateCamera</span><span class="hl-1">(</span><span class="hl-6">pose</span><span class="hl-1">: </span><span class="hl-6">Partial</span><span class="hl-1"><</span><span class="hl-6">Pose</span><span class="hl-1">>, </span><span class="hl-6">duration</span><span class="hl-1">: </span><span class="hl-6">number</span><span class="hl-1">, </span><span class="hl-6">userAction</span><span class="hl-1">?: </span><span class="hl-6">boolean</span><span class="hl-1">): </span><span class="hl-7">Promise</span><span class="hl-1"><</span><span class="hl-3">void</span><span class="hl-1">></span>
|
|
51
|
+
</code><button type="button">Copy</button></pre>
|
|
52
|
+
|
|
53
|
+
<ul>
|
|
54
|
+
<li><code>pose</code>: 目标位姿 (longitude, latitude, fov, offset, distance 等)。</li>
|
|
55
|
+
<li><code>duration</code>: 动画时长 (ms)。</li>
|
|
56
|
+
<li><code>userAction</code>: 是否标记为用户触发。</li>
|
|
57
|
+
<li><strong>返回</strong>: <code>Promise<void></code>,动画完成时 resolve,被打断时 reject。</li>
|
|
58
|
+
</ul>
|
|
59
|
+
<blockquote>
|
|
60
|
+
<p>与 <code>setState</code> 的区别:<code>updateCamera</code> 返回 Promise,可以精确等待动画结束;<code>setState</code> 是 fire-and-forget 风格。</p>
|
|
61
|
+
</blockquote>
|
|
48
62
|
<h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" 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></h2>
|
|
49
63
|
<h3 id="pose-位姿" class="tsd-anchor-link">Pose (位姿)<a href="#pose-位姿" 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></h3>
|
|
50
64
|
<p>相机的状态主要由位姿描述:</p>
|
|
@@ -149,9 +163,11 @@
|
|
|
149
163
|
<li><a href="features_five.html">Five</a>: Five 核心类及 <code>setState</code> 方法。</li>
|
|
150
164
|
<li><a href="features_mode.html">Mode</a>: 各种交互模式说明。</li>
|
|
151
165
|
<li><a href="features_state.html">State</a>: 状态对象的完整定义。</li>
|
|
166
|
+
<li><a href="features_move-pano-effect.html">Move Pano Effect</a>: 全景点位切换的过渡效果配置。</li>
|
|
167
|
+
<li><a href="features_coordinate-system.html">Coordinate System</a>: 坐标系定义,理解 longitude/latitude 的含义。</li>
|
|
152
168
|
</ul>
|
|
153
169
|
<hr>
|
|
154
|
-
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">camera-animation</span><span class="hl-1">, </span><span class="hl-2">pose</span><span class="hl-1">, </span><span class="hl-2">state</span><span class="hl-1">]</span>
|
|
170
|
+
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">巡航</span><span class="hl-1">, </span><span class="hl-2">动画</span><span class="hl-1">, </span><span class="hl-2">旋转</span><span class="hl-1">, </span><span class="hl-2">缩放</span><span class="hl-1">, </span><span class="hl-2">运镜</span><span class="hl-1">, </span><span class="hl-2">导览</span><span class="hl-1">, </span><span class="hl-2">camera-animation</span><span class="hl-1">, </span><span class="hl-2">pose</span><span class="hl-1">, </span><span class="hl-2">state</span><span class="hl-1">, </span><span class="hl-2">auto-tour</span><span class="hl-1">, </span><span class="hl-2">fly-through</span><span class="hl-1">, </span><span class="hl-2">rotate</span><span class="hl-1">, </span><span class="hl-2">zoom</span><span class="hl-1">, </span><span class="hl-2">transition</span><span class="hl-1">]</span>
|
|
155
171
|
</code><button type="button">Copy</button></pre>
|
|
156
172
|
|
|
157
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#相机动画-camera-animation"><span>相机动画 (<wbr/>Camera <wbr/>Animation)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><ul><li><a href="#movepanooptions"><span>Move<wbr/>Pano<wbr/>Options</span></a></li><li><a href="#movepanoeffect"><span>Move<wbr/>Pano<wbr/>Effect</span></a></li></ul></li><li><a href="#core-methods-核心方法"><span>Core <wbr/>Methods (核心方法)</span></a></li><li><ul><li><a href="#1-setstate"><span>1. set<wbr/>State</span></a></li><li><a href="#2-movetopano"><span>2. move<wbr/>To<wbr/>Pano</span></a></li><li><a href="#3-changemode"><span>3. change<wbr/>Mode</span></a></li></ul></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#pose-位姿"><span>Pose (位姿)</span></a></li><li><a href="#animation-effects-动画效果"><span>Animation <wbr/>Effects (动画效果)</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#global-configuration-全局配置"><span>Global <wbr/>Configuration (全局配置)</span></a></li><li><a href="#movepanooptions-configuration-移动参数"><span>Move<wbr/>Pano<wbr/>Options <wbr/>Configuration (移动参数)</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-旋转视角-rotate-camera"><span>1. 旋转视角 (<wbr/>Rotate <wbr/>Camera)</span></a></li><li><a href="#2-切换全景点-change-pano"><span>2. 切换全景点 (<wbr/>Change <wbr/>Pano)</span></a></li><li><a href="#3-模态切换-change-mode"><span>3. 模态切换 (<wbr/>Change <wbr/>Mode)</span></a></li><li><a href="#4-自动巡更-auto-tour"><span>4. 自动巡更 (<wbr/>Auto <wbr/>Tour)</span></a></li></ul></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
173
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#相机动画-camera-animation"><span>相机动画 (<wbr/>Camera <wbr/>Animation)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><ul><li><a href="#movepanooptions"><span>Move<wbr/>Pano<wbr/>Options</span></a></li><li><a href="#movepanoeffect"><span>Move<wbr/>Pano<wbr/>Effect</span></a></li></ul></li><li><a href="#core-methods-核心方法"><span>Core <wbr/>Methods (核心方法)</span></a></li><li><ul><li><a href="#1-setstate"><span>1. set<wbr/>State</span></a></li><li><a href="#2-movetopano"><span>2. move<wbr/>To<wbr/>Pano</span></a></li><li><a href="#3-changemode"><span>3. change<wbr/>Mode</span></a></li><li><a href="#4-updatecamera"><span>4. update<wbr/>Camera</span></a></li></ul></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#pose-位姿"><span>Pose (位姿)</span></a></li><li><a href="#animation-effects-动画效果"><span>Animation <wbr/>Effects (动画效果)</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#global-configuration-全局配置"><span>Global <wbr/>Configuration (全局配置)</span></a></li><li><a href="#movepanooptions-configuration-移动参数"><span>Move<wbr/>Pano<wbr/>Options <wbr/>Configuration (移动参数)</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-旋转视角-rotate-camera"><span>1. 旋转视角 (<wbr/>Rotate <wbr/>Camera)</span></a></li><li><a href="#2-切换全景点-change-pano"><span>2. 切换全景点 (<wbr/>Change <wbr/>Pano)</span></a></li><li><a href="#3-模态切换-change-mode"><span>3. 模态切换 (<wbr/>Change <wbr/>Mode)</span></a></li><li><a href="#4-自动巡更-auto-tour"><span>4. 自动巡更 (<wbr/>Auto <wbr/>Tour)</span></a></li></ul></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
</ol>
|
|
72
72
|
<h2 id="related" class="tsd-anchor-link">Related<a href="#related" 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></h2>
|
|
73
73
|
<ul>
|
|
74
|
-
<li><a href="features_model.html">
|
|
74
|
+
<li><a href="features_model.html">Model</a>: 模型模块概览。</li>
|
|
75
75
|
</ul>
|
|
76
76
|
<hr>
|
|
77
|
-
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">clipper</span><span class="hl-1">, </span><span class="hl-2">model</span><span class="hl-1">, </span><span class="hl-2">cut</span><span class="hl-1">, </span><span class="hl-2">discard</span><span class="hl-1">, </span><span class="hl-2">geometry</span><span class="hl-1">]</span>
|
|
77
|
+
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">裁切</span><span class="hl-1">, </span><span class="hl-2">剖面</span><span class="hl-1">, </span><span class="hl-2">隐藏部分模型</span><span class="hl-1">, </span><span class="hl-2">开盖</span><span class="hl-1">, </span><span class="hl-2">房屋剖面</span><span class="hl-1">, </span><span class="hl-2">clipper</span><span class="hl-1">, </span><span class="hl-2">model</span><span class="hl-1">, </span><span class="hl-2">cut</span><span class="hl-1">, </span><span class="hl-2">discard</span><span class="hl-1">, </span><span class="hl-2">geometry</span><span class="hl-1">, </span><span class="hl-2">clipping-box</span><span class="hl-1">, </span><span class="hl-2">section-view</span><span class="hl-1">]</span>
|
|
78
78
|
</code><button type="button">Copy</button></pre>
|
|
79
79
|
|
|
80
80
|
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#模型裁切-model-clipper"><span>模型裁切 (<wbr/>Model <wbr/>Clipper)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#clipping-box-裁切盒"><span>Clipping <wbr/>Box (裁切盒)</span></a></li><li><a href="#matrix-transformation-矩阵变换"><span>Matrix <wbr/>Transformation (矩阵变换)</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#基础用法-basic-usage"><span>基础用法 (<wbr/>Basic <wbr/>Usage)</span></a></li><li><a href="#动态更新-dynamic-update"><span>动态更新 (<wbr/>Dynamic <wbr/>Update)</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -20,6 +20,52 @@
|
|
|
20
20
|
</code><button type="button">Copy</button></pre>
|
|
21
21
|
|
|
22
22
|
<h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" 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></h2>
|
|
23
|
+
<h3 id="overview-坐标系总览" class="tsd-anchor-link">Overview (坐标系总览)<a href="#overview-坐标系总览" 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></h3>
|
|
24
|
+
<p>Five 中涉及多个坐标系,它们在不同场景下各有用途。理解它们的关系是正确使用 Five 的关键。</p>
|
|
25
|
+
<table>
|
|
26
|
+
<thead>
|
|
27
|
+
<tr>
|
|
28
|
+
<th style="text-align:left">坐标系</th>
|
|
29
|
+
<th style="text-align:left">上轴</th>
|
|
30
|
+
<th style="text-align:left">适用场景</th>
|
|
31
|
+
<th style="text-align:left">说明</th>
|
|
32
|
+
</tr>
|
|
33
|
+
</thead>
|
|
34
|
+
<tbody>
|
|
35
|
+
<tr>
|
|
36
|
+
<td style="text-align:left"><strong>Local (Y-up)</strong></td>
|
|
37
|
+
<td style="text-align:left">Y</td>
|
|
38
|
+
<td style="text-align:left">渲染场景、前端开发</td>
|
|
39
|
+
<td style="text-align:left">Five 的 <code>five.scene</code>、Observer 位置、<code>project2d</code> 等均使用此坐标系。与 Three.js 默认一致。</td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td style="text-align:left"><strong>ENU (Z-up)</strong></td>
|
|
43
|
+
<td style="text-align:left">Z</td>
|
|
44
|
+
<td style="text-align:left">算法交互、后端接口、模型原始数据</td>
|
|
45
|
+
<td style="text-align:left">测绘行业习惯。3D Tiles 数据源、<code>loadGltf</code> 等加载器默认输出 Z-up。</td>
|
|
46
|
+
</tr>
|
|
47
|
+
<tr>
|
|
48
|
+
<td style="text-align:left"><strong>ECEF</strong></td>
|
|
49
|
+
<td style="text-align:left">-</td>
|
|
50
|
+
<td style="text-align:left">RTK 定位、地球坐标</td>
|
|
51
|
+
<td style="text-align:left">地心地固坐标系,用于包含 RTK 信息的模型。</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td style="text-align:left"><strong>World</strong></td>
|
|
55
|
+
<td style="text-align:left">Y</td>
|
|
56
|
+
<td style="text-align:left">Three.js 世界坐标</td>
|
|
57
|
+
<td style="text-align:left">通常等同于 Local,除非有 Object3D 层级嵌套偏移。</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</tbody>
|
|
60
|
+
</table>
|
|
61
|
+
<blockquote>
|
|
62
|
+
<p><strong>关键区分</strong>:</p>
|
|
63
|
+
<ul>
|
|
64
|
+
<li><strong>开发者在 <code>five.scene</code> 中操作的所有对象</strong>(添加标签、射线检测结果、<code>project2d</code> 输入等)都处于 <strong>Local (Y-up)</strong> 坐标系。</li>
|
|
65
|
+
<li><strong>模型数据源</strong>(3D Tiles、PLY、GLTF 等文件)通常以 <strong>ENU (Z-up)</strong> 存储。Five 在加载时会自动将其旋转对齐到 Local (Y-up)。</li>
|
|
66
|
+
<li><strong>与后端/算法交互</strong>时,推荐使用 <strong>ENU (Z-up)</strong> 坐标系传输数据,通过 <code>viewLayer.localToEnu()</code> / <code>viewLayer.enuToLocal()</code> 进行转换。</li>
|
|
67
|
+
</ul>
|
|
68
|
+
</blockquote>
|
|
23
69
|
<h3 id="local-coordinate-system-y-up" class="tsd-anchor-link">Local Coordinate System (Y-up)<a href="#local-coordinate-system-y-up" 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></h3>
|
|
24
70
|
<p>Five 的渲染场景 (<code>five.scene</code>) 和 Observers (观察点) 使用 <strong>Y-up</strong> (Y 轴向上) 的右手坐标系。
|
|
25
71
|
这与 Three.js 的默认坐标系一致,便于前端开发和场景渲染。</p>
|
|
@@ -52,6 +98,9 @@
|
|
|
52
98
|
</ul>
|
|
53
99
|
</li>
|
|
54
100
|
</ol>
|
|
101
|
+
<blockquote>
|
|
102
|
+
<p><strong>注意</strong>: 外部模型加载函数(如 <code>loadGltf</code>, <code>loadPly</code> 等)的 <code>upAxis</code> 参数默认为 <code>'Z'</code>,表示输出的模型以 Z-up 存储。这是因为这些函数返回的是<strong>原始模型对象</strong>,尚未经过 Five 的自动对齐。当你通过 <code>five.load(work)</code> 加载 Work 数据时,Five 会自动完成 Z-up → Y-up 的转换。如果你手动使用 <code>loadGltf</code> 并添加到 <code>five.scene</code>,需要自行处理坐标系旋转。详见 <a href="features_load-external-model.html">Load External Model</a>。</p>
|
|
103
|
+
</blockquote>
|
|
55
104
|
<h3 id="coordinate-in-files" class="tsd-anchor-link">Coordinate in Files<a href="#coordinate-in-files" 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></h3>
|
|
56
105
|
<p>在 3D Tiles 的 <code>tileset.json</code> 中,<code>rootMeta</code> 字段用于描述坐标系转换信息(没有该字段则默认 Z-up):</p>
|
|
57
106
|
<ul>
|
|
@@ -118,10 +167,10 @@
|
|
|
118
167
|
|
|
119
168
|
<h2 id="related" class="tsd-anchor-link">Related<a href="#related" 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></h2>
|
|
120
169
|
<ul>
|
|
121
|
-
<li><a href="features_load-external-model.html">
|
|
170
|
+
<li><a href="features_load-external-model.html">Load External Model</a>: 加载外部模型时的坐标轴配置 (<code>upAxis</code>, <code>modelUpAxis</code>)。</li>
|
|
122
171
|
</ul>
|
|
123
172
|
<hr>
|
|
124
|
-
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">coordinate-system</span><span class="hl-1">, </span><span class="hl-2">enu</span><span class="hl-1">, </span><span class="hl-2">ecef</span><span class="hl-1">, </span><span class="hl-2">z-up</span><span class="hl-1">, </span><span class="hl-2">y-up</span><span class="hl-1">, </span><span class="hl-2">transform</span><span class="hl-1">]</span>
|
|
173
|
+
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">坐标系</span><span class="hl-1">, </span><span class="hl-2">坐标转换</span><span class="hl-1">, </span><span class="hl-2">右手坐标系</span><span class="hl-1">, </span><span class="hl-2">模型方向</span><span class="hl-1">, </span><span class="hl-2">旋转</span><span class="hl-1">, </span><span class="hl-2">地理坐标</span><span class="hl-1">, </span><span class="hl-2">coordinate-system</span><span class="hl-1">, </span><span class="hl-2">enu</span><span class="hl-1">, </span><span class="hl-2">ecef</span><span class="hl-1">, </span><span class="hl-2">z-up</span><span class="hl-1">, </span><span class="hl-2">y-up</span><span class="hl-1">, </span><span class="hl-2">transform</span><span class="hl-1">, </span><span class="hl-2">local</span><span class="hl-1">, </span><span class="hl-2">world</span><span class="hl-1">, </span><span class="hl-2">rtk</span><span class="hl-1">]</span>
|
|
125
174
|
</code><button type="button">Copy</button></pre>
|
|
126
175
|
|
|
127
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#坐标系-coordinate-system"><span>坐标系 (<wbr/>Coordinate <wbr/>System)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><ul><li><a href="#rootmeta"><span>Root<wbr/>Meta</span></a></li><li><a href="#coordinate"><span>Coordinate</span></a></li></ul></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#local-coordinate-system-y-up"><span>Local <wbr/>Coordinate <wbr/>System (<wbr/>Y-<wbr/>up)</span></a></li><li><a href="#enu-coordinate-system-z-up"><span>ENU <wbr/>Coordinate <wbr/>System (<wbr/>Z-<wbr/>up)</span></a></li><li><a href="#ecef-coordinate-system"><span>ECEF <wbr/>Coordinate <wbr/>System</span></a></li><li><a href="#model-orientation-at3d-3dtiles"><span>Model <wbr/>Orientation (at3d / 3dtiles)</span></a></li><li><a href="#coordinate-in-files"><span>Coordinate in <wbr/>Files</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <wbr/>Methods</span></a></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#坐标转换-coordinate-transformation"><span>坐标转换 (<wbr/>Coordinate <wbr/>Transformation)</span></a></li></ul></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
176
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#坐标系-coordinate-system"><span>坐标系 (<wbr/>Coordinate <wbr/>System)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><ul><li><a href="#rootmeta"><span>Root<wbr/>Meta</span></a></li><li><a href="#coordinate"><span>Coordinate</span></a></li></ul></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#overview-坐标系总览"><span>Overview (坐标系总览)</span></a></li><li><a href="#local-coordinate-system-y-up"><span>Local <wbr/>Coordinate <wbr/>System (<wbr/>Y-<wbr/>up)</span></a></li><li><a href="#enu-coordinate-system-z-up"><span>ENU <wbr/>Coordinate <wbr/>System (<wbr/>Z-<wbr/>up)</span></a></li><li><a href="#ecef-coordinate-system"><span>ECEF <wbr/>Coordinate <wbr/>System</span></a></li><li><a href="#model-orientation-at3d-3dtiles"><span>Model <wbr/>Orientation (at3d / 3dtiles)</span></a></li><li><a href="#coordinate-in-files"><span>Coordinate in <wbr/>Files</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <wbr/>Methods</span></a></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#坐标转换-coordinate-transformation"><span>坐标转换 (<wbr/>Coordinate <wbr/>Transformation)</span></a></li></ul></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|