Table of Contents

WeChat Mini Program Mega plugin known issues and limitations

この記事では、Mega 小程序プラグインの使用中に確認されている問題と制限事項について説明します。

WeChat known issues

現在 WeChat xr-frame または VisionKit で確認されている不具合。発生すると AR 機能が無効化されるため、開発時に関連するトリガーシナリオに注意してください。

WeChat plane detection abnormality

特定の状況下(例:画面に白い壁が大きく映る、カメラが長時間遮蔽されるなど)では、WeChat が提供する平面検出が異常状態になる可能性があります。この状態では、MegaTracker は正常に動作しません。

対処方法は 平面 AR トラッカー異常処理 を参照してください。

Session initialization time is long

AR Session は、WeChat の平面検出の初期化が完了するまで待機する必要があります。状況によっては、WeChat の平面検出初期化に時間がかかることがあります。

AR Session が xr-frame ARTracker の初期化完了を待機する理由については、MegaTracker の xr-frame 上での動作原理 を参照してください。

<xr-ar-tracker id="xrARTracker" mode="Plane" bind:ar-tracker-state="handleARTrackerState"></xr-ar-tracker>
handleARTrackerState({detail}) {
    if (detail.value.state == xrFrameSystem.EARTrackerState.Detected) {
        console.log('Plane is now detected by XR-Frame ARTracker.');
    }
}

Node's worldPosition is not immediately updated in the current frame

この例では trs.worldPosition が即時更新されません:

public onTick(delta, data) {
    const trs = this.el.getComponent(xrFrameSystem.Transform);
    // 更新前のノードの WorldPosition
    console.log(`World Position before update: ${trs.worldPosition.x}, ${trs.worldPosition.y}, ${trs.worldPosition.z}`);
    // 更新前のノードの LocalPosition
    console.log(`Local Position before update: ${trs.Position.x}, ${trs.Position.y}, ${trs.Position.z}`);
    trs.position.x += 0.1;
    trs.position.y += 0.1;
    trs.position.z += 0.1;
    // ノードの WorldPosition は更新されない
    console.log(`World Position after update: ${trs.worldPosition.x}, ${trs.worldPosition.y}, ${trs.worldPosition.z}`);
    // ノードの LocalPosition は更新される
    console.log(`Local Position after update: ${trs.Position.x}, ${trs.Position.y}, ${trs.Position.z}`);
}

開発時は常に LocalTransform(el.getComponent(xrFrameSystem.Transform).position および el.getComponent(xrFrameSystem.Transform).rotation)の使用を推奨します。

Screen orientation switching abnormality

WeChat Mini Program のグローバル設定 app.jsonwindow で "auto" を指定した場合:

デバイスが横画面モードで小程序を終了後、縦画面モードで再開すると、AR 表示に異常が発生する可能性があります。

したがって、AR 小程序アプリケーションでは いかなる場合も "auto" を使用しないでください。

Usage limitations

機能動作のハード要件。満たされない場合機能は利用不可ですが、設定や環境調整で回避可能です。

Device limitations

Mega 小程序プラグインを実行するデバイスは、少なくとも WeChat VisionKit V1 plane interface をサポートしている必要があります。理想的な結果を得るには、WeChat VisionKit V2 plane interface をサポートするデバイスの使用を推奨します。

  • サポートデバイスリスト: V2 plane AR interface support list を参照
  • 簡易判定方法:
    1. WeChat Mini Program 公式 Sample QR コードをスキャン WeChat Mini Program official Sample QR code
    2. 小程序内で インターフェース > VisionKit 視覚能力 > 水平面 AR-v2 に移動し、現在のデバイスがサポートしているか即時判定可能

VisionKit 非対応デバイスで Mega サービスを利用する必要がある場合は、ナビゲーションシーン best practice を参照し、ほぼ全てのデバイスで動作する 視+ AR ナビゲーション製品 を使用してください。

PlaneMode mandatory configuration

一部の WeChat インターフェースサポート制限により、planeMode は必ず 1 に設定する必要があります。

<xr-scene ar-system="modes:Plane; planeMode: 1" bind:ready="handleReady">

GPS functionality limitations

Block の GPS アライメントには非対応

注釈データの GPS 配置には非対応