123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /**
- * 说明:创建页面元素
- */
- function createHtml() {
- let sign =
- `<div id="all-controls">
- <div class="controls">
- <a id="horizontalExpansion" class="control-item">
- <i class="btn-horizontal"></i>
- <span class="tooltiptext">横向展开</span>
- </a>
- <a id="verticalExpansion" class="control-item">
- <i class="btn-vertical"></i>
- <span class="tooltiptext">纵向展开</span>
- </a>
-
- <a id="moveByFps" class="control-item">
- <i class="btn-fps"></i>
- <span class="tooltiptext">第一人称行走</span>
- </a>
- <a id="miniMap" class="control-item">
- <i class="btn-map"></i>
- <span class="tooltiptext">小地图</span>
- </a>
- <a id="sceneSetting" class="control-item">
- <i class="btn-setting"></i>
- <span class="tooltiptext">设置</span>
- <div class="control-menu map-bg-select-menu">
- <div class="control-menu-wrapper" style="position: relative">
- <div class="control-menu-pane">
- <ul class="setting-list">
- <li class="autoRotate setting-item selected">自动旋转</li>
- </ul>
- </div>
- </div>
- </div>
- </a>
- <a id="fullScreen" class="control-item">
- <i class="btn-full-screen"></i>
- <i class="btn-narrow"></i>
- <span class="tooltiptext">全屏</span>
- </a>
- </div>
- </div>`;
- // 将页面元素加入到div2d容器中,相关示例可参考官方示例-->界面2D-->UIAnchor
- $('#div2d').append($(sign));
- registerEvent(); // 注册事件
- }
|