This commit is contained in:
parent
39b0160064
commit
2347ecd201
71 changed files with 3779 additions and 1586 deletions
|
|
@ -4,6 +4,17 @@ import { gardenAudioConfig } from './audio/garden-audio-config';
|
|||
import { getInitialVibe, hexToRgb, VIBE_PRESETS } from './vibes';
|
||||
|
||||
const originalLocalStorage = globalThis.localStorage;
|
||||
const colorInteractionKeys = [
|
||||
'color1ToColor1',
|
||||
'color1ToColor2',
|
||||
'color1ToColor3',
|
||||
'color2ToColor1',
|
||||
'color2ToColor2',
|
||||
'color2ToColor3',
|
||||
'color3ToColor1',
|
||||
'color3ToColor2',
|
||||
'color3ToColor3',
|
||||
] as const;
|
||||
|
||||
const setBrowserVibeState = ({
|
||||
storedVibeId = null,
|
||||
|
|
@ -85,4 +96,15 @@ describe('vibe and audio config contract', () => {
|
|||
expect(Math.abs(voice.panOffset)).toBeLessThanOrEqual(1);
|
||||
});
|
||||
});
|
||||
|
||||
it('uses discrete color interaction matrices for every vibe', () => {
|
||||
VIBE_PRESETS.forEach((vibe) => {
|
||||
colorInteractionKeys.forEach((key) => {
|
||||
expect([-1, 0, 1]).toContain(vibe.settings[key]);
|
||||
});
|
||||
expect(vibe.settings.color1ToColor1).toBe(1);
|
||||
expect(vibe.settings.color2ToColor2).toBe(1);
|
||||
expect(vibe.settings.color3ToColor3).toBe(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue