Skip to content

@ue-too/board / CameraMuxRotationOutput

Type Alias: CameraMuxRotationOutput

CameraMuxRotationOutput = { allowPassThrough: true; delta: number; } | { allowPassThrough: false; }

Defined in: packages/board/src/camera/camera-mux/interface.ts:87

Discriminated union type for rotation input results. Indicates whether camera rotation is allowed and provides the delta if accepted.

Remarks

This type uses discriminated unions for type-safe flow control:

  • When allowPassThrough is true, the delta property is available
  • When allowPassThrough is false, rotation is blocked

Example

typescript
const output = cameraMux.notifyRotationInput(0.1); // 0.1 radians
if (output.allowPassThrough) {
  camera.setRotation(camera.rotation + output.delta);
}