52 lines
1.1 KiB
Python
52 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
"""Figure-of-8 on the two Small Eye movers.
|
|
|
|
Dry run (prints DMX samples, sends nothing):
|
|
|
|
python3 scripts/anim_eight.py
|
|
python3 -m showfile run scripts/anim_eight.py --seconds 1
|
|
|
|
Send Art-Net, for example at the stage simulator:
|
|
|
|
python3 scripts/anim_eight.py --ip 127.0.0.1 --seconds 8
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
if str(ROOT) not in sys.path:
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
from showfile import Show
|
|
from showfile.play import script_main
|
|
|
|
|
|
def build() -> Show:
|
|
show = Show(author="Jimmy")
|
|
m1 = show.patch(
|
|
"Small Eye 7", "Mover", "43 Channel", name="Small Eye 7 #1", address=0, key="m1"
|
|
)
|
|
m2 = show.patch(
|
|
"Small Eye 7", "Mover", "43 Channel", name="Small Eye 7 #2", address=44, key="m2"
|
|
)
|
|
show.efx(
|
|
"Figure of 8",
|
|
[m1, m2],
|
|
algorithm="Eight",
|
|
width=40,
|
|
height=30,
|
|
x_offset=128,
|
|
y_offset=140,
|
|
duration_ms=8000,
|
|
key="eight",
|
|
)
|
|
show.run("eight")
|
|
return show
|
|
|
|
|
|
if __name__ == "__main__":
|
|
script_main(build)
|