mirror of
https://git.sleeping.town/mirrors/foxy-moxy
synced 2024-11-24 21:17:44 +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 headHeight = IMG_HEIGHT / 2;
|
||||||
|
|
||||||
var ears = (function () {
|
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});
|
var angle = chance.floating({min: 0, max: Math.PI / 6});
|
||||||
// TODO: size, angle?
|
// TODO: size, angle?
|
||||||
return {
|
return {
|
||||||
|
@ -20,14 +20,14 @@ var Fox = function (IMG_WIDTH, IMG_HEIGHT) {
|
||||||
y: origin.y + (0.15 * headHeight),
|
y: origin.y + (0.15 * headHeight),
|
||||||
angle: angle,
|
angle: angle,
|
||||||
width: 0.4 * headWidth,
|
width: 0.4 * headWidth,
|
||||||
height: 0.6 * headHeight
|
height: 0.6 * headHeight
|
||||||
},
|
},
|
||||||
right: {
|
right: {
|
||||||
x: origin.x + (headWidth/2) + offsetX,
|
x: origin.x + (headWidth/2) + offsetX,
|
||||||
y: origin.y + (0.15 * headHeight),
|
y: origin.y + (0.15 * headHeight),
|
||||||
angle: -angle,
|
angle: -angle,
|
||||||
width: 0.4 * headWidth,
|
width: 0.4 * headWidth,
|
||||||
height: 0.6 * headHeight
|
height: 0.6 * headHeight
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in a new issue