Log inGet started
Package

switch.procNode

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

value.switch (procNode)

One of two values by a Bool: ifTrue when when is true, ifFalse otherwise. Only the branch taken cooks, so a branch that would refuse its inputs is never asked.

Inputs

  • when (Bool, default false): which value is taken.
  • ifTrue (Any, default 1): taken when when is true.
  • ifFalse (Any, default 0): taken when when is false.

Outputs

  • value (Any): the value taken.

Example

local shape = g.value.switch({ when = true, ifTrue = g.sdf.sphere({ radius = 0.5 }), ifFalse = g.sdf.box({}) })