forked from genewildish/Mainline
feat: Implement scrolling camera with layout-aware filtering
- Rename VERTICAL camera mode to FEED (rapid single-item view) - Add SCROLL camera mode with float accumulation for smooth movie-credits style scrolling - Add estimate_block_height() for cheap layout calculation without full rendering - Replace ViewportFilterStage with layout-aware filtering that tracks camera position - Add render caching to FontStage to avoid re-rendering items - Fix CameraStage to use global canvas height for scrolling bounds - Add horizontal padding in Camera.apply() to prevent ghosting - Add get_dimensions() to MultiDisplay for proper viewport sizing - Fix PygameDisplay to auto-detect viewport from window size - Update presets to use scroll camera with appropriate speeds
This commit is contained in:
@@ -45,7 +45,7 @@ class PipelinePreset:
|
||||
description: str = ""
|
||||
source: str = "headlines"
|
||||
display: str = "terminal"
|
||||
camera: str = "vertical"
|
||||
camera: str = "scroll"
|
||||
effects: list[str] = field(default_factory=list)
|
||||
border: bool = False
|
||||
|
||||
@@ -79,7 +79,7 @@ DEMO_PRESET = PipelinePreset(
|
||||
description="Demo mode with effect cycling and camera modes",
|
||||
source="headlines",
|
||||
display="pygame",
|
||||
camera="vertical",
|
||||
camera="scroll",
|
||||
effects=["noise", "fade", "glitch", "firehose", "hud"],
|
||||
)
|
||||
|
||||
@@ -88,7 +88,7 @@ POETRY_PRESET = PipelinePreset(
|
||||
description="Poetry feed with subtle effects",
|
||||
source="poetry",
|
||||
display="pygame",
|
||||
camera="vertical",
|
||||
camera="scroll",
|
||||
effects=["fade", "hud"],
|
||||
)
|
||||
|
||||
@@ -106,7 +106,7 @@ WEBSOCKET_PRESET = PipelinePreset(
|
||||
description="WebSocket display mode",
|
||||
source="headlines",
|
||||
display="websocket",
|
||||
camera="vertical",
|
||||
camera="scroll",
|
||||
effects=["noise", "fade", "glitch", "hud"],
|
||||
)
|
||||
|
||||
@@ -115,7 +115,7 @@ SIXEL_PRESET = PipelinePreset(
|
||||
description="Sixel graphics display mode",
|
||||
source="headlines",
|
||||
display="sixel",
|
||||
camera="vertical",
|
||||
camera="scroll",
|
||||
effects=["noise", "fade", "glitch", "hud"],
|
||||
)
|
||||
|
||||
@@ -124,7 +124,7 @@ FIREHOSE_PRESET = PipelinePreset(
|
||||
description="High-speed firehose mode",
|
||||
source="headlines",
|
||||
display="pygame",
|
||||
camera="vertical",
|
||||
camera="scroll",
|
||||
effects=["noise", "fade", "glitch", "firehose", "hud"],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user