zyy-engine

图形引擎API


材质扫描特效

<h1>材质扫描特效</h1> <h2>概述</h2> <p>材质扫描特效用于为三维模型添加动态扫描效果,为用户提供可视化体验。</p> <h2>类说明</h2> <p><code>BCore.Extension.Effect.MaterialScaneEffectConfig</code> 材质扫描特效配置参数 <code>BCore.Extension.Effect.MaterialScaneEffectManagerConfig</code> 材质扫描特效管理工具配置 <code>BCore.Extension.Effect.MaterialScaneEffectManager</code> 材质扫描特效管理工具</p> <h2>类详细信息</h2> <h3>1. BCore.Extension.Effect.MaterialScaneEffectConfig</h3> <h4>构造</h4> <pre><code class="language-javascript">new BCore.Extension.Effect.MaterialScaneEffectConfig();</code></pre> <h4>成员变量</h4> <table> <thead> <tr> <th>成员变量</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>forceFieldColor</td> <td>String</td> <td>颜色</td> </tr> <tr> <td>forceWidth</td> <td>number</td> <td>光环宽度</td> </tr> <tr> <td>forceSpeed</td> <td>number</td> <td>扫描速度</td> </tr> <tr> <td>forceRadius</td> <td>number</td> <td>特效半径</td> </tr> <tr> <td>forceField</td> <td>Object</td> <td>扫描中心坐标</td> </tr> </tbody> </table> <h4>示例</h4> <pre><code class="language-javascript">let scanmaterialConfig = new BCore.Extension.Effect.MaterialScaneEffectConfig(); scanmaterialConfig.forceFieldColor = &amp;quot;#ff0000&amp;quot;; scanmaterialConfig.forceRadius = 15; scanmaterialConfig.forceWidth = 100; scanmaterialConfig.forceSpeed = 1; scanmaterialConfig.forceField = { x: 0, y: 0, z: 0, w: 0.001 };</code></pre> <h3>2. BCore.Extension.Effect.MaterialScaneEffectManagerConfig</h3> <h4>构造</h4> <pre><code class="language-javascript">new BCore.Extension.Effect.MaterialScaneEffectManagerConfig(viewer3D);</code></pre> <ul> <li><strong>参数</strong> <ul> <li><strong>viewer3D</strong>: BCore.Viewer.Viewer3D - 三维模型视图对象</li> </ul></li> </ul> <h3>3. BCore.Extension.Effect.MaterialScaneEffectManager</h3> <h4>构造</h4> <pre><code class="language-javascript">new BCore.Extension.Effect.MaterialScaneEffectManager(config);</code></pre> <ul> <li><strong>参数</strong> <ul> <li><strong>config</strong>: BCore.Extension.Effect.MaterialScaneEffectManagerConfig - 材质扫描特效管理工具配置</li> </ul></li> </ul> <h3>方法</h3> <h4>添加材质扫描效果</h4> <ul> <li> <p><strong>简要描述</strong>: 添加材质扫描效果。开启该功能时,预先加载模型。</p> </li> <li> <p><strong>接口</strong>:</p> <pre><code class="language-javascript">effectManager.openMaterialScane(materialScaneEffectConfig);</code></pre> </li> <li> <p><strong>参数</strong> <strong>materialScaneEffectConfig</strong>:<code>BCore.Extension.Effect.MaterialScaneEffectConfig</code> - 材质扫描效果配置</p> </li> <li><strong>示例</strong> <pre><code class="language-javascript">let scanmaterialConfig = new BCore.Extension.Effect.MaterialScaneEffectManagerConfig(mViewer3D); let scanmangager = new BCore.Extension.Effect.MaterialScaneEffectManager(scanmaterialConfig); let scanconfig = new BCore.Extension.Effect.MaterialScaneEffectConfig(); scanmangager.openMaterialScane(scanconfig);</code></pre></li> </ul> <h4>移除材质扫描效果</h4> <ul> <li><strong>接口</strong>: <code>closeMaterialScane()</code></li> <li><strong>示例</strong> <pre><code class="language-javascript">scanmangager.closeMaterialScane()</code></pre></li> </ul>

页面列表

ITEM_HTML