| 
									
										
										
										
											2019-04-18 14:28:04 +08: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 20:21:22 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | <div id="app"> | 
					
						
							|  |  |  | 	<div class="demo-split"> | 
					
						
							| 
									
										
										
										
											2018-12-28 09:18:49 +08:00
										 |  |  | 		<Split v-model="splitLeft" v-if="isDevMode"> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 20:21:22 +08:00
										 |  |  | 				<div id="top" style="position: absolute;top:0;"></div> | 
					
						
							|  |  |  | 			</div> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 			<!-- 右边节点树和属性区域 --> | 
					
						
							| 
									
										
										
										
											2018-12-28 19:30:18 +08:00
										 |  |  | 			<div slot="right" class="demo-split-pane no-padding"> | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | 				<Split v-model="splitRight" mode="vertical"> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 					<!-- 节点树面板 --> | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | 					<div slot="top" class="demo-split-pane" style="padding-left: 5px;"> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 20:21:22 +08:00
										 |  |  | 							<span class="custom-tree-node" slot-scope="{ node, data }"> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 								<span | 
					
						
							|  |  |  | 									v-bind:style="{color: data.activeInHierarchy?'#606266':'#C0C4CC'}">{{ node.label }}</span> | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | 							</span> | 
					
						
							| 
									
										
										
										
											2019-02-01 19:22:07 +08:00
										 |  |  | 						</el-tree> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 19:22:07 +08:00
										 |  |  | 						<div style="position: absolute;right:0;bottom:0;width: 100px;height:20px;"> | 
					
						
							|  |  |  | 							<span style="line-height:20px;">自动刷新</span> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 							<el-switch v-model="isAutoRefreshTree" active-color="#0099ff" inactive-color="gray"> | 
					
						
							|  |  |  | 							</el-switch> | 
					
						
							| 
									
										
										
										
											2019-02-01 19:22:07 +08:00
										 |  |  | 						</div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 						<!-- <el-button @click="handleSwitchTreeMode" icon="el-icon-refresh" size="mini" style="position: absolute;right:0;bottom:0;"></el-button> --> | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | 					</div> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 20:21:22 +08: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 21:27:06 +08:00
										 |  |  | 								<el-col :span="18"> | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | 									<el-input v-model="node.name" size="mini"></el-input> | 
					
						
							|  |  |  | 								</el-col> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08: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 11:07:15 +08:00
										 |  |  | 										@click="handleChangeNodeSchema"><span style="line-height: 28px;" | 
					
						
							|  |  |  | 											:style="{color: is3DNode?'#409EFF':'#606266'}">2.5d</span></div> | 
					
						
							| 
									
										
										
										
											2018-12-28 10:20:31 +08:00
										 |  |  | 								</el-col> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | 							</el-row> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08:00
										 |  |  | 							<el-card v-if="nodeSchema"> | 
					
						
							|  |  |  | 								<div> | 
					
						
							|  |  |  | 									<span>{{ nodeSchema.title }}</span> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 21:27:06 +08:00
										 |  |  | 								</div> | 
					
						
							|  |  |  | 								<hr style="margin: 10px 0;" /> | 
					
						
							|  |  |  | 								<div> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 21:27:06 +08:00
										 |  |  | 											<span v-if="col.type == 'label'">{{col.field}}</span> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 21:27:06 +08:00
										 |  |  | 										</el-col> | 
					
						
							|  |  |  | 									</el-row> | 
					
						
							|  |  |  | 								</div> | 
					
						
							|  |  |  | 							</el-card> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 							<el-card v-for="(section,index) in componentsSchema" :key="section.key" | 
					
						
							|  |  |  | 								style="margin: 10px 0;"> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08:00
										 |  |  | 								<div> | 
					
						
							|  |  |  | 									<el-checkbox v-model="node[section.key].enabled">{{ section.title }}</el-checkbox> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 									<el-button style="float: right; padding: 3px 0" type="text" | 
					
						
							|  |  |  | 										@click="outputComponentHandler(section.key)">输出引用</el-button> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08:00
										 |  |  | 								</div> | 
					
						
							|  |  |  | 								<hr v-if="section.rows" style="margin: 10px 0;" /> | 
					
						
							|  |  |  | 								<div> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 21:27:06 +08:00
										 |  |  | 											<span v-if="col.type == 'label'">{{col.field}}</span> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 21:27:06 +08:00
										 |  |  | 											</el-input> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 21:27:06 +08:00
										 |  |  | 												</el-option> | 
					
						
							|  |  |  | 											</el-select> | 
					
						
							|  |  |  | 										</el-col> | 
					
						
							|  |  |  | 									</el-row> | 
					
						
							|  |  |  | 								</div> | 
					
						
							|  |  |  | 							</el-card> | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | 						</div> | 
					
						
							|  |  |  | 					</div> | 
					
						
							|  |  |  | 				</Split> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 		</Split> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 		<!-- 控制按钮 --> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08: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 11:07:15 +08:00
										 |  |  | 							<el-switch style="margin: 5px;" v-model="isDevMode" @change="handleChangeMode" | 
					
						
							|  |  |  | 								active-color="#0099ff" inactive-color="gray"> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08: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 13:49:31 +08:00
										 |  |  | 							调试信息 | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08:00
										 |  |  | 						</el-col> | 
					
						
							|  |  |  | 						<el-col :span="12"> | 
					
						
							| 
									
										
										
										
											2019-04-16 13:49:31 +08:00
										 |  |  | 							<el-switch style="margin: 5px;" v-model="isShowProfile" @change="handleChangeStats" | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 								active-color="#0099ff" inactive-color="gray"> | 
					
						
							| 
									
										
										
										
											2019-01-04 21:27:06 +08:00
										 |  |  | 							</el-switch> | 
					
						
							|  |  |  | 						</el-col> | 
					
						
							|  |  |  | 					</el-row> | 
					
						
							|  |  |  | 					<el-row style="margin:5px 0;"> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 13:49:31 +08:00
										 |  |  | 					</el-row> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 21:27:06 +08: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 20:21:22 +08:00
										 |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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-07-02 20:58:52 +08:00
										 |  |  | 				<img :src="window.location.protocol + '//' + window.location.host + '/' + row.preview" style="max-height: 40px;max-width: 120px;" v-if="row.preview"> | 
					
						
							| 
									
										
										
										
											2019-04-16 13:49:31 +08:00
										 |  |  | 				<div v-if="!row.preview" style="max-height: 40px;">_</div> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 13:49:31 +08:00
										 |  |  | 			<template slot-scope="{ row, index }" slot="cache_size"> | 
					
						
							|  |  |  | 				{{row.size !== -1 ? row.size + 'MB' : '_'}} | 
					
						
							|  |  |  | 			</template> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08:00
										 |  |  | 		</i-table> | 
					
						
							|  |  |  | 	</Modal> | 
					
						
							| 
									
										
										
										
											2018-12-26 20:21:22 +08:00
										 |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 13:49:31 +08:00
										 |  |  | <script type="text/javascript" charset="utf-8" src="app/editor/static/preview-templates/ccc-devtools/libs/stats/Stats.js"></script> | 
					
						
							| 
									
										
										
										
											2019-04-10 11:07:15 +08: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 20:24:17 +08:00
										 |  |  | 
 |