Commit d15af854 authored by 任建锋's avatar 任建锋

--

parent d9bba829
......@@ -8,7 +8,8 @@
<title>烽火台</title>
<script src="//yun.duiba.com.cn/js-libs/psd.js/3.2.0/psd.min.js"></script>
<script src="//yun.duiba.com.cn/editor/zeroing/libs/engine.c70c23ccac5955f9f2cd400fda1e6bba2fb413a3.js"></script>
<script src="http://127.0.0.1:8081/debug/engine.js"></script>
<script src="http://127.0.0.1:8083/debug/engine-svga.js"></script>
</head>
<body>
......
......@@ -144,6 +144,7 @@ export const projectStore = {
this.dispatch('fillLastVersion');
this.commit('updateAssetDep');
state.mockServeEnabled = getMockServeEnabled(id);
updateMock(localData.mock);
},
......@@ -398,14 +399,20 @@ export const projectStore = {
} else {
state.data.views.push(child);
}
events.$emit("viewReset")
},
importView(state, view) {
state.data.views.push(view);
events.$emit("viewReset")
},
deleteNode(state, {node, parentNode}) {
const parentChildren = parentNode.children || parentNode;
const index = parentChildren.indexOf(node);
parentChildren.splice(index, 1);
events.$emit("viewReset")
},
copyNode(state, {node, parentNode, copyState}) {
......@@ -432,6 +439,8 @@ export const projectStore = {
}
}
}
events.$emit("viewReset")
},
......@@ -457,6 +466,8 @@ export const projectStore = {
} else {
console.warn("请先选择一个节点进行复制")
}
events.$emit("viewReset")
},
importAssets(state, assets) {
state.data.assets.push(...assets);
......
......@@ -309,6 +309,11 @@ export default {
type: 'boolean',
default: false
},
mouseChildren: {
alias: '子集交互',
type: 'boolean',
default: false
},
}
},
shape: {
......
......@@ -52,7 +52,7 @@
entrySceneView: 'entry',
editorMode: true,
assetResolver: this.assetResolver,
frameRate: 10,
frameRate: 30,
},
}, null, () => {
this.onLaunched();
......
......@@ -60,10 +60,7 @@
events.$emit('setMoveEdit', {e,type});
},
onRuntimeLayerLaunched() {
console.log(this.views[0])
console.log(this.project)
// this.$refs.runtimeLayer.showView(viewConfig);
this.$refs.runtimeLayer.showView(this.views[0]);
events.$emit("viewReset")
},
onSelectNode(nodePath) {
if (!nodePath) {
......@@ -89,6 +86,9 @@
},
onModifyProp(key,value,type) {
console.log("修改 key v")
if(key=="source"||key=="autoPlay"){
events.$emit("viewReset")
}
if(this.$refs.runtimeLayer){
this.$refs.runtimeLayer.modifyProps(this.nodePath, {
[key]: value,
......@@ -102,7 +102,8 @@
if(!this.autoSelectState){
return false;
}
console.log("sdsd",x/this.zoom,y/this.zoom)
console.log("sdsd",{x:x/this.zoom, y:y/this.zoom})
console.log("sdsd",x,y)
// setTimeout(()=>{
if(this.$refs.runtimeLayer){
this.nodePath = this.$refs.runtimeLayer.getNodePathWithPos({x:x/this.zoom, y:y/this.zoom});
......@@ -152,6 +153,9 @@
events.$on('autoSelectState', (data)=>{
this.autoSelectState=data
});
events.$on("viewReset",()=>{this.$refs.runtimeLayer.showView(this.views[0]);})
},
watch: {
nodePath() {
......
......@@ -67,9 +67,13 @@ export default {
if(!this.canFouce){
return false;
}
// console.log(e,this.$refs.zeroPlayground.getBoundingClientRect())
// console.log(e.offsetX,this.$refs.zeroPlayground.getBoundingClientRect())
// console.log(e.pageX,this.$refs.zeroPlayground.getBoundingClientRect())
// console.log(e.pageX-(this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom))
events.$emit("onClickTouchLayer",{
x:e.pageX-this.$refs.zeroPlayground.getBoundingClientRect().left/2,
y:e.pageY-this.$refs.zeroPlayground.getBoundingClientRect().top/2
x:e.pageX-this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom,
y:e.pageY-this.$refs.zeroPlayground.getBoundingClientRect().top/this.zoom
});
},
matrixToGroup(matrix) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment