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

--

parent d9bba829
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
<title>烽火台</title> <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/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> </head>
<body> <body>
......
...@@ -144,6 +144,7 @@ export const projectStore = { ...@@ -144,6 +144,7 @@ export const projectStore = {
this.dispatch('fillLastVersion'); this.dispatch('fillLastVersion');
this.commit('updateAssetDep'); this.commit('updateAssetDep');
state.mockServeEnabled = getMockServeEnabled(id); state.mockServeEnabled = getMockServeEnabled(id);
updateMock(localData.mock); updateMock(localData.mock);
}, },
...@@ -398,14 +399,20 @@ export const projectStore = { ...@@ -398,14 +399,20 @@ export const projectStore = {
} else { } else {
state.data.views.push(child); state.data.views.push(child);
} }
events.$emit("viewReset")
}, },
importView(state, view) { importView(state, view) {
state.data.views.push(view); state.data.views.push(view);
events.$emit("viewReset")
}, },
deleteNode(state, {node, parentNode}) { deleteNode(state, {node, parentNode}) {
const parentChildren = parentNode.children || parentNode; const parentChildren = parentNode.children || parentNode;
const index = parentChildren.indexOf(node); const index = parentChildren.indexOf(node);
parentChildren.splice(index, 1); parentChildren.splice(index, 1);
events.$emit("viewReset")
}, },
copyNode(state, {node, parentNode, copyState}) { copyNode(state, {node, parentNode, copyState}) {
...@@ -432,6 +439,8 @@ export const projectStore = { ...@@ -432,6 +439,8 @@ export const projectStore = {
} }
} }
} }
events.$emit("viewReset")
}, },
...@@ -457,6 +466,8 @@ export const projectStore = { ...@@ -457,6 +466,8 @@ export const projectStore = {
} else { } else {
console.warn("请先选择一个节点进行复制") console.warn("请先选择一个节点进行复制")
} }
events.$emit("viewReset")
}, },
importAssets(state, assets) { importAssets(state, assets) {
state.data.assets.push(...assets); state.data.assets.push(...assets);
......
...@@ -309,6 +309,11 @@ export default { ...@@ -309,6 +309,11 @@ export default {
type: 'boolean', type: 'boolean',
default: false default: false
}, },
mouseChildren: {
alias: '子集交互',
type: 'boolean',
default: false
},
} }
}, },
shape: { shape: {
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
entrySceneView: 'entry', entrySceneView: 'entry',
editorMode: true, editorMode: true,
assetResolver: this.assetResolver, assetResolver: this.assetResolver,
frameRate: 10, frameRate: 30,
}, },
}, null, () => { }, null, () => {
this.onLaunched(); this.onLaunched();
......
...@@ -60,10 +60,7 @@ ...@@ -60,10 +60,7 @@
events.$emit('setMoveEdit', {e,type}); events.$emit('setMoveEdit', {e,type});
}, },
onRuntimeLayerLaunched() { onRuntimeLayerLaunched() {
console.log(this.views[0]) events.$emit("viewReset")
console.log(this.project)
// this.$refs.runtimeLayer.showView(viewConfig);
this.$refs.runtimeLayer.showView(this.views[0]);
}, },
onSelectNode(nodePath) { onSelectNode(nodePath) {
if (!nodePath) { if (!nodePath) {
...@@ -89,6 +86,9 @@ ...@@ -89,6 +86,9 @@
}, },
onModifyProp(key,value,type) { onModifyProp(key,value,type) {
console.log("修改 key v") console.log("修改 key v")
if(key=="source"||key=="autoPlay"){
events.$emit("viewReset")
}
if(this.$refs.runtimeLayer){ if(this.$refs.runtimeLayer){
this.$refs.runtimeLayer.modifyProps(this.nodePath, { this.$refs.runtimeLayer.modifyProps(this.nodePath, {
[key]: value, [key]: value,
...@@ -102,7 +102,8 @@ ...@@ -102,7 +102,8 @@
if(!this.autoSelectState){ if(!this.autoSelectState){
return false; 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(()=>{ // setTimeout(()=>{
if(this.$refs.runtimeLayer){ if(this.$refs.runtimeLayer){
this.nodePath = this.$refs.runtimeLayer.getNodePathWithPos({x:x/this.zoom, y:y/this.zoom}); this.nodePath = this.$refs.runtimeLayer.getNodePathWithPos({x:x/this.zoom, y:y/this.zoom});
...@@ -152,6 +153,9 @@ ...@@ -152,6 +153,9 @@
events.$on('autoSelectState', (data)=>{ events.$on('autoSelectState', (data)=>{
this.autoSelectState=data this.autoSelectState=data
}); });
events.$on("viewReset",()=>{this.$refs.runtimeLayer.showView(this.views[0]);})
}, },
watch: { watch: {
nodePath() { nodePath() {
......
...@@ -67,9 +67,13 @@ export default { ...@@ -67,9 +67,13 @@ export default {
if(!this.canFouce){ if(!this.canFouce){
return false; 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",{ events.$emit("onClickTouchLayer",{
x:e.pageX-this.$refs.zeroPlayground.getBoundingClientRect().left/2, x:e.pageX-this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom,
y:e.pageY-this.$refs.zeroPlayground.getBoundingClientRect().top/2 y:e.pageY-this.$refs.zeroPlayground.getBoundingClientRect().top/this.zoom
}); });
}, },
matrixToGroup(matrix) { 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