From 14e552a7c3525d7d07aad4335465735537d12f52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomas=20Wenstr=C3=B6m?= Date: Thu, 24 Aug 2017 21:04:30 +0200 Subject: [PATCH] Updated the 'under the sea' ambient mode --- src/kaka/cakelight/AmbientMode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kaka/cakelight/AmbientMode.java b/src/kaka/cakelight/AmbientMode.java index ae223f1..29a861c 100644 --- a/src/kaka/cakelight/AmbientMode.java +++ b/src/kaka/cakelight/AmbientMode.java @@ -64,8 +64,8 @@ public class AmbientMode extends Mode { // TODO split into DynamicAmbient and St for (int i = 0; i < config.leds.getCount(); i++) { double x = frame.xOf(i); double y = frame.yOf(i); - double g = Math.min(1, Math.max(0, noise.getr(-0.5, 0.5, 0.5, x, y, time / 5000.0))); - double b = Math.pow(Math.min(1, Math.max(0, noise.getr(0, 0.9, 1, x, y, time / 7000.0))), 2); + double b = Math.pow(Math.min(1, Math.max(0, noise.getr(0.0, 1.0, 1, x, y, time / 7000.0))), 1.5); + double g = Math.min(b, Math.max(0, noise.getr(-1.0, 1.0, 0.5, x*3, y*3, time / 5000.0))); frame.setLedColor(i, Color.rgb(0, g, b)); } } else if (type == 2) { -- 2.11.0