UNPKG

@realsee/five

Version:

Realsee Renderer SDK

217 lines (211 loc) • 28.5 kB
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/3dtile | 如视 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="" aria-current="page">features/3dtile</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="3dtile-3d-瓦片" class="tsd-anchor-link">3DTile (3D 瓦片)<a href="#3dtile-3d-瓦片" 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></h1> <ul> <li><strong>Summary</strong>: Five 用于加载和渲染大规模三维场景的核心模块,支持动态 LOD 调度与流式加载。</li> <li><strong>Schema</strong>: 对应 <code>ParameterTilesetValue</code> 接口,通过 Parameter 配置 LOD、显存与并发控制。</li> <li><strong>Concepts</strong>: LOD (细节层级), SSE (屏幕空间误差), Cache Management (显存管理), ViewLayer (视图层)。</li> <li><strong>Configuration</strong>: 包含画质精度、显存配额、几何误差、并发请求等详细参数。</li> <li><strong>Examples</strong>: 画质平衡与多图层优化。</li> </ul> <h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" 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> <blockquote> <p><strong>Definition</strong>: <a href="../../five/model/parameter.d.ts">ParameterTilesetValue</a></p> </blockquote> <p>以下是 <code>ParameterTilesetValue</code> 的 TypeScript 定义摘要:</p> <pre><code class="typescript"><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">ParameterTilesetValue</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** 屏幕空间误差阈值 (像素) */</span><br/><span class="hl-1"> </span><span class="hl-6">maxScreenSpaceError</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 最大显存占用 (MB) */</span><br/><span class="hl-1"> </span><span class="hl-6">maxMemoryUsage</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 最小几何误差 (精度上限锁) */</span><br/><span class="hl-1"> </span><span class="hl-6">minGeometricError</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">// ... 更多字段见下方配置表</span><br/><span class="hl-1">}</span> </code><button type="button">Copy</button></pre> <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> <h3 id="1-lod-screen-space-error-sse" class="tsd-anchor-link">1. LOD &amp; Screen Space Error (SSE)<a href="#1-lod-screen-space-error-sse" 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> <p>LOD (Level of Detail) 是 3DTile 的核心机制。引擎不会一次性加载整个从宏观到微观的所有模型数据,而是根据相机位置动态计算每个瓦片的 <strong>屏幕空间误差 (SSE)</strong>。</p> <ul> <li><strong>Geometric Error (几何误差)</strong>: 3D Tiles 数据源中定义的指标(单位:米),表示当前瓦片与真实物体之间的最大形状差异。 <ul> <li><strong>根节点</strong>: 误差巨大(如 100米),仅有模糊轮廓。</li> <li><strong>叶子节点</strong>: 误差极小(如 0.01米),细节丰富。</li> </ul> </li> <li><strong>SSE 计算逻辑</strong>: <code>SSE = (GeometricError / DistanceToCamera) * ScreenHeight</code>。</li> <li><strong>判定标准</strong>: 如果 <code>SSE &gt; maxScreenSpaceError</code>,说明当前瓦片在屏幕上看起来太粗糙(误差像素太大),需要分裂并加载下一级子瓦片;反之则停止细分。</li> <li><strong>调整影响</strong>: 调低 <code>maxScreenSpaceError</code> 会迫使引擎加载更深层级的瓦片,从而获得更清晰的细节,但也会急剧增加渲染三角形数量和显存占用。</li> </ul> <h3 id="2-显存管理-cache-management" class="tsd-anchor-link">2. 显存管理 (Cache Management)<a href="#2-显存管理-cache-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></h3> <p>为了在浏览器有限的资源下渲染海量数据(如城市级倾斜摄影),3DTile 实现了基于 LRU (Least Recently Used) 的缓存淘汰机制和动态画质调整策略。</p> <ul> <li><strong>LRU 淘汰</strong>: 当 <code>maxMemoryUsage</code> 超限时,引擎会优先保留当前视锥体内的瓦片。视锥体外的、或者距离相机较远的瓦片会被优先释放。</li> <li><strong>动态画质调整 (Dynamic Scaling)</strong>: 如果开启了 <code>memoryAdjustedScreenSpaceError</code>,引擎会以 <code>maxMemoryUsage</code> 为目标,实时调整 SSE。 <ul> <li><strong>目标</strong>: 尽量跑满 <code>maxMemoryUsage</code> 设定的显存额度,不浪费资源。</li> <li><strong>范围</strong>: 实际 SSE 会在 <code>1.0</code> (极高画质) 到 <code>maxScreenSpaceError</code> (设定底线) 之间波动。</li> <li><strong>场景</strong>: 适合显存充足但希望自动平衡画质的场景。</li> </ul> </li> </ul> <h3 id="3-viewlayer-与-3dtile" class="tsd-anchor-link">3. ViewLayer 与 3DTile<a href="#3-viewlayer-与-3dtile" 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> <p>目前所有的 <code>ViewLayer</code> 在底层都是一个 <code>Tile3D</code> 实例。它们各自拥有独立的:</p> <ul> <li><strong>配置</strong>: <code>maxScreenSpaceError</code>, <code>maxMemoryUsage</code> 等参数互不干扰。</li> <li><strong>缓存</strong>: 显存配额各自独立计算。</li> </ul> <blockquote> <p><strong>注意</strong>: 即使是通过 <code>file_url</code> 加载的单体模型(如 <code>.obj</code>, <code>.at3d</code>),在 Five 内部也会被封装为 <code>Tile3D</code> 实例进行统一管理。</p> </blockquote> <h2 id="configuration" class="tsd-anchor-link">Configuration<a href="#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> <p>以下表格列出了控制 3DTile 加载与性能调度的所有可用参数。</p> <h3 id="core-quality-performance-核心画质与性能" class="tsd-anchor-link">Core Quality &amp; Performance (核心画质与性能)<a href="#core-quality-performance-核心画质与性能" 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> <table> <thead> <tr> <th style="text-align:left">Parameter</th> <th style="text-align:left">Type</th> <th style="text-align:left">Default</th> <th style="text-align:left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align:left"><code>maxScreenSpaceError</code></td> <td style="text-align:left"><code>number</code></td> <td style="text-align:left"><code>16</code></td> <td style="text-align:left"><strong>核心参数</strong>。屏幕空间误差阈值 (像素)。<br>值越小画质越高,性能开销越大。建议范围 8-32。</td> </tr> <tr> <td style="text-align:left"><code>maxMemoryUsage</code></td> <td style="text-align:left"><code>number</code></td> <td style="text-align:left"><code>512</code></td> <td style="text-align:left">最大显存占用 (MB)。超限后自动触发 LRU 淘汰机制。</td> </tr> <tr> <td style="text-align:left"><code>memoryAdjustedScreenSpaceError</code></td> <td style="text-align:left"><code>boolean</code></td> <td style="text-align:left"><code>false</code></td> <td style="text-align:left">是否开启基于内存的动态 SSE 调整。<br>开启后引擎会自动调整 SSE 以尽量占满显存配额。</td> </tr> <tr> <td style="text-align:left"><code>cameraCulling</code></td> <td style="text-align:left"><code>boolean</code></td> <td style="text-align:left"><code>true</code></td> <td style="text-align:left">是否开启视锥体剔除 (不加载视野外的瓦片)。<strong>建议始终开启</strong>。</td> </tr> </tbody> </table> <h3 id="geometric-error-control-几何误差控制" class="tsd-anchor-link">Geometric Error Control (几何误差控制)<a href="#geometric-error-control-几何误差控制" 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> <table> <thead> <tr> <th style="text-align:left">Parameter</th> <th style="text-align:left">Type</th> <th style="text-align:left">Default</th> <th style="text-align:left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align:left"><code>minGeometricError</code></td> <td style="text-align:left"><code>number</code></td> <td style="text-align:left"><code>0</code></td> <td style="text-align:left">最小几何误差 (精度上限锁)。<br>当瓦片误差小于此值时停止细分。可用于限制过高精度的加载。</td> </tr> <tr> <td style="text-align:left"><code>maxGeometricError</code></td> <td style="text-align:left"><code>number</code></td> <td style="text-align:left"><code>10000</code></td> <td style="text-align:left">最大几何误差 (最低精度保证)。<br>强制细分直到误差小于此值。可用于避免模型过于模糊。</td> </tr> </tbody> </table> <h3 id="network-loading-网络与加载" class="tsd-anchor-link">Network &amp; Loading (网络与加载)<a href="#network-loading-网络与加载" 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> <table> <thead> <tr> <th style="text-align:left">Parameter</th> <th style="text-align:left">Type</th> <th style="text-align:left">Default</th> <th style="text-align:left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align:left"><code>maxRequests</code></td> <td style="text-align:left"><code>number</code></td> <td style="text-align:left"><code>4</code></td> <td style="text-align:left">最大并发请求数。建议保持默认,避免网络拥堵。</td> </tr> <tr> <td style="text-align:left"><code>requestOrder</code></td> <td style="text-align:left"><code>string</code></td> <td style="text-align:left"><code>'SCREEN_SPACE_ERROR'</code></td> <td style="text-align:left">请求优先级策略。<br><code>'SCREEN_SPACE_ERROR'</code>: 优先加载 SSE 大的瓦片;<br><code>'SCREEN_LEVEL_VERTICAL'</code>: 优先加载垂直层级高的。</td> </tr> <tr> <td style="text-align:left"><code>loadSiblings</code></td> <td style="text-align:left"><code>boolean</code></td> <td style="text-align:left"><code>true</code></td> <td style="text-align:left">是否预加载兄弟节点。</td> </tr> <tr> <td style="text-align:left"><code>skipLevelOfDetail</code></td> <td style="text-align:left"><code>boolean</code></td> <td style="text-align:left"><code>false</code></td> <td style="text-align:left">是否允许跳级加载 (跳过中间层级直接加载高精瓦片)。</td> </tr> </tbody> </table> <h3 id="legacy-lod-control-不推荐" class="tsd-anchor-link">Legacy LOD Control (不推荐)<a href="#legacy-lod-control-不推荐" 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> <table> <thead> <tr> <th style="text-align:left">Parameter</th> <th style="text-align:left">Type</th> <th style="text-align:left">Default</th> <th style="text-align:left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align:left"><code>minLevelOfDetail</code></td> <td style="text-align:left"><code>number</code></td> <td style="text-align:left"><code>0</code></td> <td style="text-align:left">最小 LOD 层级 (Tree Depth)。建议使用 <code>maxGeometricError</code> 替代。</td> </tr> <tr> <td style="text-align:left"><code>maxLevelOfDetail</code></td> <td style="text-align:left"><code>number</code></td> <td style="text-align:left"><code>20</code></td> <td style="text-align:left">最大 LOD 层级 (Tree Depth)。建议使用 <code>minGeometricError</code> 替代。</td> </tr> </tbody> </table> <h2 id="examples" class="tsd-anchor-link">Examples<a href="#examples" 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> <h3 id="1-adjusting-quality-memory-调整画质与内存平衡" class="tsd-anchor-link">1. Adjusting Quality &amp; Memory (调整画质与内存平衡)<a href="#1-adjusting-quality-memory-调整画质与内存平衡" 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> <p>在移动端或性能受限设备上,建议适当降低画质以保证流畅度。</p> <pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">parameter</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">;</span><br/><br/><span class="hl-8">// 1. 性能优先模式 (适用于低端设备)</span><br/><span class="hl-8">// 增大 SSE 阈值,降低画质</span><br/><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">&#39;maxScreenSpaceError&#39;</span><span class="hl-1">, </span><span class="hl-11">16</span><span class="hl-1">);</span><br/><span class="hl-8">// 限制显存,防止 Crash</span><br/><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">&#39;maxMemoryUsage&#39;</span><span class="hl-1">, </span><span class="hl-11">256</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 2. 画质优先模式 (适用于桌面端/截图)</span><br/><span class="hl-8">// 减小 SSE 阈值,提升细节</span><br/><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">&#39;maxScreenSpaceError&#39;</span><span class="hl-1">, </span><span class="hl-11">4</span><span class="hl-1">);</span><br/><span class="hl-8">// 允许更多显存占用</span><br/><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">&#39;maxMemoryUsage&#39;</span><span class="hl-1">, </span><span class="hl-11">1024</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 3. 重置为默认</span><br/><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">reset</span><span class="hl-1">(</span><span class="hl-9">&#39;maxScreenSpaceError&#39;</span><span class="hl-1">, </span><span class="hl-9">&#39;maxMemoryUsage&#39;</span><span class="hl-1">);</span> </code><button type="button">Copy</button></pre> <h3 id="2-multi-viewlayer-optimization-多-viewlayer-优化" class="tsd-anchor-link">2. Multi-ViewLayer Optimization (多 ViewLayer 优化)<a href="#2-multi-viewlayer-optimization-多-viewlayer-优化" 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> <p>在对比查看或多楼层场景中,通常存在多个 <code>ViewLayer</code>。为了避免资源竞争,建议对非焦点的 ViewLayer 进行降级处理。</p> <pre><code class="typescript"><span class="hl-8">// 假设 viewLayerA 是当前主要查看的模型,viewLayerB 是背景参考</span><br/><br/><span class="hl-8">// 聚焦 ViewLayerA: 正常画质</span><br/><span class="hl-6">viewLayerA</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">reset</span><span class="hl-1">(</span><span class="hl-9">&#39;maxScreenSpaceError&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 降级 ViewLayerB: 仅显示轮廓,节省资源</span><br/><span class="hl-6">viewLayerB</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">&#39;maxScreenSpaceError&#39;</span><span class="hl-1">, </span><span class="hl-11">48</span><span class="hl-1">); </span><span class="hl-8">// 极低画质</span><br/><span class="hl-6">viewLayerB</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">&#39;maxMemoryUsage&#39;</span><span class="hl-1">, </span><span class="hl-11">128</span><span class="hl-1">); </span><span class="hl-8">// 极低显存配额</span> </code><button type="button">Copy</button></pre> <h2 id="debugging" class="tsd-anchor-link">Debugging<a href="#debugging" 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> <p>在开发过程中,可以通过访问 <code>ViewLayer</code> 内部的 <code>tileset</code> 对象来实时监控渲染状态。</p> <pre><code class="typescript"><span class="hl-8">// 假设已获取 viewLayer 实例</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">tileset</span><span class="hl-1"> = </span><span class="hl-6">viewLayer</span><span class="hl-1">.</span><span class="hl-6">tileset</span><span class="hl-1">;</span><br/><br/><span class="hl-8">// 1. 查看当前加载的瓦片数量</span><br/><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-6">tileset</span><span class="hl-1">.</span><span class="hl-6">loadedTiles</span><span class="hl-1">.</span><span class="hl-6">size</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 2. 查看当前实际生效的 SSE (如果开启了动态调整,此值会波动)</span><br/><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-6">tileset</span><span class="hl-1">.</span><span class="hl-6">currentMaxScreenSpaceError</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 3. 查看显存占用 (近似值,单位字节)</span><br/><span class="hl-8">// 注意: 这是内部私有属性,仅供调试参考</span><br/><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-6">tileset</span><span class="hl-1"> </span><span class="hl-10">as</span><span class="hl-1"> </span><span class="hl-7">any</span><span class="hl-1">).</span><span class="hl-6">cacheMemoryUsageInBytes</span><span class="hl-1"> / </span><span class="hl-11">1024</span><span class="hl-1"> / </span><span class="hl-11">1024</span><span class="hl-1"> + </span><span class="hl-9">&#39; MB&#39;</span><span class="hl-1">);</span> </code><button type="button">Copy</button></pre> <h2 id="common-pitfalls" class="tsd-anchor-link">Common Pitfalls<a href="#common-pitfalls" 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> <ol> <li><strong>误解 GeometricError 作用域</strong>: <code>minGeometricError</code> 和 <code>maxGeometricError</code> 是<strong>全局硬约束</strong>,不随相机距离变化。 <ul> <li>错误设置(例如将 <code>maxGeometricError</code> 设得极小)会强制全场景所有瓦片(哪怕是远处的背景)都加载到极高精度。</li> <li>这会导致三角形数量和显存占用<strong>指数级爆炸</strong>,瞬间卡死浏览器。</li> </ul> </li> <li><strong>过度降低 <code>maxScreenSpaceError</code></strong>: 设置过小(如 &lt; 4)可能导致每帧需要加载和渲染的三角形数量指数级上升,瞬间撑爆显存或导致掉帧。</li> <li><strong>忽略 <code>cameraCulling</code></strong>: 默认应该开启。如果手动关闭视锥体剔除,引擎将尝试加载全场景数据,极易导致崩溃。</li> <li><strong>频繁切换配置</strong>: <code>maxMemoryUsage</code> 等参数的修改会触发缓存整理,高频修改可能导致卡顿。</li> </ol> <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> <ul> <li><a href="features_parameter.html">Parameter</a>: 了解参数的继承关系及材质、点云相关配置。</li> <li><a href="features_model.html">Model</a>: 了解 Model 和 ViewLayer 的关系。</li> <li><a href="features_work.html">Work</a>: 了解 Work 数据结构。</li> </ul> <hr> <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> </code><button type="button">Copy</button></pre> </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 &amp; <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 &amp; <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 &amp; <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 &amp; <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>