title = Yii::$app->name; ConfettiAsset::register($this); $this->registerJs(" var end = Date.now() + (2 * 1000); var scalar = 2; var foodEmojis = ['🍕', '🍔', '🍎', '🥑', '🥗', '🍣', '🍩', '🌮', '🍉', '🍞', '🍜', '🥩', '🍪', '🥕', '🧀', '🍓', '🍍', '🥒', '🍇', '🥞', '🦞', '🍗', '🍛']; // Create shapes from all emojis var emojiShapes = foodEmojis.map(emoji => confetti.shapeFromText({ text: emoji, scalar })); var colors = ['#4a8fc4', '#FFA500', '#585858']; // Function to pick 3 random unique emojis function getRandomEmojis() { let shuffled = emojiShapes.sort(() => 0.5 - Math.random()); return shuffled.slice(0, 3); // Get first 3 elements } // Detect if user is on a phone (simple check) var isMobile = window.innerWidth < 768; // Adjust as needed for tablets (function frame() { confetti({ particleCount: isMobile ? 1 : 2, // Fewer particles on mobile angle: 60, spread: isMobile ? 35 : 55, // Less spread on mobile, origin: { x: 0 }, shapes: getRandomEmojis(), scalar: isMobile ? 1.5 : 2 // Slightly smaller on mobile }); confetti({ particleCount: isMobile ? 1 : 2, // Fewer particles on mobile angle: 120, spread: isMobile ? 35 : 55, // Less spread on mobile, origin: { x: 1 }, shapes: getRandomEmojis(), scalar: isMobile ? 1.5 : 2 // Slightly smaller on mobile }); if (Date.now() < end) { requestAnimationFrame(frame); } }());"); ?>
Our AI minions have finished judging you... and your food. But also you. 🤖🍕
🔥 Calories
🍗 Protein
🥑 Fat
🍞 Carbs
= $model->calories ?> kcal
= $model->protein ?> g
= $model->fat ?> g
= $model->carbohydrates ?> g