Skip to main content

onDeviceOrientationChange()

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

Description

onDeviceOrientationChange() est appelé lorsque l'appareil change d'orientation paysage/portrait.

Paramètres

ParamètresDescription
GLctxLe WebGLRenderingContext ou WebGL2RenderingContext du canevas de dessin.
calculerCtxLe WebGLRenderingContext ou WebGL2RenderingContext du canevas de calcul.
largeur de la vidéoLargeur du flux de la caméra, en pixels.
hauteur de la vidéoHauteur du flux de la caméra, en pixels.
l'orientationLa rotation de l'interface utilisateur par rapport au portrait, en degrés (-90, 0, 90, 180).

Exemple

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