zyy-engine

图形引擎API


初始化设置

<h1>初始化配置</h1> <h2>1.BCore2DFast.Application.Application2D.Application2DConfig</h2> <p><strong>构造方法:</strong></p> <pre><code class="language-javascript">new BCore2DFast.Application.Application2D.Application2DConfig()</code></pre> <p><strong>成员变量:</strong></p> <table> <thead> <tr> <th>成员变量</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>language</td> <td>string</td> <td>语言设置,zh-CN为中文,en-US为英文</td> </tr> <tr> <td>enableMessage</td> <td>boolean</td> <td>启用消息提示</td> </tr> <tr> <td>enableProgressBar</td> <td>boolean</td> <td>启用进度条</td> </tr> <tr> <td>mainUI</td> <td>string[]</td> <td>配置SDK功能,默认值为 ['Toolbar', 'Modellist', 'ResetButton']</td> </tr> <tr> <td>tools</td> <td>string[]</td> <td>配置工具条功能,默认值为 ['FullScreen', 'Layer', 'Measure', 'Annotate']</td> </tr> </tbody> </table> <hr /> <h2>2.BCore2DFast.Application.Application2D</h2> <p><strong>构造方法:</strong></p> <pre><code class="language-javascript">new BCore2DFast.Application.Application2D(config)</code></pre> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>config</td> <td>BCore2DFast.Application.Application2D.Application2DConfig</td> <td>二维应用程序的配置</td> </tr> </tbody> </table> <hr /> <h3>使用示例</h3> <p>以下是如何配置并创建一个2D应用程序的示例:</p> <pre><code class="language-javascript">// 初始化配置 const config = new BCore2DFast.Application.Application2D.Application2DConfig(); config.language = &amp;quot;zh-CN&amp;quot;; config.enableMessage = true; config.enableProgressBar = true; config.mainUI = ['Toolbar', 'Modellist', 'ResetButtonconfig.tools = ['FullScreen', 'Layer', 'Measure', 'Annotate']; // 创建二维应用程序 const app2D = new BCore2DFast.Application.Application2D(config);</code></pre> <h3>备注</h3> <ul> <li>在创建配置对象时,可以根据具体需求设置对应的参数。</li> <li>确保在使用前已经引入相关库和依赖。</li> </ul>

页面列表

ITEM_HTML