Creates a new Dep instance for the referenced channel.
Creates a new Dep instance for the referenced channel.
the variable depended on
the adjustment to derive the value of the dependency from the variable
whether this Dep should submit to the variable.
dependency instance
Dep is very much like a
Val, but is also aChannel. The basic purpose is to represent a value dependent upon another variable. An example of this might be if you are representing a positionleftand you also wanted to representrightas well (which would beleft+width). These two variables are dependent upon each other and don't fit well asVars. An example usage might be:val left: Var[Double] = Var(0.0) val width: Var[Double] = Var(0.0) val right: Dep[Double, Double] = Dep(left, width)If an instance is
submissiveit removesadjustmentfrom being part of the mutation dependency. For example: in the above scenario if you setwidthto 100.0 andrightto 125.0 thenleftwill be 25.0. Now, what should happen if you changewidthto 50.0? Shouldleftchange to 75.0 (submissive = false) or shouldrightchange to 75.0 (submissive = true)?