zyy-engine

图形引擎API


雷达扫描效果

<h1>雷达扫描效果</h1> <h2>类型介绍</h2> <p><code>BCore.Extension.Effect.RadarEffectConfig</code> 雷达扫描特效配置参数 <code>BCore.Extension.Effect.RadarEffect</code> 雷达扫描特效对象 <code>BCore.Extension.Effect.RadarEffectManagerConfig</code> 雷达扫描特效管理工具配置 <code>BCore.Extension.Effect.RadarEffectManager</code> 雷达扫描特效管理工具</p> <h2>详细介绍</h2> <h3>BCore.Extension.Effect.RadarEffectConfig</h3> <ul> <li><strong>构造函数</strong>: <code>new BCore.Extension.Effect.RadarEffectConfig()</code></li> </ul> <h4>成员变量</h4> <table> <thead> <tr> <th>成员变量</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><code>name</code></td> <td>String</td> <td>特效名称,全局唯一</td> </tr> <tr> <td><code>color</code></td> <td>String</td> <td>颜色</td> </tr> <tr> <td><code>speed</code></td> <td>number</td> <td>扫描速度</td> </tr> <tr> <td><code>radius</code></td> <td>number</td> <td>特效范围半径</td> </tr> <tr> <td><code>opacity</code></td> <td>number</td> <td>透明度</td> </tr> <tr> <td><code>width</code></td> <td>number</td> <td>展示宽度,全部显示为 PI * 2</td> </tr> <tr> <td><code>position</code></td> <td>Object</td> <td>特效中心坐标,格式为 <code>{ x: 0, y: 0, z: 0 }</code></td> </tr> <tr> <td><code>rotation</code></td> <td>Object</td> <td>特效旋转程度,格式为 <code>{ x: 0, y: 0, z: 0 }</code></td> </tr> </tbody> </table> <h3>BCore.Extension.Effect.RadarEffect</h3> <ul> <li><strong>构造函数</strong>: <code>new BCore.Extension.Effect.RadarEffect(config)</code></li> </ul> <h4>参数</h4> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><code>config</code></td> <td><code>BCore.Extension.Effect.RadarEffectConfig</code></td> <td>雷达扫描特效配置参数</td> </tr> </tbody> </table> <h4>示例</h4> <pre><code class="language-javascript">let radarEffectConfig = new BCore.Extension.Effect.RadarEffectConfig(); radarEffectConfig.name = 'defaultName'; radarEffectConfig.color = &amp;quot;#ff0000&amp;quot;; radarEffectConfig.speed = 2; radarEffectConfig.radius = 15; radarEffectConfig.opacity = 0.8; radarEffectConfig.width = Math.PI * 0.5; radEffectConfig.position = { x: 0, y: 0, z: 0 }; radarEffectConfig.rotation = { x: 0, y: 0, z: 0 }; let radarEffect = new BCore.Extension.Effect.RadarEffect(radarEffectConfig);</code></pre> <h3>BCore.Extension.Effect.RadarEffectManagerConfig</h3> <ul> <li><strong>构造函数</strong>: <code>new BCore.Extension.Effect.RadarEffectManagerConfig(Viewer3D)</code></li> </ul> <h4>参数</h4> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><code>viewer3D</code></td> <td><code>BCore.Viewer.Viewer3D</code></td> <td>三维模型视图对象</td> </tr> </tbody> </table> <h3>BCore.Extension.Effect.RadarEffectManager</h3> <ul> <li><strong>构造函数</strong>: <code>new BCore.Extension.Effect.RadarEffectManager(config)</code></li> </ul> <h4>参数</h4> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><code>config</code></td> <td><code>BCore.Extension.Effect.RadarEffectManagerConfig</code></td> <td>雷达扫描特效管理工具配置</td> </tr> </tbody> </table> <h3>方法</h3> <h4>添加雷达扫描</h4> <ul> <li><strong>简要描述</strong>: 添加雷达扫描</li> <li><strong>接口</strong>: <code>addRadarEffect(name, RadarEffect)</code></li> </ul> <h5>参数</h5> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><code>name</code></td> <td>是</td> <td>string</td> <td>名称</td> </tr> <tr> <td><code>RadarEffect</code></td> <td>是</td> <td><code>BCore.Extension.Effect.RadarEffect</code></td> <td>雷达扫描对象</td> </tr> </tbody> </table> <h5>示例</h5> <pre><code class="language-javascript">let radarEffectManagerConfig = new BCore.Extension.Effect.RadarEffectManagerConfig(mViewer3D); let radarEffectManager= new BCore.Extension.Effect.RadarEffectManager(radarEffectManagerConfig); let radarEffectConfig = new BCore.Extension.Effect.RadarEffectConfig(); let radarEffect = new BCore.Extension.Effect.RadarEffect(radarEffectConfig); radarEffectManager.addRadarEffect(&amp;quot;name&amp;quot;, radarEffect);</code></pre> <h4>移除雷达扫描</h4> <ul> <li><strong>简要描述</strong>: 移除雷达扫描</li> <li><strong>接口</strong>: <code>removeRadarEffect(name)</code></li> </ul> <h5>参数</h5> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><code>name</code></td> <td>是</td> <td>string</td> <td>名称</td> </tr> </tbody> </table> <h5>示例</h5> <pre><code class="language-javascript">radarEffectManager.removeRadarEffect('name');</code></pre> <h3>使用说明</h3> <p>如果有其他问题或需要具体帮助,请随时提出!</p>

页面列表

ITEM_HTML