mirror of
https://git.sleeping.town/mirrors/foxy-moxy
synced 2024-12-22 06:15:29 +00:00
limit ear range
This commit is contained in:
parent
4448a59dd0
commit
52637bf2e3
1 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ var Fox = function (IMG_WIDTH, IMG_HEIGHT) {
|
|||
var headHeight = IMG_HEIGHT / 2;
|
||||
|
||||
var ears = (function () {
|
||||
var offsetX = chance.floating({min: 0, max: headWidth/2});
|
||||
var offsetX = chance.floating({min: 0.1 * headWidth, max: 0.4 * headWidth});
|
||||
var angle = chance.floating({min: 0, max: Math.PI / 6});
|
||||
// TODO: size, angle?
|
||||
return {
|
||||
|
@ -20,14 +20,14 @@ var Fox = function (IMG_WIDTH, IMG_HEIGHT) {
|
|||
y: origin.y + (0.15 * headHeight),
|
||||
angle: angle,
|
||||
width: 0.4 * headWidth,
|
||||
height: 0.6 * headHeight
|
||||
height: 0.6 * headHeight
|
||||
},
|
||||
right: {
|
||||
x: origin.x + (headWidth/2) + offsetX,
|
||||
y: origin.y + (0.15 * headHeight),
|
||||
angle: -angle,
|
||||
width: 0.4 * headWidth,
|
||||
height: 0.6 * headHeight
|
||||
height: 0.6 * headHeight
|
||||
}
|
||||
};
|
||||
}());
|
||||
|
|
Loading…
Reference in a new issue