Function: constantToNode()
constantToNode(
value):any
Converts a plain JS constant value (a bare number, or a [x,y]/[x,y,z]
array) into the equivalent TSL node - the JS-side counterpart of the
activation-decoded slice a channel produces when it's actively trained.
Used to give an alwaysConstant (or otherwise node-less) channel a debug-
preview node "for free", and by NTCNodeMaterial.setDebugView
to preview a constant channel through the exact same node-based color
pipeline as a trained one.
Parameters
value
number | number[]
Returns
any