mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-13 05:31:04 -04:00
WineGum example: Some more style changes.
This commit is contained in:
parent
71f6d53c70
commit
e23948f90d
1 changed files with 9 additions and 5 deletions
|
@ -47,10 +47,14 @@
|
|||
},
|
||||
|
||||
checkWallCollision: function() {
|
||||
if (this.point.x < -this.radius) { this.point.x = view.size.width + this.radius;}
|
||||
if (this.point.x > view.size.width + this.radius) { this.point.x = -this.radius;}
|
||||
if (this.point.y < -this.radius) { this.point.y = view.size.height + this.radius;}
|
||||
if (this.point.y > view.size.height + this.radius) { this.point.y = -this.radius;}
|
||||
if (this.point.x < -this.radius)
|
||||
this.point.x = view.size.width + this.radius;
|
||||
if (this.point.x > view.size.width + this.radius)
|
||||
this.point.x = -this.radius;
|
||||
if (this.point.y < -this.radius)
|
||||
this.point.y = view.size.height + this.radius;
|
||||
if (this.point.y > view.size.height + this.radius)
|
||||
this.point.y = -this.radius;
|
||||
},
|
||||
|
||||
updateShape: function() {
|
||||
|
@ -95,7 +99,7 @@
|
|||
var tp = this.getSidePoint(i);
|
||||
var bLen = b.getboundOffset(tp);
|
||||
var td = tp.getDistance(b.point);
|
||||
if (td < bLen ) {
|
||||
if (td < bLen) {
|
||||
this.boundOffsetBuff[i] -= (bLen - td) / 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue