Added keyframes and tracks
This commit is contained in:
parent
393730a2b2
commit
539e54902a
1 changed files with 39 additions and 5 deletions
|
@ -1,25 +1,29 @@
|
|||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from decimal import Decimal
|
||||
|
||||
|
||||
@dataclass
|
||||
class SpaceVector:
|
||||
"""A 3-dimensional coordinate structure with clear orientation."""
|
||||
|
||||
|
||||
lr: float
|
||||
"""Left-to-Right."""
|
||||
|
||||
|
||||
tb: float
|
||||
"""Top-to-Bottom."""
|
||||
|
||||
|
||||
fb: float
|
||||
"""Front-to-Behind."""
|
||||
|
||||
|
||||
class Capabilities(Enum):
|
||||
SWITCH = "switch"
|
||||
BRIGHTNESS = "brightness"
|
||||
TEMPERATURE = "temperature"
|
||||
COLOR = "color"
|
||||
|
||||
|
||||
@dataclass
|
||||
class Fixture:
|
||||
"""Definition of a fixture that generates light, its capabilities and positioning."""
|
||||
|
@ -45,6 +49,7 @@ class Fixture:
|
|||
exposure: float
|
||||
"""In range [0,1], how exposed is the light source of the fixture. 0: no exposure. 1: full exposure."""
|
||||
|
||||
|
||||
@dataclass
|
||||
class Space:
|
||||
"""A space containing fixtures."""
|
||||
|
@ -62,6 +67,37 @@ class Space:
|
|||
"""A reference point in the space from which the audience perspective might be assumed."""
|
||||
|
||||
|
||||
@dataclass
|
||||
class Keyframe:
|
||||
"""State description for a specified point in time."""
|
||||
|
||||
time: Decimal
|
||||
"""Point of time of the keyframe. Stored as decimal for high precision."""
|
||||
|
||||
parameter: str
|
||||
"""Parameter targeted by frame value."""
|
||||
|
||||
value: None | bool | float | int | str = None
|
||||
"""Targeted state value reached by reaching the keyframe."""
|
||||
|
||||
|
||||
@dataclass
|
||||
class Track:
|
||||
"""Contains a sequence of keyframes for specified fixtures."""
|
||||
|
||||
id: str
|
||||
"""Unique identifier for track."""
|
||||
|
||||
name: str
|
||||
"""Human readable name."""
|
||||
|
||||
fixture_ids: list[str]
|
||||
"""Fixtures by ids targeted by track."""
|
||||
|
||||
keyframes: list[Keyframe]
|
||||
"""Sequence of keyframes describing actions"""
|
||||
|
||||
|
||||
@dataclass
|
||||
class Sequence:
|
||||
"""A sequence of light events described over fixtures."""
|
||||
|
@ -72,8 +108,6 @@ class Sequence:
|
|||
name: str
|
||||
"""Human readable name."""
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class Event:
|
||||
|
|
Loading…
Reference in a new issue