Make all face images dynamic
This commit is contained in:
parent
d525c4938e
commit
ff82dce6f8
1 changed files with 9 additions and 9 deletions
|
@ -14,15 +14,15 @@ $printEmoBlocks = function($emotion, $feature, $steps = 6) use($em) {
|
|||
foreach(range(0, 100, 100/($steps-1)) as $i) {
|
||||
/* @var $hitRepo EmotionHero\Models\HitRepository */
|
||||
$hitRepo = $em->getRepository(EmotionHero\Models\Hit::class);
|
||||
if($feature == 'nose'){
|
||||
$items = [992, 1035, 701, 888, 671, 906, 693, 725, 762, 666, 751,992,728];
|
||||
$hit = $hitRepo->find($items[array_rand($items)]);
|
||||
} elseif($feature == 'mouth_left') {
|
||||
$items = [992, 1035, 1034, 888];
|
||||
$hit = $hitRepo->find($items[array_rand($items)]);
|
||||
} else{
|
||||
// if($feature == 'nose'){
|
||||
// $items = [992, 1035, 701, 888, 671, 906, 693, 725, 762, 666, 751,992,728];
|
||||
// $hit = $hitRepo->find($items[array_rand($items)]);
|
||||
// } elseif($feature == 'mouth_left') {
|
||||
// $items = [992, 1035, 1034, 888];
|
||||
// $hit = $hitRepo->find($items[array_rand($items)]);
|
||||
// } else{
|
||||
$hit = $hitRepo->getClosestHitWithImage($emotion, $i);
|
||||
}
|
||||
// }
|
||||
$img = $hit->getFeatureImgAsString($feature);
|
||||
$score = $hit->getEmotions()->getEmotionScore($emotion);
|
||||
|
||||
|
@ -72,7 +72,7 @@ font-size:80%;
|
|||
.mouth .emo-block{
|
||||
width:50%;
|
||||
float:left;
|
||||
height:12%;
|
||||
height:3.6em;
|
||||
}
|
||||
.mouth .emotitle{
|
||||
display:block;
|
||||
|
|
Loading…
Reference in a new issue