diff options
author | Thomas White <taw@physics.org> | 2020-09-06 18:41:38 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-09-06 18:41:38 +0200 |
commit | 6a473c6adff522378050cd9b227e946569a85db6 (patch) | |
tree | cf8bd7d3950d09bad5a4addbdd2fecf0db0cf7e5 | |
parent | ddab20cb9b5126bedd6340571794944b562fa472 (diff) |
Add a blackout state
-rw-r--r-- | examples/demo.scm | 2 | ||||
-rw-r--r-- | guile/starlet/base.scm | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/examples/demo.scm b/examples/demo.scm index 74fa65f..3936b28 100644 --- a/examples/demo.scm +++ b/examples/demo.scm @@ -101,7 +101,7 @@ #:fade-down 1) (cue 3 - (cue-state) + (cue-state (apply-state blackout-state)) #:fade-up 0 #:fade-down 2))) diff --git a/guile/starlet/base.scm b/guile/starlet/base.scm index 1b1d699..b0cc952 100644 --- a/guile/starlet/base.scm +++ b/guile/starlet/base.scm @@ -31,7 +31,8 @@ lighting-state apply-state at - home-state)) + home-state + blackout-state)) (define-class <fixture-attribute> (<object>) (name @@ -112,6 +113,9 @@ ;; commanded otherwise (define home-state (make <starlet-state>)) +;; Basic state which sets all intensities to zero +(define blackout-state (make <starlet-state>)) + (define (make-empty-state) (make <starlet-state>)) @@ -166,6 +170,10 @@ #:uni universe #:friendly-name friendly-name))) (home-all! home-state new-fixture) + (set-in-state! blackout-state + new-fixture + (find-attr new-fixture 'intensity) + 0.0) (atomic-box-set! patched-fixture-list (cons new-fixture (atomic-box-ref patched-fixture-list))) |