feat(viewer): add recorded point colors and trajectory follow
This commit is contained in:
@@ -11,9 +11,9 @@ import threading
|
||||
from collections.abc import Callable, Mapping
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Protocol
|
||||
from typing import Literal, Protocol
|
||||
|
||||
from .models import ObservationSessionCandidate
|
||||
from .models import ObservationSessionCandidate, ReplayCommand
|
||||
|
||||
RecordingProgressPulse = Callable[[], None]
|
||||
RecordingExportResult = Mapping[str, object]
|
||||
@@ -38,6 +38,19 @@ class RecordingExporter(Protocol):
|
||||
) -> RecordingExportResult: ...
|
||||
|
||||
|
||||
class RecordedPointColorRenderer(Protocol):
|
||||
def __call__(
|
||||
self,
|
||||
command: ReplayCommand,
|
||||
*,
|
||||
application_id: str,
|
||||
recording_id: str,
|
||||
color_mode: Literal["intensity", "height", "distance", "rgb", "class"],
|
||||
palette: Literal["turbo", "viridis", "plasma", "grayscale", "custom"],
|
||||
custom_color: str,
|
||||
) -> bytes: ...
|
||||
|
||||
|
||||
ObservationArchiveDiscovery = Callable[
|
||||
[Path],
|
||||
tuple[ObservationSessionCandidate, ...],
|
||||
@@ -66,3 +79,4 @@ class ObservationRuntimeContribution:
|
||||
|
||||
archives: tuple[ObservationArchiveSource, ...]
|
||||
recording_exporter: RecordingExporter
|
||||
point_color_renderer: RecordedPointColorRenderer | None = None
|
||||
|
||||
Reference in New Issue
Block a user