xr_testing library
An XR runtime for tests, with no headset behind it.
import 'package:flutter3d_app/xr_testing.dart';
A second entry point, as flutter3d_hardware/testing.dart is one: a
fake is for a test, and an application that imports the main barrel
should not find it there. FakeXrSession drives every part of the XR
contract (capabilities and their refusals, frames with poses, controls,
planes, light and depth, a swapchain, anchors and haptics), and a test
reads back what the engine ended each frame with.
Classes
- FakeXrSession
- An XrSession with nothing behind it: frames come when asked, at a fixed period, from frameAt; what the engine ends them with is kept in ended.
- FakeXrSwapchain
- The fake runtime's images: one array texture on the device that draws, made at the first acquire, counted in and out.