Skip to content

@ue-too/board / index / CameraMuxRotationOutput

型エイリアス: CameraMuxRotationOutput

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

定義: packages/board/src/camera/camera-mux/interface.ts:88

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

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