manager-app/manager_api_new/lib/model/immersive_background_kind.dart
Thomas Fransolet c8947880ba Ecran VR, section Scene3D et medias immersifs
Canal VR
- L'entree VR affiche VrScreen au lieu de « non configuree » : sous-onglet
  Configuration (AppConfigurationLinkScreen reutilise) et sous-onglet Casques
  (pincode d'appairage, etat, batterie, version, dernier vu).
- Le dialogue de plan SuperAdmin porte aussi les canaux et les add-ons
  (assistant, contenu immersif). Activer un canal cree son
  ApplicationInstance s'il n'existe pas ; le desactiver ne supprime rien.

Medias immersifs
- Types Image360, Video360, Model3D : icones, libelles, extensions, apercu
  dans la Mediatheque et facettes.
- Au depot, la pastille de type bascule Image <-> Image 360 et
  Video <-> Video 360 : rien dans un .jpg ne dit qu'il est
  equirectangulaire. Un .glb est reconnu seul.
- ImageCompressor ne touche plus aux 360 ni aux GLB, sur les deux chemins
  d'upload : ramenee a 2560 px, une equirectangulaire devient illisible dans
  un casque.

Scene3D
- Nouveau type de section (famille des lieux) et son ecran de configuration :
  modele, mode objet/decor, points d'interet.
- Fond immersif d'une configuration, visible si l'instance a l'add-on : le
  type est deduit de la ressource choisie, avec une image de repli.

Client API edite a la main en miroir du backend : SectionScene3DApi,
Scene3DDTO, ImmersiveBackgroundDTO, Position3D, AppType sur les devices,
ResourceType etendu. Libelles FR/EN/NL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 16:54:13 +02:00

91 lines
2.8 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
/// Ce qu'est le fond d'une visite : un panorama fixe, une video 360 qui tourne en
/// boucle, ou une scene 3D.
///
/// 0 = Pano 1 = Video360 2 = Scene3D
class ImmersiveBackgroundKind {
const ImmersiveBackgroundKind._(this.value);
final int value;
@override
String toString() => value.toString();
int toJson() => value;
/// Une image equirectangulaire : le cas le plus courant et le moins couteux.
static const Pano = ImmersiveBackgroundKind._(0);
/// Une video equirectangulaire, jouee en boucle et sans son.
static const Video360 = ImmersiveBackgroundKind._(1);
/// Un decor 3D. Prevu par le contrat, pas encore rendu en fond par le casque.
static const Scene3D = ImmersiveBackgroundKind._(2);
static const values = <ImmersiveBackgroundKind>[Pano, Video360, Scene3D];
static ImmersiveBackgroundKind? fromJson(dynamic value) =>
ImmersiveBackgroundKindTypeTransformer().decode(value);
static List<ImmersiveBackgroundKind> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ImmersiveBackgroundKind>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ImmersiveBackgroundKind.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
class ImmersiveBackgroundKindTypeTransformer {
factory ImmersiveBackgroundKindTypeTransformer() => _instance ??= const ImmersiveBackgroundKindTypeTransformer._();
const ImmersiveBackgroundKindTypeTransformer._();
int encode(ImmersiveBackgroundKind data) => data.value;
ImmersiveBackgroundKind? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
if (data.runtimeType == String) {
switch (data.toString()) {
case r'Pano': return ImmersiveBackgroundKind.Pano;
case r'Video360': return ImmersiveBackgroundKind.Video360;
case r'Scene3D': return ImmersiveBackgroundKind.Scene3D;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
} else if (data.runtimeType == int) {
switch (data) {
case 0: return ImmersiveBackgroundKind.Pano;
case 1: return ImmersiveBackgroundKind.Video360;
case 2: return ImmersiveBackgroundKind.Scene3D;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
}
return null;
}
static ImmersiveBackgroundKindTypeTransformer? _instance;
}