本文へスキップ

onDeviceOrientationChange()

onDeviceOrientationChange: ({ GLctx, computeCtx, videoWidth, videoHeight, orientation })`.

説明

onDeviceOrientationChange()`は、デバイスの縦横の向きが変わったときに呼ばれる。

パラメータ

パラメータ説明
GLctx描画キャンバスの WebGLRenderingContext または WebGL2RenderingContext.
computeCtxコンピュートキャンバスの WebGLRenderingContext または WebGL2RenderingContext.
ビデオ幅カメラフィードの幅(ピクセル単位)。
ビデオハイトカメラフィードの高さ(ピクセル単位)。
オリエンテーションポートレートからのUIの回転を度単位で指定する(-90, 0, 90, 180)。

XR8.addCameraPipelineModule({
name: 'mycamerapipelinemodule',
onDeviceOrientationChange: ({ GLctx, videoWidth, videoHeight, orientation }) => {
// handleResize({ GLctx, videoWidth, videoHeight, orientation })
},
})