mirror of
https://git.sleeping.town/mirrors/foxy-moxy
synced 2025-06-16 20:31:29 -07:00
mouth and cancel eyes
This commit is contained in:
parent
b4d13dccc4
commit
9497ef36f7
2 changed files with 35 additions and 4 deletions
15
js/fox.js
15
js/fox.js
|
@ -54,7 +54,8 @@ var Fox = function (IMG_WIDTH, IMG_HEIGHT) {
|
|||
return {
|
||||
height: eyeHeight,
|
||||
width: eyeHeight/2,
|
||||
style: chance.pickone(['ellipse', 'smiley']),
|
||||
style: 'ellipse',
|
||||
// style: chance.pickone(['ellipse', 'smiley']),
|
||||
left: {
|
||||
x: origin.x + (headWidth/2) - offsetX,
|
||||
y: origin.y + (headHeight/2) + offsetY
|
||||
|
@ -75,6 +76,16 @@ var Fox = function (IMG_WIDTH, IMG_HEIGHT) {
|
|||
}
|
||||
}(eyes));
|
||||
|
||||
var mouth = (function (nose) {
|
||||
return {
|
||||
x: origin.x + (headWidth/2),
|
||||
y: (nose.y + 0.15 * (origin.y + headHeight - nose.y)),
|
||||
width: 0.08 * headWidth,
|
||||
height: 0.04 * headWidth,
|
||||
style: chance.pickone(['smirk', 'cat'])
|
||||
}
|
||||
}(nose));
|
||||
|
||||
return {
|
||||
canvas: {
|
||||
height: IMG_HEIGHT,
|
||||
|
@ -98,7 +109,7 @@ var Fox = function (IMG_WIDTH, IMG_HEIGHT) {
|
|||
ears: ears,
|
||||
eyes: eyes,
|
||||
nose: nose,
|
||||
// mouth: mouth
|
||||
mouth: mouth
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue