ConvertFunction: (newValue: any, context: Context) => any

Conversion callback

Type declaration

    • (newValue: any, context: Context): any
    • Parameters

      • newValue: any

        provided as an array if multiple values

      • context: Context

        see Context

      Returns any

Binding.for(left, right).syncToRight(["heading", "tilt"], "camera", ([heading, tilt], context) => {
const camera = context.targetValue();
if(camera.heading === heading && camera.tilt === tilt) {
return context.ignore();
}
let newCamera = camera.clone();
newCamera.heading = heading;
newCamera.tilt = tilt;
return newCamera;
});