@realsee/five 6.8.0-alpha.17 → 6.8.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/documents/api.html +15 -15
- package/docs/documents/features_flowing-light-2d-pass.html +6 -6
- package/docs/documents/features_flowing-light-3d-pass.html +6 -6
- package/docs/documents/features_gaussian-blur-pass.html +5 -5
- package/five/index.js +144 -665
- package/five/index.mjs +26204 -32253
- package/five/thirdparty/hammer.d.ts +371 -255
- package/five/thirdparty/jsrsasign.d.ts +5 -20
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/package.json +2 -2
- package/plugins/index.js +17 -21
- package/plugins/index.mjs +3342 -4245
- package/react/index.js +3 -3
- package/react/index.mjs +572 -783
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +17 -21
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +13 -14
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +21 -21
- package/umd/five-vue.js +3 -3
- package/umd/five.js +139 -660
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +317 -556
- /package/five/assets/{realsee-pmg-data-url.d.ts → realsee-png-data-url.d.ts} +0 -0
package/docs/documents/api.html
CHANGED
|
@@ -96,74 +96,74 @@
|
|
|
96
96
|
</code><button type="button">Copy</button></pre>
|
|
97
97
|
|
|
98
98
|
<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
|
-
<h3 id="" class="tsd-anchor-link"><code>load(work, state?, options?)</code></h3>
|
|
99
|
+
<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
100
|
<p>Loads a "Work" (dataset) into the Five instance.</p>
|
|
101
101
|
<ul>
|
|
102
102
|
<li><strong>work</strong>: The data object (<code>LooseWork</code> or <code>Work</code>) containing scene information.</li>
|
|
103
103
|
<li><strong>state</strong>: Initial state overrides. <code>"inherit"</code>, <code>"initial"</code>, or a <code>State</code> object.</li>
|
|
104
104
|
<li><strong>options</strong>: Loading options (e.g., transition duration).</li>
|
|
105
105
|
</ul>
|
|
106
|
-
<h3 id="-1" class="tsd-anchor-link"><code>appendTo(element, size?)</code><a href="
|
|
106
|
+
<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
107
|
<p>Mounts the Five canvas to a DOM element.</p>
|
|
108
108
|
<ul>
|
|
109
109
|
<li><strong>element</strong>: HTMLElement to append to.</li>
|
|
110
110
|
<li><strong>size</strong>: Optional <code>{ width, height }</code>. Defaults to element size.</li>
|
|
111
111
|
</ul>
|
|
112
|
-
<h3 id="-2" class="tsd-anchor-link"><code>setState(state, immediately?, userAction?)</code><a href="
|
|
112
|
+
<h3 id="_-2" class="tsd-anchor-link"><code>setState(state, immediately?, userAction?)</code><a href="#_-2" 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>
|
|
113
113
|
<p>Updates the current state (position, mode, etc.).</p>
|
|
114
114
|
<ul>
|
|
115
115
|
<li><strong>state</strong>: Partial <code>State</code> object to merge.</li>
|
|
116
116
|
<li><strong>immediately</strong>: If <code>true</code>, skips animation.</li>
|
|
117
117
|
<li><strong>userAction</strong>: Marks the change as triggered by user interaction.</li>
|
|
118
118
|
</ul>
|
|
119
|
-
<h3 id="-3" class="tsd-anchor-link"><code>changeMode(mode, state?, options?)</code><a href="
|
|
119
|
+
<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
120
|
<p>Switches the viewing mode (e.g., from <code>Panorama</code> to <code>Model</code>).</p>
|
|
121
121
|
<ul>
|
|
122
122
|
<li><strong>mode</strong>: Target <code>Five.Mode</code>.</li>
|
|
123
123
|
<li><strong>state</strong>: Target state after mode change.</li>
|
|
124
124
|
<li><strong>options</strong>: Animation duration and effect.</li>
|
|
125
125
|
</ul>
|
|
126
|
-
<h3 id="-4" class="tsd-anchor-link"><code>moveToPano(panoIndex, options?)</code><a href="
|
|
126
|
+
<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
127
|
<p>Moves to a specific panorama spot.</p>
|
|
128
128
|
<ul>
|
|
129
129
|
<li><strong>panoIndex</strong>: Index of the panorama.</li>
|
|
130
130
|
<li><strong>options</strong>: <code>{ effect?: MovePanoEffect, duration?: number }</code>.</li>
|
|
131
131
|
</ul>
|
|
132
|
-
<h3 id="-5" class="tsd-anchor-link"><code>refresh(size?)</code><a href="
|
|
132
|
+
<h3 id="_-5" class="tsd-anchor-link"><code>refresh(size?)</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>
|
|
133
133
|
<p>Resizes the renderer to fit the container or specified size.</p>
|
|
134
|
-
<h3 id="-6" class="tsd-anchor-link"><code>getElement()</code><a href="
|
|
134
|
+
<h3 id="_-6" class="tsd-anchor-link"><code>getElement()</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>
|
|
135
135
|
<p>Returns the <code><canvas></code> element used by Five.</p>
|
|
136
|
-
<h3 id="-7" class="tsd-anchor-link"><code>project2d(vector, testModel?)</code><a href="
|
|
136
|
+
<h3 id="_-7" class="tsd-anchor-link"><code>project2d(vector, testModel?)</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>
|
|
137
137
|
<p>Projects a 3D point to 2D screen coordinates.</p>
|
|
138
138
|
<ul>
|
|
139
139
|
<li><strong>vector</strong>: <code>THREE.Vector3</code> (World Space).</li>
|
|
140
140
|
<li><strong>testModel</strong>: <code>boolean</code> (default <code>false</code>). If <code>true</code>, checks for occlusion.</li>
|
|
141
141
|
<li><strong>returns</strong>: <code>THREE.Vector2</code> (Screen Space, px) or <code>null</code>.</li>
|
|
142
142
|
</ul>
|
|
143
|
-
<h3 id="-8" class="tsd-anchor-link"><code>getPixels(x, y, width, height)</code><a href="
|
|
143
|
+
<h3 id="_-8" class="tsd-anchor-link"><code>getPixels(x, y, width, height)</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>
|
|
144
144
|
<p>Get pixel data from the renderer (e.g. for color picking or magnifier).</p>
|
|
145
145
|
<ul>
|
|
146
146
|
<li><strong>x, y</strong>: Coordinate of the lower-left corner (Screen Space).</li>
|
|
147
147
|
<li><strong>width, height</strong>: Size of the rectangle.</li>
|
|
148
148
|
<li><strong>returns</strong>: <code>Uint8Array</code> (RGBA data).</li>
|
|
149
149
|
</ul>
|
|
150
|
-
<h3 id="-9" class="tsd-anchor-link"><code>intersectRaycaster(raycaster)</code><a href="
|
|
150
|
+
<h3 id="_-9" class="tsd-anchor-link"><code>intersectRaycaster(raycaster)</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>
|
|
151
151
|
<p>(On <code>five.model</code>) Performs raycasting against the scene models.</p>
|
|
152
152
|
<ul>
|
|
153
153
|
<li><strong>raycaster</strong>: <code>THREE.Raycaster</code>.</li>
|
|
154
154
|
<li><strong>returns</strong>: <code>THREE.Intersection[]</code>.</li>
|
|
155
155
|
</ul>
|
|
156
|
-
<h3 id="-10" class="tsd-anchor-link"><code>addPass(pass)</code><a href="
|
|
156
|
+
<h3 id="_-10" class="tsd-anchor-link"><code>addPass(pass)</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>
|
|
157
157
|
<p>Add a post-processing pass to the rendering chain.</p>
|
|
158
158
|
<ul>
|
|
159
159
|
<li><strong>pass</strong>: <code>FivePass</code> instance (e.g. <code>Gaussian Blur Pass</code>).</li>
|
|
160
160
|
</ul>
|
|
161
|
-
<h3 id="-11" class="tsd-anchor-link"><code>removePass(pass)</code><a href="
|
|
161
|
+
<h3 id="_-11" class="tsd-anchor-link"><code>removePass(pass)</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>
|
|
162
162
|
<p>Remove a post-processing pass from the rendering chain.</p>
|
|
163
163
|
<ul>
|
|
164
164
|
<li><strong>pass</strong>: <code>FivePass</code> instance to remove.</li>
|
|
165
165
|
</ul>
|
|
166
|
-
<h3 id="-12" class="tsd-anchor-link"><code>dispose()</code><a href="
|
|
166
|
+
<h3 id="_-12" class="tsd-anchor-link"><code>dispose()</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>
|
|
167
167
|
<p>Destroys the Five instance and releases resources.</p>
|
|
168
168
|
<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
169
|
<p>The <code>State</code> interface defines the complete status of the Five instance at any moment.</p>
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
</code><button type="button">Copy</button></pre>
|
|
172
172
|
|
|
173
173
|
<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
|
-
<h3 id="-13" class="tsd-anchor-link"><code>Work</code><a href="
|
|
174
|
+
<h3 id="_-13" class="tsd-anchor-link"><code>Work</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>
|
|
175
175
|
<p>The main data object containing the scene description.</p>
|
|
176
176
|
<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
177
|
</code><button type="button">Copy</button></pre>
|
|
@@ -334,4 +334,4 @@
|
|
|
334
334
|
<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>
|
|
335
335
|
</code><button type="button">Copy</button></pre>
|
|
336
336
|
|
|
337
|
-
</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="
|
|
337
|
+
</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="#_-13"><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>
|
|
@@ -125,16 +125,16 @@
|
|
|
125
125
|
<p><strong>注意</strong>: <code>totalLength</code> 和 <code>lineWidth</code> 使用归一化单位,与屏幕实际像素无关。</p>
|
|
126
126
|
</blockquote>
|
|
127
127
|
<h2 id="instance-methods" class="tsd-anchor-link">Instance Methods<a href="#instance-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>
|
|
128
|
-
<h3 id="" class="tsd-anchor-link"><code>constructor(camera: Camera)</code></h3>
|
|
128
|
+
<h3 id="_" class="tsd-anchor-link"><code>constructor(camera: Camera)</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>
|
|
129
129
|
<p>初始化 Pass,需传入相机以获取屏幕分辨率。</p>
|
|
130
|
-
<h3 id="-1" class="tsd-anchor-link"><code>setLines(lines: Line[])</code><a href="
|
|
130
|
+
<h3 id="_-1" class="tsd-anchor-link"><code>setLines(lines: Line[])</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>
|
|
131
131
|
<p>更新要渲染的路径列表。可随时调用以修改或新增路径。</p>
|
|
132
132
|
<p><strong>自动生成 ID</strong>: 如果 line 没有提供 <code>id</code>,会自动生成 UUID。</p>
|
|
133
133
|
<p><strong>示例</strong>:</p>
|
|
134
134
|
<pre><code class="ts"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pathLine</span><span class="hl-1">: </span><span class="hl-7">Line</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-6">id:</span><span class="hl-1"> </span><span class="hl-9">'my-line-1'</span><span class="hl-1">, </span><span class="hl-8">// 可选,不传则自动生成</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.3</span><span class="hl-1">),</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-11">0.8</span><span class="hl-1">, </span><span class="hl-8">// 归一化单位</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">0x00c2ff</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">opacity:</span><span class="hl-1"> </span><span class="hl-11">0.8</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">2000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">delay:</span><span class="hl-1"> </span><span class="hl-11">500</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1">};</span><br/><span class="hl-6">pass</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">([</span><span class="hl-6">pathLine</span><span class="hl-1">]);</span>
|
|
135
135
|
</code><button type="button">Copy</button></pre>
|
|
136
136
|
|
|
137
|
-
<h3 id="-2" class="tsd-anchor-link"><code>setLine(params: { id: string } & Partial<Omit<Line, 'id'>>)</code><a href="
|
|
137
|
+
<h3 id="_-2" class="tsd-anchor-link"><code>setLine(params: { id: string } & Partial<Omit<Line, 'id'>>)</code><a href="#_-2" 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>
|
|
138
138
|
<p>通过 <code>id</code> 修改单条线的参数。支持部分更新,只更新传入的字段。</p>
|
|
139
139
|
<p><strong>性能优化</strong>:</p>
|
|
140
140
|
<ul>
|
|
@@ -151,9 +151,9 @@
|
|
|
151
151
|
<li>动画时间(<code>uTime</code>)不会被重置,流光继续从当前位置播放</li>
|
|
152
152
|
<li>建议修改 <code>points</code> 时同时更新 <code>totalLength</code></li>
|
|
153
153
|
</ul>
|
|
154
|
-
<h3 id="-3" class="tsd-anchor-link"><code>render(...)</code><a href="
|
|
154
|
+
<h3 id="_-3" class="tsd-anchor-link"><code>render(...)</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>
|
|
155
155
|
<p>由 EffectComposer 自动调用,无需手动调用。自动同步渲染目标尺寸。</p>
|
|
156
|
-
<h3 id="-4" class="tsd-anchor-link"><code>dispose()</code><a href="
|
|
156
|
+
<h3 id="_-4" class="tsd-anchor-link"><code>dispose()</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>
|
|
157
157
|
<p>释放 InstancedMesh、着色材质和渲染目标资源,避免内存泄漏。销毁 Pass 时必须调用。</p>
|
|
158
158
|
<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>
|
|
159
159
|
<h3 id="快速上手-quick-example" class="tsd-anchor-link">快速上手 (Quick Example)<a href="#快速上手-quick-example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
@@ -353,4 +353,4 @@ lineWidth: 0.01,
|
|
|
353
353
|
</ul>
|
|
354
354
|
<hr>
|
|
355
355
|
<p>tags: [postprocessing, effect, flowing, light, pass, rendering, screenspace, instanced, performance]</p>
|
|
356
|
-
</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="#flowing-light-2d-pass-流光-2d-通道"><span>Flowing <wbr/>Light 2<wbr/>D <wbr/>Pass (流光 2<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="#instancedmesh-实例化渲染-instanced-rendering"><span>Instanced<wbr/>Mesh 实例化渲染 (<wbr/>Instanced <wbr/>Rendering)</span></a></li><li><a href="#归一化坐标系统-normalized-coordinates"><span>归一化坐标系统 (<wbr/>Normalized <wbr/>Coordinates)</span></a></li><li><a href="#头尾追逐动画-head-tail-chase-animation"><span>头尾追逐动画 (<wbr/>Head-<wbr/>Tail <wbr/>Chase <wbr/>Animation)</span></a></li><li><a href="#ndc-坐标转换"><span>NDC 坐标转换</span></a></li><li><a href="#dpr-处理与宽高比适配"><span>DPR 处理与宽高比适配</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#line-配置参数"><span>Line 配置参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <wbr/>Methods</span></a></li><li><ul><li><a href="#"><span></span></a></li><li><a href="
|
|
356
|
+
</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="#flowing-light-2d-pass-流光-2d-通道"><span>Flowing <wbr/>Light 2<wbr/>D <wbr/>Pass (流光 2<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="#instancedmesh-实例化渲染-instanced-rendering"><span>Instanced<wbr/>Mesh 实例化渲染 (<wbr/>Instanced <wbr/>Rendering)</span></a></li><li><a href="#归一化坐标系统-normalized-coordinates"><span>归一化坐标系统 (<wbr/>Normalized <wbr/>Coordinates)</span></a></li><li><a href="#头尾追逐动画-head-tail-chase-animation"><span>头尾追逐动画 (<wbr/>Head-<wbr/>Tail <wbr/>Chase <wbr/>Animation)</span></a></li><li><a href="#ndc-坐标转换"><span>NDC 坐标转换</span></a></li><li><a href="#dpr-处理与宽高比适配"><span>DPR 处理与宽高比适配</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#line-配置参数"><span>Line 配置参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <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></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#快速上手-quick-example"><span>快速上手 (<wbr/>Quick <wbr/>Example)</span></a></li><li><a href="#多条路径-动态更新"><span>多条路径 & 动态更新</span></a></li><li><a href="#计算路径总长度"><span>计算路径总长度</span></a></li><li><a href="#矩形路径示例"><span>矩形路径示例</span></a></li><li><a href="#高-dpr-场景优化"><span>高 <wbr/>DPR 场景优化</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#performance"><span>Performance</span></a></li><li><ul><li><a href="#与全屏着色器对比"><span>与全屏着色器对比</span></a></li><li><a href="#setline-性能优化"><span>set<wbr/>Line 性能优化</span></a></li><li><a href="#优化建议"><span>优化建议</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>
|
|
@@ -114,16 +114,16 @@
|
|
|
114
114
|
<p><strong>注意</strong>: <code>totalLength</code> 应为世界坐标单位。若不准确,流速会偏差。</p>
|
|
115
115
|
</blockquote>
|
|
116
116
|
<h2 id="instance-methods" class="tsd-anchor-link">Instance Methods<a href="#instance-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>
|
|
117
|
-
<h3 id="" class="tsd-anchor-link"><code>constructor(camera: Camera)</code></h3>
|
|
117
|
+
<h3 id="_" class="tsd-anchor-link"><code>constructor(camera: Camera)</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>
|
|
118
118
|
<p>初始化 Pass,需传入相机以获取投影矩阵和视图矩阵。</p>
|
|
119
|
-
<h3 id="-1" class="tsd-anchor-link"><code>setLines(lines: Line[])</code><a href="
|
|
119
|
+
<h3 id="_-1" class="tsd-anchor-link"><code>setLines(lines: Line[])</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>
|
|
120
120
|
<p>更新要渲染的路径列表。支持运行时动态更改。</p>
|
|
121
121
|
<p><strong>自动生成 ID</strong>: 如果 line 没有提供 <code>id</code>,会自动生成 UUID。</p>
|
|
122
122
|
<p><strong>示例</strong>:</p>
|
|
123
123
|
<pre><code class="ts"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pathLine</span><span class="hl-1">: </span><span class="hl-7">Line</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-6">id:</span><span class="hl-1"> </span><span class="hl-9">'my-3d-line'</span><span class="hl-1">, </span><span class="hl-8">// 可选,不传则自动生成</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector3</span><span class="hl-1">(</span><span class="hl-11">0</span><span class="hl-1">, </span><span class="hl-11">0</span><span class="hl-1">, </span><span class="hl-11">0</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector3</span><span class="hl-1">(</span><span class="hl-11">5</span><span class="hl-1">, </span><span class="hl-11">2</span><span class="hl-1">, </span><span class="hl-11">3</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector3</span><span class="hl-1">(</span><span class="hl-11">10</span><span class="hl-1">, </span><span class="hl-11">1</span><span class="hl-1">, </span><span class="hl-11">6</span><span class="hl-1">),</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-11">12</span><span class="hl-1">, </span><span class="hl-8">// 世界坐标单位</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">0xff6600</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">opacity:</span><span class="hl-1"> </span><span class="hl-11">0.85</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">3000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">delay:</span><span class="hl-1"> </span><span class="hl-11">500</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">4.0</span><span class="hl-1">,</span><br/><span class="hl-1">};</span><br/><span class="hl-6">pass</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">([</span><span class="hl-6">pathLine</span><span class="hl-1">]);</span>
|
|
124
124
|
</code><button type="button">Copy</button></pre>
|
|
125
125
|
|
|
126
|
-
<h3 id="-2" class="tsd-anchor-link"><code>setLine(params: { id: string } & Partial<Omit<Line, 'id'>>)</code><a href="
|
|
126
|
+
<h3 id="_-2" class="tsd-anchor-link"><code>setLine(params: { id: string } & Partial<Omit<Line, 'id'>>)</code><a href="#_-2" 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
127
|
<p>通过 <code>id</code> 修改单条线的参数。支持部分更新,只更新传入的字段。</p>
|
|
128
128
|
<p><strong>性能优化</strong>:</p>
|
|
129
129
|
<ul>
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
<li>动画时间(<code>uTime</code>)不会被重置,流光继续从当前位置播放</li>
|
|
141
141
|
<li>建议修改 <code>points</code> 时同时更新 <code>totalLength</code></li>
|
|
142
142
|
</ul>
|
|
143
|
-
<h3 id="-3" class="tsd-anchor-link"><code>render(...)</code><a href="
|
|
143
|
+
<h3 id="_-3" class="tsd-anchor-link"><code>render(...)</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>
|
|
144
144
|
<p>由 EffectComposer 自动调用,无需手动调用。自动同步相机矩阵和渲染目标尺寸。</p>
|
|
145
|
-
<h3 id="-4" class="tsd-anchor-link"><code>dispose()</code><a href="
|
|
145
|
+
<h3 id="_-4" class="tsd-anchor-link"><code>dispose()</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>
|
|
146
146
|
<p>释放 InstancedMesh、着色材质和渲染目标资源,销毁 Pass 时必须调用。</p>
|
|
147
147
|
<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>
|
|
148
148
|
<h3 id="快速上手-quick-example" class="tsd-anchor-link">快速上手 (Quick Example)<a href="#快速上手-quick-example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
@@ -348,4 +348,4 @@ lineWidth: 3.0,
|
|
|
348
348
|
</ul>
|
|
349
349
|
<hr>
|
|
350
350
|
<p>tags: [postprocessing, effect, flowing, light, pass, rendering, worldspace, projection, instanced, performance]</p>
|
|
351
|
-
</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="#flowing-light-3d-pass-流光-3d-通道"><span>Flowing <wbr/>Light 3<wbr/>D <wbr/>Pass (流光 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="#instancedmesh-实例化渲染-instanced-rendering"><span>Instanced<wbr/>Mesh 实例化渲染 (<wbr/>Instanced <wbr/>Rendering)</span></a></li><li><a href="#世界空间路径与投影-world-space-projection"><span>世界空间路径与投影 (<wbr/>World-<wbr/>space <wbr/>Projection)</span></a></li><li><a href="#头尾追逐动画-head-tail-chase-animation"><span>头尾追逐动画 (<wbr/>Head-<wbr/>Tail <wbr/>Chase <wbr/>Animation)</span></a></li><li><a href="#相机同步"><span>相机同步</span></a></li><li><a href="#dpr-处理"><span>DPR 处理</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#line-配置参数"><span>Line 配置参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <wbr/>Methods</span></a></li><li><ul><li><a href="#"><span></span></a></li><li><a href="
|
|
351
|
+
</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="#flowing-light-3d-pass-流光-3d-通道"><span>Flowing <wbr/>Light 3<wbr/>D <wbr/>Pass (流光 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="#instancedmesh-实例化渲染-instanced-rendering"><span>Instanced<wbr/>Mesh 实例化渲染 (<wbr/>Instanced <wbr/>Rendering)</span></a></li><li><a href="#世界空间路径与投影-world-space-projection"><span>世界空间路径与投影 (<wbr/>World-<wbr/>space <wbr/>Projection)</span></a></li><li><a href="#头尾追逐动画-head-tail-chase-animation"><span>头尾追逐动画 (<wbr/>Head-<wbr/>Tail <wbr/>Chase <wbr/>Animation)</span></a></li><li><a href="#相机同步"><span>相机同步</span></a></li><li><a href="#dpr-处理"><span>DPR 处理</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#line-配置参数"><span>Line 配置参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <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></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#快速上手-quick-example"><span>快速上手 (<wbr/>Quick <wbr/>Example)</span></a></li><li><a href="#多条-3d-路径"><span>多条 3<wbr/>D 路径</span></a></li><li><a href="#计算-3d-路径长度"><span>计算 3<wbr/>D 路径长度</span></a></li><li><a href="#结合相机动画"><span>结合相机动画</span></a></li><li><a href="#高-dpr-场景优化"><span>高 <wbr/>DPR 场景优化</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#performance"><span>Performance</span></a></li><li><ul><li><a href="#与全屏着色器对比"><span>与全屏着色器对比</span></a></li><li><a href="#setline-性能优化"><span>set<wbr/>Line 性能优化</span></a></li><li><a href="#优化建议"><span>优化建议</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>
|
|
@@ -98,18 +98,18 @@
|
|
|
98
98
|
<p>注意:当前实现中 <code>sigma</code> 固定为 4.0,仅 <code>radius</code> 可动态调整。如需修改 <code>sigma</code>,需直接访问 <code>material.uniforms.sigma.value</code>。</p>
|
|
99
99
|
</blockquote>
|
|
100
100
|
<h2 id="instance-methods" class="tsd-anchor-link">Instance Methods<a href="#instance-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>
|
|
101
|
-
<h3 id="" class="tsd-anchor-link"><code>constructor(camera: Camera)</code></h3>
|
|
101
|
+
<h3 id="_" class="tsd-anchor-link"><code>constructor(camera: Camera)</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>
|
|
102
102
|
<p>初始化高斯模糊通道,需传入相机实例以获取分辨率信息。</p>
|
|
103
|
-
<h3 id="-1" class="tsd-anchor-link"><code>setRadius(radius: number)</code><a href="
|
|
103
|
+
<h3 id="_-1" class="tsd-anchor-link"><code>setRadius(radius: number)</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>
|
|
104
104
|
<p>动态调整模糊半径。</p>
|
|
105
105
|
<ul>
|
|
106
106
|
<li><strong>参数</strong>: <code>radius</code> - 采样半径,建议范围 1 ~ 8</li>
|
|
107
107
|
<li><strong>默认值</strong>: 4.0</li>
|
|
108
108
|
<li><strong>影响</strong>: 较大的 radius 会增加 GPU 计算成本</li>
|
|
109
109
|
</ul>
|
|
110
|
-
<h3 id="-2" class="tsd-anchor-link"><code>render(...)</code><a href="
|
|
110
|
+
<h3 id="_-2" class="tsd-anchor-link"><code>render(...)</code><a href="#_-2" 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>
|
|
111
111
|
<p>由 EffectComposer 在每一帧自动调用,用于执行模糊处理。通常不需要手动调用。</p>
|
|
112
|
-
<h3 id="-3" class="tsd-anchor-link"><code>dispose()</code><a href="
|
|
112
|
+
<h3 id="_-3" class="tsd-anchor-link"><code>dispose()</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>
|
|
113
113
|
<p>释放 Shader Material 和 FullScreenQuad 资源。在销毁 Pass 时必须调用,以防内存泄漏。</p>
|
|
114
114
|
<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>
|
|
115
115
|
<h3 id="快速上手-quick-example" class="tsd-anchor-link">快速上手 (Quick Example)<a href="#快速上手-quick-example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
@@ -179,4 +179,4 @@
|
|
|
179
179
|
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">postprocessing</span><span class="hl-1">, </span><span class="hl-2">shader</span><span class="hl-1">, </span><span class="hl-2">effect</span><span class="hl-1">, </span><span class="hl-2">blur</span><span class="hl-1">, </span><span class="hl-2">pass</span><span class="hl-1">, </span><span class="hl-2">rendering</span><span class="hl-1">]</span>
|
|
180
180
|
</code><button type="button">Copy</button></pre>
|
|
181
181
|
|
|
182
|
-
</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="#gaussian-blur-pass-高斯模糊通道"><span>Gaussian <wbr/>Blur <wbr/>Pass (高斯模糊通道)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><ul><li><a href="#shader-uniforms-内部-shader-参数"><span>Shader <wbr/>Uniforms (内部 <wbr/>Shader 参数)</span></a></li></ul></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#后处理通道-post-processing-pass"><span>后处理通道 (<wbr/>Post-<wbr/>Processing <wbr/>Pass)</span></a></li><li><a href="#高斯模糊原理"><span>高斯模糊原理</span></a></li><li><a href="#相机依赖"><span>相机依赖</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#常用参数"><span>常用参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <wbr/>Methods</span></a></li><li><ul><li><a href="#"><span></span></a></li><li><a href="
|
|
182
|
+
</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="#gaussian-blur-pass-高斯模糊通道"><span>Gaussian <wbr/>Blur <wbr/>Pass (高斯模糊通道)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><ul><li><a href="#shader-uniforms-内部-shader-参数"><span>Shader <wbr/>Uniforms (内部 <wbr/>Shader 参数)</span></a></li></ul></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#后处理通道-post-processing-pass"><span>后处理通道 (<wbr/>Post-<wbr/>Processing <wbr/>Pass)</span></a></li><li><a href="#高斯模糊原理"><span>高斯模糊原理</span></a></li><li><a href="#相机依赖"><span>相机依赖</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#常用参数"><span>常用参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <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></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#快速上手-quick-example"><span>快速上手 (<wbr/>Quick <wbr/>Example)</span></a></li><li><a href="#进阶用法-advanced-usage"><span>进阶用法 (<wbr/>Advanced <wbr/>Usage)</span></a></li><li><ul><li><a href="#动态调整模糊强度"><span>动态调整模糊强度</span></a></li><li><a href="#多通道组合(模糊-其他效果)"><span>多通道组合(模糊 + 其他效果)</span></a></li><li><a href="#修改高斯标准差-advanced"><span>修改高斯标准差 (<wbr/>Advanced)</span></a></li></ul></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><ul><li><a href="#检查模糊效果是否生效"><span>检查模糊效果是否生效</span></a></li><li><a href="#性能优化建议"><span>性能优化建议</span></a></li><li><a href="#可视化调试"><span>可视化调试</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>
|