.
This commit is contained in:
parent
d2da0d1617
commit
2c7d72a699
2 changed files with 40 additions and 0 deletions
39
src/audio/garden-audio-gesture-state.test.ts
Normal file
39
src/audio/garden-audio-gesture-state.test.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
import { describe, expect, it } from 'vitest';
|
||||||
|
|
||||||
|
import { gardenAudioConfig } from './garden-audio-config';
|
||||||
|
import { GardenAudioGestureState } from './garden-audio-gesture-state';
|
||||||
|
|
||||||
|
describe('GardenAudioGestureState', () => {
|
||||||
|
it('uses only distance accumulated in the last half second', () => {
|
||||||
|
const state = new GardenAudioGestureState(gardenAudioConfig.input);
|
||||||
|
|
||||||
|
state.beginGesture();
|
||||||
|
|
||||||
|
expect(
|
||||||
|
state.recordStroke({
|
||||||
|
metrics: {
|
||||||
|
distancePixels: 70,
|
||||||
|
elapsedSeconds: 0.1,
|
||||||
|
},
|
||||||
|
}).activity
|
||||||
|
).toBeCloseTo(0.5);
|
||||||
|
|
||||||
|
expect(
|
||||||
|
state.recordStroke({
|
||||||
|
metrics: {
|
||||||
|
distancePixels: 70,
|
||||||
|
elapsedSeconds: 0.1,
|
||||||
|
},
|
||||||
|
}).activity
|
||||||
|
).toBe(1);
|
||||||
|
|
||||||
|
expect(
|
||||||
|
state.recordStroke({
|
||||||
|
metrics: {
|
||||||
|
distancePixels: 0,
|
||||||
|
elapsedSeconds: 0.51,
|
||||||
|
},
|
||||||
|
}).activity
|
||||||
|
).toBe(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
1
src/config/agent-budget.ts
Normal file
1
src/config/agent-budget.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export const ADAPTIVE_AGENT_CAP_MAX = 2_000_000;
|
||||||
Loading…
Reference in a new issue