From 52637bf2e3705c7602fd7792eca8930a83a11077 Mon Sep 17 00:00:00 2001 From: Jeffrey Sun Date: Thu, 15 Dec 2016 14:23:00 -0800 Subject: [PATCH] limit ear range --- js/fox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/fox.js b/js/fox.js index de79fd1..b929b39 100644 --- a/js/fox.js +++ b/js/fox.js @@ -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 } }; }());