2019-04-18 06:28:04 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="app/editor/static/preview-templates/ccc-devtools/libs/vue-beauty/css/vue-beauty.min.css">
|
|
|
|
<link rel="stylesheet" type="text/css" href="app/editor/static/preview-templates/ccc-devtools/libs/element/css/element-ui.css">
|
|
|
|
<link rel="stylesheet" type="text/css" href="app/editor/static/preview-templates/ccc-devtools/libs/iview/css/iview.css">
|
|
|
|
<link rel="stylesheet" type="text/css" href="app/editor/static/preview-templates/ccc-devtools/css/style.css">
|
2018-12-26 12:21:22 +00:00
|
|
|
|
|
|
|
<div id="app">
|
|
|
|
<div class="demo-split">
|
2018-12-28 01:18:49 +00:00
|
|
|
<Split v-model="splitLeft" v-if="isDevMode">
|
2019-04-10 03:07:15 +00:00
|
|
|
<!-- 左边游戏预览区域 -->
|
|
|
|
<div slot="left" class="demo-split-pane" id="game_panel"
|
|
|
|
style="display:flex;justify-content:left;align-items:center;height: 100vh;">
|
2018-12-26 12:21:22 +00:00
|
|
|
<div id="top" style="position: absolute;top:0;"></div>
|
|
|
|
</div>
|
2019-04-10 03:07:15 +00:00
|
|
|
<!-- 右边节点树和属性区域 -->
|
2018-12-28 11:30:18 +00:00
|
|
|
<div slot="right" class="demo-split-pane no-padding">
|
2018-12-26 12:21:22 +00:00
|
|
|
<Split v-model="splitRight" mode="vertical">
|
2019-04-10 03:07:15 +00:00
|
|
|
<!-- 节点树面板 -->
|
2018-12-26 12:21:22 +00:00
|
|
|
<div slot="top" class="demo-split-pane" style="padding-left: 5px;">
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-input v-if="!isAutoRefreshTree" placeholder="搜索节点" v-model="filterText" size="mini"
|
|
|
|
id="searchInput"></el-input>
|
|
|
|
<v-tree v-if="isDevMode&&isAutoRefreshTree" :data="sceneTreeData" ref="sceneTree"
|
|
|
|
@select="handleNodesSelect"
|
|
|
|
style="min-width: 250px;height: 100%;overflow-x:hidden;overflow-y:auto;background: white;">
|
|
|
|
</v-tree>
|
|
|
|
<el-tree v-if="isDevMode&&!isAutoRefreshTree" :data="sceneTreeData" :draggable="true"
|
|
|
|
:props="nodeProps" :default-expanded-keys="defaultExpandedKeys" empty-text="暂无数据..."
|
|
|
|
:node-key="'_id'" :expand-on-click-node="false" :filter-node-method="filterNode"
|
|
|
|
ref="sceneTree" @node-click="handleNodeClick"
|
|
|
|
style="min-width: 250px;height: 100%;overflow-x:hidden;overflow-y:auto;">
|
2018-12-26 12:21:22 +00:00
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
2019-04-10 03:07:15 +00:00
|
|
|
<span
|
|
|
|
v-bind:style="{color: data.activeInHierarchy?'#606266':'#C0C4CC'}">{{ node.label }}</span>
|
2018-12-26 12:21:22 +00:00
|
|
|
</span>
|
2019-02-01 11:22:07 +00:00
|
|
|
</el-tree>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-button v-if="!isAutoRefreshTree" @click="handleRefreshTree" icon="el-icon-refresh"
|
|
|
|
size="mini" style="position: absolute;right:0;top:0;"></el-button>
|
2019-02-01 11:22:07 +00:00
|
|
|
<div style="position: absolute;right:0;bottom:0;width: 100px;height:20px;">
|
|
|
|
<span style="line-height:20px;">自动刷新</span>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-switch v-model="isAutoRefreshTree" active-color="#0099ff" inactive-color="gray">
|
|
|
|
</el-switch>
|
2019-02-01 11:22:07 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <el-button @click="handleSwitchTreeMode" icon="el-icon-refresh" size="mini" style="position: absolute;right:0;bottom:0;"></el-button> -->
|
2018-12-26 12:21:22 +00:00
|
|
|
</div>
|
2019-04-10 03:07:15 +00:00
|
|
|
<!-- 节点属性面板 -->
|
|
|
|
<div slot="bottom" class="demo-split-pane"
|
|
|
|
style="background: white;min-width: 250px;height: 100%;padding:5px 0;overflow-x:hidden;overflow-y:auto;">
|
2018-12-26 12:21:22 +00:00
|
|
|
<div v-if="node">
|
|
|
|
<el-row style="margin:5px 0;">
|
|
|
|
<el-col :span="2" style="text-align:center;padding-top:7px;padding-left:5px;">
|
|
|
|
<el-checkbox v-model="node.active"></el-checkbox>
|
|
|
|
</el-col>
|
2019-01-04 13:27:06 +00:00
|
|
|
<el-col :span="18">
|
2018-12-26 12:21:22 +00:00
|
|
|
<el-input v-model="node.name" size="mini"></el-input>
|
|
|
|
</el-col>
|
2019-01-04 13:27:06 +00:00
|
|
|
<el-col :span="4">
|
|
|
|
<div style="width: 100%;height:28px;border: solid 1px rgb(220, 223, 230);border-radius: 4px;text-align: center;"
|
2019-04-10 03:07:15 +00:00
|
|
|
@click="handleChangeNodeSchema"><span style="line-height: 28px;"
|
|
|
|
:style="{color: is3DNode?'#409EFF':'#606266'}">2.5d</span></div>
|
2018-12-28 02:20:31 +00:00
|
|
|
</el-col>
|
2019-01-04 13:27:06 +00:00
|
|
|
|
2018-12-26 12:21:22 +00:00
|
|
|
</el-row>
|
2019-01-04 13:27:06 +00:00
|
|
|
<el-card v-if="nodeSchema">
|
|
|
|
<div>
|
|
|
|
<span>{{ nodeSchema.title }}</span>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-button style="float: right; padding: 3px 0;" type="text"
|
|
|
|
@click="outputNodeHandler">输出引用</el-button>
|
|
|
|
<el-button style="float: right; padding: 3px 0;margin-right: 10px;" type="text"
|
|
|
|
@click="drawNodeRect">标记位置</el-button>
|
2019-01-04 13:27:06 +00:00
|
|
|
</div>
|
|
|
|
<hr style="margin: 10px 0;" />
|
|
|
|
<div>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-row style="height: 28px;margin-bottom:3px;" v-for="(row, ri) in nodeSchema.rows"
|
|
|
|
:key="ri">
|
|
|
|
<el-col v-for="(col, ci) in row" :key="ci" :span="col.span"
|
|
|
|
style="text-align: left;line-height: 28px;">
|
2019-01-04 13:27:06 +00:00
|
|
|
<span v-if="col.type == 'label'">{{col.field}}</span>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-input-number v-if="col.type == 'number'" v-model="node[col.field]"
|
|
|
|
controls-position="right" size="mini" style="width: 100%;">
|
|
|
|
</el-input-number>
|
|
|
|
<el-input-number v-if="col.type == '3DAngle'"
|
|
|
|
v-model="node.eulerAngles[col.field]" controls-position="right"
|
|
|
|
size="mini" style="width: 100%;"></el-input-number>
|
|
|
|
<el-input v-if="col.type == 'input'" v-model="node[col.field]" size="mini">
|
|
|
|
</el-input>
|
|
|
|
<el-color-picker v-if="col.type == 'color'" :ref="col.key" size="mini"
|
|
|
|
v-model="node[col.field]"></el-color-picker>
|
2019-01-04 13:27:06 +00:00
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-card v-for="(section,index) in componentsSchema" :key="section.key"
|
|
|
|
style="margin: 10px 0;">
|
2019-01-04 13:27:06 +00:00
|
|
|
<div>
|
|
|
|
<el-checkbox v-model="node[section.key].enabled">{{ section.title }}</el-checkbox>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-button style="float: right; padding: 3px 0" type="text"
|
|
|
|
@click="outputComponentHandler(section.key)">输出引用</el-button>
|
2019-01-04 13:27:06 +00:00
|
|
|
</div>
|
|
|
|
<hr v-if="section.rows" style="margin: 10px 0;" />
|
|
|
|
<div>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-row style="height: 28px;margin-bottom:3px;" v-for="(row,ri) in section.rows"
|
|
|
|
:key="ri">
|
|
|
|
<el-col v-for="(col,ci) in row" :key="ci" :span="col.span"
|
|
|
|
style="text-align: left;line-height: 28px;">
|
2019-01-04 13:27:06 +00:00
|
|
|
<span v-if="col.type == 'label'">{{col.field}}</span>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-input-number v-if="col.type == 'number'"
|
|
|
|
v-model="node[section.key][col.field]" controls-position="right"
|
|
|
|
size="mini" style="width: 100%;"></el-input-number>
|
|
|
|
<el-input v-if="col.type == 'input'" v-model="node[section.key][col.field]"
|
|
|
|
size="mini"></el-input>
|
|
|
|
<el-input v-if="col.type == 'textarea'" type="textarea" :rows="1"
|
|
|
|
v-model="node[section.key][col.field]" size="mini">
|
2019-01-04 13:27:06 +00:00
|
|
|
</el-input>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-color-picker v-if="col.type == 'color'" :ref="col.key" size="mini"
|
|
|
|
v-model="node[section.key][col.field]"></el-color-picker>
|
|
|
|
<el-checkbox v-if="col.type == 'bool'"
|
|
|
|
v-model="node[section.key][col.field]"></el-checkbox>
|
|
|
|
<el-select v-if="col.type == 'select'"
|
|
|
|
v-model="node[section.key][col.field]" size="mini">
|
|
|
|
<el-option v-for="item in col.options" :key="item.value"
|
|
|
|
:label="item.label" :value="item.value">
|
2019-01-04 13:27:06 +00:00
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
2018-12-26 12:21:22 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Split>
|
|
|
|
</div>
|
|
|
|
</Split>
|
2019-04-10 03:07:15 +00:00
|
|
|
<!-- 控制按钮 -->
|
2019-01-04 13:27:06 +00:00
|
|
|
<div id="panelCtl" style="position:absolute;left:5px;top:50px;height: 50px;display: flex;align-items: center;">
|
|
|
|
<el-popover width="150" placement="top-start" trigger="click">
|
|
|
|
<el-button type="info" icon="el-icon-setting" circle slot="reference" size="mini"></el-button>
|
|
|
|
<div>
|
|
|
|
<el-row style="margin:5px 0;">
|
|
|
|
<el-col :span="12" style="text-align:left;padding-top:7px;padding-left:5px;">
|
|
|
|
节点树
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-switch style="margin: 5px;" v-model="isDevMode" @change="handleChangeMode"
|
|
|
|
active-color="#0099ff" inactive-color="gray">
|
2019-01-04 13:27:06 +00:00
|
|
|
</el-switch>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row style="margin:5px 0;">
|
|
|
|
<el-col :span="12" style="text-align:left;padding-top:7px;padding-left:5px;">
|
2019-04-16 05:49:31 +00:00
|
|
|
调试信息
|
2019-01-04 13:27:06 +00:00
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
2019-04-16 05:49:31 +00:00
|
|
|
<el-switch style="margin: 5px;" v-model="isShowProfile" @change="handleChangeStats"
|
2019-04-10 03:07:15 +00:00
|
|
|
active-color="#0099ff" inactive-color="gray">
|
2019-01-04 13:27:06 +00:00
|
|
|
</el-switch>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row style="margin:5px 0;">
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-col :span="12" style="text-align:left;padding-top:7px;padding-left:5px;">
|
|
|
|
缓存
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-switch style="margin: 5px;" v-model="isShowCache" @change="handleChangeCachePanel"
|
|
|
|
active-color="#0099ff" inactive-color="gray">
|
|
|
|
</el-switch>
|
|
|
|
</el-col>
|
2019-04-16 05:49:31 +00:00
|
|
|
</el-row>
|
2019-04-10 03:07:15 +00:00
|
|
|
<el-row style="margin:5px 0;">
|
|
|
|
<el-col :span="12" style="text-align:left;padding-top:7px;padding-left:5px;">
|
|
|
|
暗黑主题
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-switch style="margin: 5px;" v-model="isDarkTheme" @change="handleChangeTheme"
|
|
|
|
active-color="#0099ff" inactive-color="gray">
|
2019-01-04 13:27:06 +00:00
|
|
|
</el-switch>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row style="margin:5px 0;">
|
|
|
|
<el-col :span="12" style="text-align:left;padding-top:7px;padding-left:5px;">
|
|
|
|
源码
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-badge value="new" :hidden="!needUpdate">
|
|
|
|
<Icon style="margin: 5px;" type="logo-github" size="24" @click="openGithub" />
|
|
|
|
</el-badge>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</el-popover>
|
|
|
|
</div>
|
2018-12-26 12:21:22 +00:00
|
|
|
</div>
|
2019-04-10 03:07:15 +00:00
|
|
|
<!-- 缓存面板弹窗 -->
|
|
|
|
<Modal v-model="isShowCache" width="800" :mask-closable="false" :mask="false" scrollable @on-cancel="closeCachePanel()" :title="cacheTitle" footer-hide="true">
|
|
|
|
<i-table border :columns="cacheColumns" height="600" size="small" :data="cacheData" :loading="cacheDataLoading">
|
|
|
|
<template slot-scope="{ row, index }" slot="cache_preview">
|
2019-04-16 05:49:31 +00:00
|
|
|
<img :src="window.location.href + row.preview" style="max-height: 40px;max-width: 120px;" v-if="row.preview">
|
|
|
|
<div v-if="!row.preview" style="max-height: 40px;">_</div>
|
2019-04-10 03:07:15 +00:00
|
|
|
</template>
|
|
|
|
<template slot-scope="{ row, index }" slot="cache_action">
|
|
|
|
<i-button type="primary" size="small" @click="showCacheItem(row.id)">Detail</i-button>
|
|
|
|
<i-button type="error" size="small" @click="releaseCacheItem(row.id)">Release</i-button>
|
|
|
|
</template>
|
2019-04-16 05:49:31 +00:00
|
|
|
<template slot-scope="{ row, index }" slot="cache_size">
|
|
|
|
{{row.size !== -1 ? row.size + 'MB' : '_'}}
|
|
|
|
</template>
|
2019-04-10 03:07:15 +00:00
|
|
|
</i-table>
|
|
|
|
</Modal>
|
2018-12-26 12:21:22 +00:00
|
|
|
</div>
|
|
|
|
|
2019-04-10 03:07:15 +00:00
|
|
|
<script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/libs/vue/vue.min.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/libs/vue-beauty/js/vue-beauty.min.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/libs/element/js/element-ui.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/libs/iview/js/iview.js"></script>
|
2019-04-16 05:49:31 +00:00
|
|
|
<script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/libs/stats/Stats.js"></script>
|
2019-04-10 03:07:15 +00:00
|
|
|
<script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/config.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/js/app.js"></script>
|
2019-03-08 12:24:17 +00:00
|
|
|
|