mapitems matter body is not scaling anymore
This commit is contained in:
parent
a9812b403a
commit
980ae6e5a1
@ -1573,10 +1573,10 @@ export default {
|
||||
.onUpdate((obj) => {
|
||||
// https://github.com/liabru/matter-js/issues/986#issuecomment-812488873
|
||||
// revert to the original size (by reverting the previous scale)
|
||||
Matter.Body.scale(this.body, 1 / this.scale, 1 / this.scale)
|
||||
// Matter.Body.scale(this.body, 1 / this.scale, 1 / this.scale)
|
||||
this.paper_main_object.scale(1 / this.scale);
|
||||
// then scale again to new scale
|
||||
Matter.Body.scale(this.body, obj.s, obj.s)
|
||||
// Matter.Body.scale(this.body, obj.s, obj.s)
|
||||
this.paper_main_object.scale(obj.s);
|
||||
|
||||
// update superposition constraints points poisitions
|
||||
@ -1667,10 +1667,12 @@ export default {
|
||||
.onUpdate((obj) => {
|
||||
// https://github.com/liabru/matter-js/issues/986#issuecomment-812488873
|
||||
// revert to the original size (by reverting the previous scale)
|
||||
Matter.Body.scale(this.body, 1 / this.scale, 1 / this.scale)
|
||||
// INFO we dont need to sacle the matter body AND it may fix the montgolfière bug
|
||||
// TODO find another way to increase the mass
|
||||
// Matter.Body.scale(this.body, 1 / this.scale, 1 / this.scale)
|
||||
this.paper_main_object.scale(1 / this.scale);
|
||||
// then scale again to new scale
|
||||
Matter.Body.scale(this.body, obj.s, obj.s)
|
||||
// Matter.Body.scale(this.body, obj.s, obj.s)
|
||||
this.paper_main_object.scale(obj.s);
|
||||
|
||||
// update superposition constraints points positions
|
||||
|
Loading…
x
Reference in New Issue
Block a user