openUrl static method
Open a direct HTTPS GLB URL (CORS required in a browser).
Implementation
static Future<void> openUrl({
required String url,
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]);
validateModelUrl(url);
final uri = kIsWeb ? url : await remote.downloadModel(url);
await open(modelUri: uri, target: target, modelSizeM: modelSizeM,
offsetX: offsetX, offsetY: offsetY, offsetZ: offsetZ,
rotationX: rotationX, rotationY: rotationY, rotationZ: rotationZ, camera: camera);
}