Let the queue page pin the frame animation
Waiting for the shuffle bag to land on the animation you are working on makes testing one of them tedious. The queue page now carries an Animation row next to Background: Auto keeps the per-track cycle, any other button pins the player to that animation until the mode changes again. The animation names live in config.js alongside their labels, so the server can validate them and the queue page can label its buttons; motion.js keys its registry by the same names. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tg15tLAuT6NrCE1ZxKVgDB
This commit is contained in:
@@ -23,6 +23,18 @@ export const CORNER_INTERVAL_SECONDS = 5;
|
||||
// Gap between the frame and the screen edge, as a fraction of the short side.
|
||||
export const CORNER_MARGIN = 0.025;
|
||||
|
||||
// The frame animations, keyed by the id sent over the socket. The names must
|
||||
// match the registry in public/player/motion.js, which supplies the code.
|
||||
export const ANIMATIONS = {
|
||||
bounce: { label: 'Bounce' },
|
||||
corners: { label: 'Corners' },
|
||||
};
|
||||
|
||||
// Cycle a fresh random animation on every track change. Anything else pins the
|
||||
// player to that one animation, which is what the queue page's buttons are for.
|
||||
export const AUTO_ANIMATION = 'auto';
|
||||
export const DEFAULT_ANIMATION = AUTO_ANIMATION;
|
||||
|
||||
// Selectable fullscreen backgrounds, keyed by the id sent over the socket.
|
||||
export const BACKGROUNDS = {
|
||||
pink: { label: 'Pink', src: '/assets/PLAKAT_A2_pink_426x600mm.png' },
|
||||
|
||||
Reference in New Issue
Block a user