pickAndOpen static method
Select a local GLB and open the specified target.
Implementation
static Future<ArGlbFile?> pickAndOpen({
required ArTarget target,
double? modelSizeM,
double offsetX = 0,
double? offsetY,
double? offsetZ,
double rotationX = 0,
double rotationY = 0,
double rotationZ = 0,
ArTryOnCamera camera = ArTryOnCamera.rear,
}) async {
_validate(target, modelSizeM ?? defaultSize(target),
[offsetX, offsetY ?? 0, offsetZ ?? 0, rotationX, rotationY, rotationZ]);
final file = await ArGlbPlacement.pickGlb();
if (file == null) return null;
await open(modelUri: file.uri, target: target, modelSizeM: modelSizeM,
offsetX: offsetX, offsetY: offsetY, offsetZ: offsetZ,
rotationX: rotationX, rotationY: rotationY, rotationZ: rotationZ, camera: camera);
return file;
}