parent
0507cfcdcb
commit
2a90e7c787
@ -53,10 +53,11 @@ export default {
|
|||||||
tween: null,
|
tween: null,
|
||||||
is_opening: false,
|
is_opening: false,
|
||||||
is_closing: false,
|
is_closing: false,
|
||||||
|
is_hover: false,
|
||||||
|
//
|
||||||
body: null,
|
body: null,
|
||||||
body_parts: [],
|
body_parts: [],
|
||||||
constraint: null,
|
constraint: null,
|
||||||
is_hover: false,
|
|
||||||
//
|
//
|
||||||
paper_main_object: {},
|
paper_main_object: {},
|
||||||
paper_groups: {}
|
paper_groups: {}
|
||||||
@ -1067,6 +1068,8 @@ export default {
|
|||||||
if (this.is_hover) {
|
if (this.is_hover) {
|
||||||
this.paper_main_object.children['contours'].strokeColor = "#01ffe2";
|
this.paper_main_object.children['contours'].strokeColor = "#01ffe2";
|
||||||
this.paper_main_object.children['contours'].strokeWidth = 2;
|
this.paper_main_object.children['contours'].strokeWidth = 2;
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.paper_main_object.children['contours'].strokeColor = "#fff";
|
this.paper_main_object.children['contours'].strokeColor = "#fff";
|
||||||
this.paper_main_object.children['contours'].strokeWidth = 1;
|
this.paper_main_object.children['contours'].strokeWidth = 1;
|
||||||
@ -1720,8 +1723,13 @@ export default {
|
|||||||
onAfterEngineUpdate (event) {
|
onAfterEngineUpdate (event) {
|
||||||
this.respawn();
|
this.respawn();
|
||||||
|
|
||||||
|
if (this.is_hover) { // if mouse hover reset the matter body position to prev position
|
||||||
|
Matter.Body.setPosition(this.body, {x:this.pos.x, y:this.pos.y}, true);
|
||||||
|
}
|
||||||
|
|
||||||
this.paper_main_object.position = this.pos = this.body.position;
|
this.paper_main_object.position = this.pos = this.body.position;
|
||||||
|
|
||||||
|
|
||||||
this.handlePaperVisibilityOnAfterEnginUpdate()
|
this.handlePaperVisibilityOnAfterEnginUpdate()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user