### startPhysics Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Starts the physics simulation. ```APIDOC ## startPhysics ### Description Starts the physics simulation. ### Method Not specified (likely a method call in an SDK) ### Response #### Success Response - **void** - Indicates the physics simulation was started. ### Request Example ```dart await augenController.startPhysics(); ``` ``` -------------------------------- ### Run Augen Example App Source: https://pub.dev/documentation/augen/latest/index.html Command to navigate to the example directory and run the main Flutter application, which showcases all features of the Augen AR plugin. ```bash cd example flutter run ``` -------------------------------- ### Run Web Marker AR Example Source: https://pub.dev/documentation/augen/latest/index.html Command to run the standalone web marker-based AR example using Flutter, specifying Chrome as the browser and enabling WASM support. ```bash cd example/web_marker_ar flutter run -d chrome --wasm ``` -------------------------------- ### Run Flutter Pub Get Source: https://pub.dev/documentation/augen/latest/index.html After adding the dependency, run this command to fetch the package. ```bash flutter pub get ``` -------------------------------- ### startBlendTree Method Source: https://pub.dev/documentation/augen/latest/augen/AugenController/startBlendTree.html Starts a blend tree on a specified node with optional initial parameters. ```APIDOC ## startBlendTree Method ### Description Starts a blend tree on a specified node. This method is asynchronous and returns a Future that completes when the blend tree has started. ### Method Signature `Future startBlendTree({required String nodeId, required AnimationBlendTree blendTree, Map? initialParameters})` ### Parameters #### Path Parameters - **nodeId** (String) - Required - The unique identifier of the node on which to start the blend tree. - **blendTree** (AnimationBlendTree) - Required - The blend tree configuration to be started. - **initialParameters** (Map) - Optional - A map of initial parameters to set for the blend tree when it starts. ``` -------------------------------- ### Start Crossfade Transition Implementation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/startCrossfadeTransition.html Starts a crossfade transition for a given node ID and transition configuration. Handles platform exceptions and logs errors. ```dart Future startCrossfadeTransition({ required String nodeId, required CrossfadeTransition transition, }) async { if (_isDisposed) throw StateError('Controller is disposed'); try { await _backend.startCrossfadeTransition({ 'nodeId': nodeId, 'transition': transition.toMap(), }); } on PlatformException catch (e) { _errorController.add( 'Failed to start crossfade transition: ${e.message}', ); rethrow; } } ``` -------------------------------- ### startStateMachine Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Starts an animation state machine on a specified node with optional initial parameters. ```APIDOC ## startStateMachine nodeId stateMachine initialParameters ### Description Starts an animation state machine on a specified node with optional initial parameters. ### Method Not specified (likely a method call in an SDK) ### Parameters #### Path Parameters - **nodeId** (String) - Required - The ID of the node to attach the state machine to. - **stateMachine** (AnimationStateMachine) - Required - The animation state machine to start. - **initialParameters** (Map) - Optional - Initial parameters for the state machine. ### Response #### Success Response - **void** - Indicates the state machine was started. ### Request Example ```dart await augenController.startStateMachine(nodeId: 'myNode', stateMachine: myStateMachine, initialParameters: {'speed': 1.0}); ``` ``` -------------------------------- ### Start Physics Simulation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/startPhysics.html Initiates the physics simulation by invoking a platform method. Handles potential PlatformExceptions during the invocation. ```dart Future startPhysics() async { if (_isDisposed) throw StateError('Controller is disposed'); try { await _backend.invokeMethod('startPhysics'); } on PlatformException catch (e) { _errorController.add('Failed to start physics: ${e.message}'); rethrow; } } ``` -------------------------------- ### Get All Lights Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves a list of all light sources currently present in the scene. ```APIDOC ## GET All Lights ### Description Retrieves a list of all light sources currently present in the scene. ### Method GET ### Endpoint /lights ### Response #### Success Response (200) - **lights** (List) - A list of ARLight objects in the scene. #### Response Example { "lights": [ {"id": "light-1", "type": "directional", "color": {"r": 1.0, "g": 1.0, "b": 1.0}, "intensity": 1.0}, {"id": "light-2", "type": "point", "color": {"r": 1.0, "g": 0.9, "b": 0.8}, "intensity": 0.8} ] } ``` -------------------------------- ### startBlendTree Method Implementation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/startBlendTree.html Starts an AnimationBlendTree on a given node. Handles potential PlatformExceptions during the process. Ensure the controller is not disposed before calling. ```dart Future startBlendTree({ required String nodeId, required AnimationBlendTree blendTree, Map? initialParameters, }) async { if (_isDisposed) throw StateError('Controller is disposed'); try { await _backend.startBlendTree({ 'nodeId': nodeId, 'blendTree': blendTree.toMap(), if (initialParameters != null) 'initialParameters': initialParameters, }); } on PlatformException catch (e) { _errorController.add('Failed to start blend tree: ${e.message}'); rethrow; } } ``` -------------------------------- ### startStateMachine Method Source: https://pub.dev/documentation/augen/latest/augen/AugenController/startStateMachine.html Starts an animation state machine on a node. This is a method available for direct invocation by users of the Augen controller. ```APIDOC ## startStateMachine Method ### Description Starts an animation state machine on a specified node. This method allows for the initiation of animations defined by an `AnimationStateMachine` and can accept initial parameters to configure the state machine's starting conditions. ### Method Signature `Future startStateMachine({required String nodeId, required AnimationStateMachine stateMachine, Map? initialParameters})` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **nodeId** (String) - Required - The unique identifier of the node on which to start the state machine. - **stateMachine** (AnimationStateMachine) - Required - The animation state machine to be started. - **initialParameters** (Map) - Optional - A map of initial parameters to configure the state machine. ### Request Example ```dart // Example usage: await augenController.startStateMachine( nodeId: 'myNodeId', stateMachine: myAnimationStateMachine, initialParameters: {'speed': 1.0, 'loop': true} ); ``` ### Response #### Success Response (void) This method returns a `Future` indicating completion. #### Response Example N/A (returns void) ``` -------------------------------- ### AugenPlatform.instance (getter) Source: https://pub.dev/documentation/augen/latest/augen_platform_interface/AugenPlatform/instance.html Provides access to the default instance of the AugenPlatform. This is the primary way to get the singleton instance to interact with the platform. It defaults to MethodChannelAugen. ```APIDOC ## AugenPlatform.instance (getter) ### Description Provides access to the default instance of the AugenPlatform. This is the primary way to get the singleton instance to interact with the platform. It defaults to MethodChannelAugen. ### Implementation ```dart static AugenPlatform get instance => _instance; ``` ``` -------------------------------- ### Get Physics World Configuration Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves the current configuration settings for the physics simulation world. ```APIDOC ## GET Physics World Configuration ### Description Retrieves the current configuration settings for the physics simulation world. ### Method GET ### Endpoint /physics/worldConfig ### Response #### Success Response (200) - **config** (PhysicsWorldConfig) - The current physics world configuration. #### Response Example { "config": { "gravity": {"x": 0.0, "y": -9.8, "z": 0.0}, "defaultFriction": 0.5 } } ``` -------------------------------- ### startCrossfadeTransition Method Source: https://pub.dev/documentation/augen/latest/augen/AugenController/startCrossfadeTransition.html Starts a crossfade transition between two animations for a specified node. ```APIDOC ## startCrossfadeTransition ### Description Starts a crossfade transition between two animations for a specified node. ### Method Signature `Future startCrossfadeTransition({required String nodeId, required CrossfadeTransition transition})` ### Parameters #### Path Parameters - **nodeId** (String) - Required - The ID of the node for which to start the transition. - **transition** (CrossfadeTransition) - Required - The crossfade transition object to apply. ### Implementation Notes This method is asynchronous and returns a `Future`. It handles potential `PlatformException` errors during the backend call. ``` -------------------------------- ### Get Lighting Configuration Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves the current configuration for lighting in the scene. This includes global settings affecting all lights. ```APIDOC ## GET Lighting Configuration ### Description Retrieves the current configuration for lighting in the scene. This includes global settings affecting all lights. ### Method GET ### Endpoint /lightingConfig ### Response #### Success Response (200) - **config** (ARLightingConfig) - The current lighting configuration. #### Response Example { "config": { "globalAmbientLight": {"r": 0.2, "g": 0.2, "b": 0.2}, "shadowQuality": "medium" } } ``` -------------------------------- ### Get lightingStatusStream Implementation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/lightingStatusStream.html This snippet shows how the lightingStatusStream property is implemented by returning the stream from a private controller. ```dart Stream get lightingStatusStream => _lightingStatusController.stream; ``` -------------------------------- ### Get Lighting Capabilities Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves the capabilities of the lighting system, indicating support for features like shadows and different light types. ```APIDOC ## GET Lighting Capabilities ### Description Retrieves the capabilities of the lighting system, indicating support for features like shadows and different light types. ### Method GET ### Endpoint /lightingCapabilities ### Response #### Success Response (200) - **capabilities** (Map) - A map detailing the supported lighting features. #### Response Example { "capabilities": { "supportsShadows": true, "supportedLightTypes": ["directional", "point", "spot"] } } ``` -------------------------------- ### Get errorStream Implementation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/errorStream.html This snippet shows how to get the errorStream from the _errorController. Use this to listen for errors emitted by the controller. ```dart Stream get errorStream => _errorController.stream; ``` -------------------------------- ### MultiUserParticipant Constructors Source: https://pub.dev/documentation/augen/latest/augen/MultiUserParticipant-class.html Information on how to create instances of the MultiUserParticipant class. ```APIDOC ## Constructors ### MultiUserParticipant Creates a new MultiUserParticipant instance. **Parameters** - **id** (String) - Required - Unique identifier for the participant. - **displayName** (String) - Required - The display name of the participant. - **role** (MultiUserRole) - Required - The role of the participant in the session. - **position** (Vector3) - Required - The current position of the participant. - **rotation** (Quaternion) - Required - The current rotation of the participant. - **isActive** (bool) - Required - Indicates if the participant is currently active. - **isHost** (bool) - Required - Indicates if the participant is the host of the session. - **joinedAt** (DateTime) - Required - The timestamp when the participant joined. - **lastSeen** (DateTime) - Required - The timestamp of the participant's last activity. - **metadata** (Map) - Optional - Additional metadata for the participant. Defaults to an empty map. ### MultiUserParticipant.fromMap Creates a MultiUserParticipant instance from a map. **Parameters** - **map** (Map) - Required - A map containing the participant's data. ``` -------------------------------- ### Initialize Physics World Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Initializes the physics simulation world with the specified configuration. ```APIDOC ## POST Initialize Physics World ### Description Initializes the physics simulation world with the specified configuration. ### Method POST ### Endpoint /physics/initialize ### Parameters #### Request Body - **config** (PhysicsWorldConfig) - Required - The configuration for the physics world. ### Request Example { "config": { "gravity": {"x": 0.0, "y": -9.8, "z": 0.0}, "defaultFriction": 0.5 } } ### Response #### Success Response (200) - **message** (string) - Indicates successful initialization. #### Response Example { "message": "Physics world initialized successfully." } ``` -------------------------------- ### Get All Occlusions Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves a list of all active occlusion objects in the scene. ```APIDOC ## GET All Occlusions ### Description Retrieves a list of all active occlusion objects in the scene. ### Method GET ### Endpoint /occlusions ### Response #### Success Response (200) - **occlusions** (List) - A list of AROcclusion objects. #### Response Example { "occlusions": [ {"id": "occlusion-1", "type": "plane"}, {"id": "occlusion-2", "type": "mesh"} ] } ``` -------------------------------- ### AugenPlatform() Source: https://pub.dev/documentation/augen/latest/augen_platform_interface/AugenPlatform/AugenPlatform.html Constructs a new AugenPlatform instance. This is the primary way to initialize the platform interface. ```APIDOC ## AugenPlatform() ### Description Constructs a AugenPlatform. ### Implementation ```dart AugenPlatform() : super(token: _token); ``` ``` -------------------------------- ### Get Multi-User Session Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves information about the current multi-user AR session. ```APIDOC ## GET Multi-User Session ### Description Retrieves information about the current multi-user AR session. ### Method GET ### Endpoint /multiUser/session ### Response #### Success Response (200) - **session** (ARMultiUserSession) - The current ARMultiUserSession object. #### Response Example { "session": { "sessionId": "session-abc", "isHost": true, "participantCount": 2 } } ``` -------------------------------- ### Get multiUserSessionStream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/multiUserSessionStream.html This snippet shows how to access the stream of ARMultiUserSession objects from the _multiUserSessionController. ```dart Stream get multiUserSessionStream => _multiUserSessionController.stream; ``` -------------------------------- ### isTracked Property Source: https://pub.dev/documentation/augen/latest/augen/ARTrackedImage/isTracked.html Gets a value indicating whether the image is currently being tracked. ```APIDOC ## isTracked Property ### Description Gets a value indicating whether the image is currently being tracked. ### Type bool ### Returns `true` if the image is currently tracked, `false` otherwise. ``` -------------------------------- ### StateMachineStatus Constructors Source: https://pub.dev/documentation/augen/latest/augen/StateMachineStatus-class.html Provides information on how to instantiate the StateMachineStatus class. ```APIDOC ## Constructors ### StateMachineStatus Creates a new StateMachineStatus instance. #### Parameters - **stateMachineId** (String) - Required - The unique identifier for the state machine. - **currentStateId** (String) - Required - The identifier of the current state. - **previousStateId** (String?) - Optional - The identifier of the previous state. - **timeInState** (double) - Required - The duration in seconds spent in the current state. - **currentTransition** (TransitionStatus?) - Optional - The current transition object, if any. - **parameters** (Map) - Optional - A map of parameters associated with the current state, defaults to an empty map. - **isActive** (bool) - Required - Indicates if the state machine is currently active. - **isPaused** (bool) - Optional - Indicates if the state machine is paused, defaults to false. ### StateMachineStatus.fromMap Creates a StateMachineStatus instance from a map. #### Parameters - **map** (Map) - Required - The map containing the state machine status data. ``` -------------------------------- ### TransitionStatus Constructors Source: https://pub.dev/documentation/augen/latest/augen/TransitionStatus-class.html Provides information on how to create instances of the TransitionStatus class. ```APIDOC ## Constructors ### TransitionStatus ```dart TransitionStatus({required String transitionId, required TransitionState state, String? fromAnimationId, required String toAnimationId, required double progress, required double elapsedTime, required double totalDuration, required double sourceWeight, required double targetWeight}) ``` ### TransitionStatus.fromMap ```dart const TransitionStatus.fromMap(Map map) ``` ``` -------------------------------- ### Get Tracked Markers Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves a list of all markers currently being tracked by the AR system. ```APIDOC ## GET Tracked Markers ### Description Retrieves a list of all markers currently being tracked by the AR system. ### Method GET ### Endpoint /trackedMarkers ### Response #### Success Response (200) - **markers** (List) - A list of ARTrackedMarker objects representing tracked markers. #### Response Example { "markers": [ {"id": "marker-1", "trackingState": "tracked"}, {"id": "marker-2", "trackingState": "lost"} ] } ``` -------------------------------- ### Get Tracked Images Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves a list of all images currently being tracked by the AR system. ```APIDOC ## GET Tracked Images ### Description Retrieves a list of all images currently being tracked by the AR system. ### Method GET ### Endpoint /trackedImages ### Response #### Success Response (200) - **images** (List) - A list of ARTrackedImage objects representing tracked images. #### Response Example { "images": [ {"name": "image1", "trackingState": "tracked"}, {"name": "image2", "trackingState": "notTracked"} ] } ``` -------------------------------- ### Run Web Marker AR Demo Source: https://pub.dev/documentation/augen/latest/index.html Command to run the standalone web marker AR demo from the example directory. Ensure you are in the correct directory and use the specified Flutter command for Wasm execution. ```bash cd example/web_marker_ar flutter run -d chrome --wasm ``` -------------------------------- ### Get Tracked Faces Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves a list of all faces currently being tracked by the AR system. ```APIDOC ## GET Tracked Faces ### Description Retrieves a list of all faces currently being tracked by the AR system. ### Method GET ### Endpoint /trackedFaces ### Response #### Success Response (200) - **faces** (List) - A list of ARFace objects representing tracked faces. #### Response Example { "faces": [ {"id": "face-1", "trackingState": "tracked"}, {"id": "face-2", "trackingState": "limited"} ] } ``` -------------------------------- ### ARLightingConfig Constructors Source: https://pub.dev/documentation/augen/latest/augen/ARLightingConfig-class.html Provides documentation for the two constructors of the ARLightingConfig class: the default constructor and a factory constructor to create an instance from a map. ```APIDOC ## Constructors ### ARLightingConfig Creates a new ARLightingConfig instance with specified lighting parameters. - **enableGlobalIllumination** (bool) - Optional - Defaults to true. - **enableShadows** (bool) - Optional - Defaults to true. - **globalShadowQuality** (ShadowQuality) - Optional - Defaults to ShadowQuality.medium. - **globalShadowFilterMode** (ShadowFilterMode) - Optional - Defaults to ShadowFilterMode.soft. - **ambientIntensity** (double) - Optional - Defaults to 0.3. - **ambientColor** (Vector3) - Optional - Defaults to const Vector3(1.0, 1.0, 1.0). - **shadowDistance** (double) - Optional - Defaults to 50.0. - **maxShadowCasters** (int) - Optional - Defaults to 4. - **enableCascadedShadows** (bool) - Optional - Defaults to true. - **shadowCascadeCount** (int) - Optional - Defaults to 4. - **shadowCascadeDistances** (List) - Optional - Defaults to [10.0, 25.0, 50.0, 100.0]. - **enableContactShadows** (bool) - Optional - Defaults to false. - **contactShadowDistance** (double) - Optional - Defaults to 5.0. - **enableScreenSpaceShadows** (bool) - Optional - Defaults to false. - **enableRayTracedShadows** (bool) - Optional - Defaults to false. - **metadata** (Map) - Optional - Defaults to an empty map. ### ARLightingConfig.fromMap Creates an ARLightingConfig instance from a map. - **map** (Map) - The map to create the instance from. ``` -------------------------------- ### Initialize AR View and Session Source: https://pub.dev/documentation/augen/latest/index.html Set up the AugenView widget and initialize the AR session with plane detection and light estimation enabled. Listen for plane detection events. ```dart import 'package:flutter/material.dart'; import 'package:augen/augen.dart'; class ARScreen extends StatefulWidget { @override State createState() => _ARScreenState(); } class _ARScreenState extends State { AugenController? _controller; @override Widget build(BuildContext context) { return Scaffold( body: AugenView( onViewCreated: (controller) { _controller = controller; _initAR(); }, config: ARSessionConfig( planeDetection: true, lightEstimation: true, ), ), ); } Future _initAR() async { final supported = await _controller!.isARSupported(); if (!supported) return; await _controller!.initialize( ARSessionConfig(planeDetection: true, lightEstimation: true), ); // React to detected planes _controller!.planesStream.listen((planes) { debugPrint('Detected ${planes.length} planes'); }); } @override void dispose() { _controller?.dispose(); super.dispose(); } } ``` -------------------------------- ### Get Physics Bodies Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves a list of all physics bodies currently simulated in the scene. ```APIDOC ## GET Physics Bodies ### Description Retrieves a list of all physics bodies currently simulated in the scene. ### Method GET ### Endpoint /physics/bodies ### Response #### Success Response (200) - **bodies** (List) - A list of ARPhysicsBody objects. #### Response Example { "bodies": [ {"id": "body-1", "type": "dynamic", "mass": 1.0}, {"id": "body-2", "type": "static"} ] } ``` -------------------------------- ### Get Multi-User Participants Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves a list of all participants currently in the multi-user AR session. ```APIDOC ## GET Multi-User Participants ### Description Retrieves a list of all participants currently in the multi-user AR session. ### Method GET ### Endpoint /multiUser/participants ### Response #### Success Response (200) - **participants** (List) - A list of MultiUserParticipant objects. #### Response Example { "participants": [ {"id": "user-1", "displayName": "Alice"}, {"id": "user-2", "displayName": "Bob"} ] } ``` -------------------------------- ### Get Occlusions Stream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/occlusionsStream.html This snippet shows how to access the stream of AR occlusions from the controller. ```dart Stream> get occlusionsStream => _occlusionsController.stream; ``` -------------------------------- ### MultiUserSharedObject Constructors Source: https://pub.dev/documentation/augen/latest/augen/MultiUserSharedObject-class.html Provides documentation for the constructors of the MultiUserSharedObject class. ```APIDOC ## Constructors ### MultiUserSharedObject ```dart MultiUserSharedObject({ required String id, required String nodeId, required String ownerId, required Vector3 position, required Quaternion rotation, required Vector3 scale, required bool isLocked, required bool isVisible, required DateTime createdAt, required DateTime lastModified, Map metadata = const {}, }) ``` ### MultiUserSharedObject.fromMap ```dart const MultiUserSharedObject.fromMap(Map map) ``` ``` -------------------------------- ### Get multiUserSharedObjectsStream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/multiUserSharedObjectsStream.html This getter returns a stream of lists of MultiUserSharedObject, sourced from the internal _multiUserSharedObjectsController. ```dart Stream> get multiUserSharedObjectsStream => _multiUserSharedObjectsController.stream; ``` -------------------------------- ### Get MultiUserSessionStatus Stream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/multiUserSessionStatusStream.html This snippet shows how to access the stream of MultiUserSessionStatus objects from the _multiUserSessionStatusController. ```dart Stream get multiUserSessionStatusStream => _multiUserSessionStatusController.stream; ``` -------------------------------- ### Quaternion Constructors Source: https://pub.dev/documentation/augen/latest/augen/Quaternion-class.html Provides documentation for the different ways to create a Quaternion object. ```APIDOC ## Quaternion(double x, double y, double z, double w) ### Description Creates a new Quaternion object with the specified components. ### Parameters - **x** (double) - The x component of the quaternion. - **y** (double) - The y component of the quaternion. - **z** (double) - The z component of the quaternion. - **w** (double) - The w component of the quaternion. ## Quaternion.fromMap(Map map) ### Description Creates a Quaternion object from a Map. ### Parameters - **map** (Map) - A map containing the quaternion components. ## Quaternion.identity() ### Description Creates an identity Quaternion, representing no rotation. ``` -------------------------------- ### OcclusionStatus Constructors Source: https://pub.dev/documentation/augen/latest/augen/OcclusionStatus-class.html Provides information on how to instantiate the OcclusionStatus class. ```APIDOC ## Constructors ### `OcclusionStatus({required String occlusionId, required String status, required double progress, String? errorMessage, required DateTime timestamp})` Creates a new OcclusionStatus object with the provided details. ### `OcclusionStatus.fromMap(Map map)` Creates an OcclusionStatus object from a map representation. ``` -------------------------------- ### Get markerTargetsStream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/markerTargetsStream.html This snippet shows how to access the markerTargetsStream, which emits lists of ARMarkerTarget objects. ```dart Stream> get markerTargetsStream => _markerTargetsController.stream; ``` -------------------------------- ### AREnvironmentalProbeConfig Constructors Source: https://pub.dev/documentation/augen/latest/augen/AREnvironmentalProbeConfig-class.html Provides documentation for the constructors of the AREnvironmentalProbeConfig class. ```APIDOC ## Constructors ### AREnvironmentalProbeConfig ```dart AREnvironmentalProbeConfig({ required bool enableProbes, required ARProbeQuality defaultQuality, required ARProbeUpdateMode defaultUpdateMode, required int defaultTextureResolution, required int maxActiveProbes, required double defaultInfluenceRadius, required bool defaultRealTime, required double defaultUpdateFrequency, required bool autoCreateProbes, required bool optimizePlacement, Map metadata = const {}, }) ``` ### AREnvironmentalProbeConfig.fromMap ```dart AREnvironmentalProbeConfig.fromMap(Map map) ``` Create from map for deserialization ``` -------------------------------- ### Get anchorsStream Implementation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/anchorsStream.html This snippet shows how to access the stream of AR anchors from the _anchorsController. ```dart Stream> get anchorsStream => _anchorsController.stream; ``` -------------------------------- ### instance Source: https://pub.dev/documentation/augen/latest/augen_platform_interface/AugenPlatform-class.html Provides access to the default instance of AugenPlatform. ```APIDOC ## instance ### Description Provides access to the default static instance of the AugenPlatform. This allows for easy access to platform functionalities without explicit instantiation. ### Property `static AugenPlatform get instance` ### Returns `AugenPlatform` - The default instance of AugenPlatform. ``` -------------------------------- ### Get isReliable Property Source: https://pub.dev/documentation/augen/latest/augen/ARFace/isReliable.html Returns true if the tracking confidence is high (e.g., > 0.7). ```dart bool get isReliable => confidence > 0.7; ``` -------------------------------- ### ARLight Constructors Source: https://pub.dev/documentation/augen/latest/augen/ARLight-class.html Provides documentation for the two constructors of the ARLight class: the default constructor and the fromMap constructor. ```APIDOC ## Constructors ### ARLight ```dart ARLight({ required String id, required ARLightType type, required Vector3 position, required Quaternion rotation, required Vector3 direction, required double intensity, LightIntensityUnit intensityUnit = LightIntensityUnit.lux, Vector3 color = const Vector3(1.0, 1.0, 1.0), double range = 10.0, double innerConeAngle = 0.0, double outerConeAngle = 45.0, bool isEnabled = true, bool castShadows = true, ShadowQuality shadowQuality = ShadowQuality.medium, ShadowFilterMode shadowFilterMode = ShadowFilterMode.soft, double shadowBias = 0.005, double shadowNormalBias = 0.0, double shadowNearPlane = 0.1, double shadowFarPlane = 100.0, required DateTime createdAt, required DateTime lastModified, Map metadata = const {}, }) ``` ### ARLight.fromMap ```dart ARLight.fromMap(Map map) ``` Create from map ``` -------------------------------- ### ImageTargetSize Constructors Source: https://pub.dev/documentation/augen/latest/augen/ImageTargetSize-class.html Provides documentation for the constructors of the ImageTargetSize class. ```APIDOC ## Constructors ### ImageTargetSize(double width, double height) Creates a new ImageTargetSize object with the specified width and height. ### ImageTargetSize.fromMap(Map map) Creates an ImageTargetSize object from a Map. ``` -------------------------------- ### crossfadeToAnimation Method Implementation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/crossfadeToAnimation.html Provides the implementation of the crossfadeToAnimation method, creating and starting a CrossfadeTransition. ```dart Future crossfadeToAnimation({ required String nodeId, required String fromAnimationId, required String toAnimationId, double duration = 0.3, TransitionCurve curve = TransitionCurve.linear, }) async { final transition = CrossfadeTransition( id: 'crossfade_${DateTime.now().millisecondsSinceEpoch}', fromAnimationId: fromAnimationId, toAnimationId: toAnimationId, duration: duration, curve: curve, ); await startCrossfadeTransition(nodeId: nodeId, transition: transition); } ``` -------------------------------- ### PhysicsWorldConfig Constructor Source: https://pub.dev/documentation/augen/latest/augen/PhysicsWorldConfig/PhysicsWorldConfig.html Initializes a new instance of the PhysicsWorldConfig class with specified physics world properties. ```APIDOC ## PhysicsWorldConfig Constructor ### Description Initializes a new instance of the PhysicsWorldConfig class with specified physics world properties. ### Parameters - **gravity** (Vector3) - Optional - The gravitational acceleration vector. Defaults to (0, -9.81, 0). - **timeStep** (double) - Optional - The time step for physics simulation. Defaults to 1/60.0. - **maxSubSteps** (int) - Optional - The maximum number of simulation substeps. Defaults to 10. - **enableSleeping** (bool) - Optional - Enables or disables object sleeping. Defaults to true. - **enableContinuousCollision** (bool) - Optional - Enables or disables continuous collision detection. Defaults to true. - **contactBreakingThreshold** (double) - Optional - The threshold for contact breaking. Defaults to 0.0. - **contactERP** (double) - Optional - The error reduction parameter for contacts. Defaults to 0.2. - **contactCFM** (double) - Optional - The constraint force mixing for contacts. Defaults to 0.0. ``` -------------------------------- ### AugenController Constructor Implementation Source: https://pub.dev/documentation/augen/latest/augen/AugenController/AugenController.html This is the implementation of the AugenController constructor. It initializes the backend with the provided viewId and sets up the platform callback. ```dart AugenController(this.viewId) : _backend = createPlatformBackend(viewId) { _backend.onPlatformCallback = _handlePlatformCallback; } ``` -------------------------------- ### TransitionStatus Methods Source: https://pub.dev/documentation/augen/latest/augen/TransitionStatus-class.html Lists the methods available on the TransitionStatus class. ```APIDOC ## Methods - **noSuchMethod**(Invocation invocation) → dynamic - Invoked when a nonexistent method or property is accessed. - **toMap**() → Map - **toString**() → String - A string representation of this object. ``` -------------------------------- ### Get stateMachineStatusStream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/stateMachineStatusStream.html This snippet shows how to access the stream of state machine status updates from the _stateMachineStatusController. ```dart Stream get stateMachineStatusStream => _stateMachineStatusController.stream; ``` -------------------------------- ### ARLight Constructor Implementation Source: https://pub.dev/documentation/augen/latest/augen/ARLight/ARLight.html This is the implementation of the ARLight constructor. It initializes all required and optional parameters for creating an AR light source. ```dart const ARLight({ required this.id, required this.type, required this.position, required this.rotation, required this.direction, required this.intensity, this.intensityUnit = LightIntensityUnit.lux, this.color = const Vector3(1.0, 1.0, 1.0), this.range = 10.0, this.innerConeAngle = 0.0, this.outerConeAngle = 45.0, this.isEnabled = true, this.castShadows = true, this.shadowQuality = ShadowQuality.medium, this.shadowFilterMode = ShadowFilterMode.soft, this.shadowBias = 0.005, this.shadowNormalBias = 0.0, this.shadowNearPlane = 0.1, this.shadowFarPlane = 100.0, required this.createdAt, required this.lastModified, this.metadata = const {}, }); ``` -------------------------------- ### Get probeConfigStream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/probeConfigStream.html Returns a stream of environmental probe configuration updates. This is the implementation of the probeConfigStream getter. ```dart Stream get probeConfigStream => _probeConfigController.stream; ``` -------------------------------- ### Run Augen Integration Tests Source: https://pub.dev/documentation/augen/latest/index.html Command to execute integration tests for the Augen plugin. These tests require a connected device or simulator and are typically run from the example app's directory. ```bash # Integration tests (requires a device or simulator) cd example flutter test integration_test/plugin_integration_test.dart ``` -------------------------------- ### Get multiUserParticipantsStream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/multiUserParticipantsStream.html Accesses the stream of multi-user participants. This stream emits lists of MultiUserParticipant objects. ```dart Stream> get multiUserParticipantsStream => _multiUserParticipantsController.stream; ``` -------------------------------- ### Get Host Participant Source: https://pub.dev/documentation/augen/latest/augen/ARMultiUserSession/host.html Retrieves the host participant from the session. Returns null if the host is not found. ```dart MultiUserParticipant? get host { try { return participants.firstWhere((p) => p.id == hostId); } catch (e) { return null; } } ``` -------------------------------- ### ARLightingConfig.fromMap Source: https://pub.dev/documentation/augen/latest/augen/ARLightingConfig/ARLightingConfig.fromMap.html Creates an ARLightingConfig object from a map. This factory constructor parses a map containing lighting configuration parameters and returns a fully initialized ARLightingConfig instance. ```APIDOC ## ARLightingConfig.fromMap ### Description Creates an ARLightingConfig object from a map. This factory constructor parses a map containing lighting configuration parameters and returns a fully initialized ARLightingConfig instance. ### Method factory ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **map** (Map) - Required - A map containing the lighting configuration parameters. - **enableGlobalIllumination** (bool) - Required - Enables or disables global illumination. - **enableShadows** (bool) - Required - Enables or disables shadows. - **globalShadowQuality** (ShadowQuality) - Required - The quality setting for global shadows. - **globalShadowFilterMode** (ShadowFilterMode) - Required - The filter mode for global shadows. - **ambientIntensity** (double) - Required - The intensity of the ambient light. - **ambientColor** (Vector3) - Required - The color of the ambient light. - **shadowDistance** (double) - Required - The maximum distance for shadows to be rendered. - **maxShadowCasters** (int) - Required - The maximum number of shadow casters. - **enableCascadedShadows** (bool) - Required - Enables or disables cascaded shadow maps. - **shadowCascadeCount** (int) - Required - The number of cascades for cascaded shadow maps. - **shadowCascadeDistances** (List) - Required - The distances for each shadow cascade. - **enableContactShadows** (bool) - Required - Enables or disables contact shadows. - **contactShadowDistance** (double) - Required - The distance for contact shadows. - **enableScreenSpaceShadows** (bool) - Required - Enables or disables screen-space shadows. - **enableRayTracedShadows** (bool) - Required - Enables or disables ray-traced shadows. - **metadata** (Map) - Required - Additional metadata for the lighting configuration. ### Request Example ```dart { "enableGlobalIllumination": true, "enableShadows": true, "globalShadowQuality": "medium", "globalShadowFilterMode": "soft", "ambientIntensity": 1.0, "ambientColor": { "x": 1.0, "y": 1.0, "z": 1.0 }, "shadowDistance": 100.0, "maxShadowCasters": 4, "enableCascadedShadows": true, "shadowCascadeCount": 4, "shadowCascadeDistances": [0.0, 10.0, 30.0, 100.0], "enableContactShadows": false, "contactShadowDistance": 1.0, "enableScreenSpaceShadows": false, "enableRayTracedShadows": false, "metadata": { "version": "1.0" } } ``` ### Response #### Success Response (200) - **ARLightingConfig** - An instance of the ARLightingConfig class populated with the provided map data. #### Response Example ```dart // Example of a returned ARLightingConfig object (structure depends on implementation) ARLightingConfig(...) ``` ``` -------------------------------- ### Initialize AugenView for Marker Tracking Source: https://pub.dev/documentation/augen/latest/index.html Configure and initialize AugenView for marker tracking using a PNG/JPG image as the marker template. This snippet demonstrates setting up the AR session, adding a marker target, enabling tracking, and listening for tracked marker events. ```dart AugenView( config: const ARSessionConfig( markerTracking: true, planeDetection: false, ), onViewCreated: (controller) async { await controller.initialize( const ARSessionConfig( markerTracking: true, markerDetectionOptions: ARMarkerDetectionOptions( maxDetectionFps: 20, debug: true, ), ), ); // Use a PNG/JPG image as the marker template. await controller.addMarkerTarget( const ARMarkerTarget( id: 'hiro', name: 'Hiro marker', type: ARMarkerType.pattern, imagePath: 'assets/markers/Hiro_marker.png', physicalWidth: 0.08, // 8 cm ), ); await controller.setMarkerTrackingEnabled(true); controller.trackedMarkersStream.listen((markers) { for (final marker in markers) { if (marker.isTracked && marker.isReliable) { // Anchor content to the marker } } }); }, ); ``` -------------------------------- ### Get ARFace Dimensions Source: https://pub.dev/documentation/augen/latest/augen/ARFace/dimensions.html Retrieves the bounding box dimensions of the face. This is equivalent to the scale property. ```dart Vector3 get dimensions => scale; ``` -------------------------------- ### StateMachineStatus Constructor Source: https://pub.dev/documentation/augen/latest/augen/StateMachineStatus/StateMachineStatus.html The constructor for the StateMachineStatus class initializes a new instance with required and optional parameters. ```APIDOC ## StateMachineStatus Constructor ### Description Initializes a new StateMachineStatus object. ### Parameters #### Constructor Parameters - **stateMachineId** (String) - Required - The unique identifier for the state machine. - **currentStateId** (String) - Required - The identifier of the current state. - **previousStateId** (String?) - Optional - The identifier of the previous state. - **timeInState** (double) - Required - The duration spent in the current state. - **currentTransition** (TransitionStatus?) - Optional - The current transition status. - **parameters** (Map) - Optional - A map of additional parameters, defaults to an empty map. - **isActive** (bool) - Required - Indicates if the state machine is currently active. - **isPaused** (bool) - Optional - Indicates if the state machine is paused, defaults to false. ``` -------------------------------- ### iOS Info.plist Configuration Source: https://pub.dev/documentation/augen/latest/index.html Add camera usage description and specify ARKit capability in your iOS Info.plist file. ```xml NSCameraUsageDescription This app requires camera access for AR features UIRequiredDeviceCapabilities arkit ``` -------------------------------- ### Get animationStatusStream Source: https://pub.dev/documentation/augen/latest/augen/AugenController/animationStatusStream.html Returns the stream of animation status updates. This is implemented by exposing the stream from an AnimationStatus controller. ```dart Stream get animationStatusStream => _animationStatusController.stream; ``` -------------------------------- ### Get isTracked Property Source: https://pub.dev/documentation/augen/latest/augen/ARTrackedImage/isTracked.html Returns true if the image is currently being tracked. This is determined by comparing the `trackingState` to `ImageTrackingState.tracked`. ```dart bool get isTracked => trackingState == ImageTrackingState.tracked; ``` -------------------------------- ### Initialize Physics World Source: https://pub.dev/documentation/augen/latest/augen/AugenController/initializePhysics.html Initializes the physics world using the provided configuration. Handles potential platform exceptions during the invocation. ```dart Future initializePhysics(PhysicsWorldConfig config) async { if (_isDisposed) throw StateError('Controller is disposed'); try { await _backend.invokeMethod('initializePhysics', config.toMap()); } on PlatformException catch (e) { _errorController.add('Failed to initialize physics: ${e.message}'); rethrow; } } ``` -------------------------------- ### Get AugenPlatform Instance Source: https://pub.dev/documentation/augen/latest/augen_platform_interface/AugenPlatform/instance.html Access the default instance of AugenPlatform. This is typically used to interact with the platform's features. ```dart static AugenPlatform get instance => _instance; ``` -------------------------------- ### PhysicsMaterial Constructors Source: https://pub.dev/documentation/augen/latest/augen/PhysicsMaterial-class.html Provides documentation for the constructors of the PhysicsMaterial class, including the default constructor and a factory constructor for creating instances from a map. ```APIDOC ## Constructors ### PhysicsMaterial Creates a new PhysicsMaterial instance with specified physical properties. #### Parameters * **density** (double) - Optional - The density of the material. Defaults to 1.0. * **friction** (double) - Optional - The friction coefficient of the material. Defaults to 0.5. * **restitution** (double) - Optional - The restitution (bounciness) of the material. Defaults to 0.0. * **linearDamping** (double) - Optional - The linear damping factor. Defaults to 0.0. * **angularDamping** (double) - Optional - The angular damping factor. Defaults to 0.0. ### PhysicsMaterial.fromMap A factory constructor that creates a PhysicsMaterial instance from a map of key-value pairs. #### Parameters * **map** (Map) - A map containing the properties of the physics material. ``` -------------------------------- ### Get Occlusion Capabilities Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves the capabilities of the occlusion system, indicating support for different types of occlusion and features. ```APIDOC ## GET Occlusion Capabilities ### Description Retrieves the capabilities of the occlusion system, indicating support for different types of occlusion and features. ### Method GET ### Endpoint /occlusionCapabilities ### Response #### Success Response (200) - **capabilities** (Map) - A map detailing the supported occlusion features. #### Response Example { "capabilities": { "supportedOcclusionTypes": ["plane", "mesh"], "maxOcclusions": 5 } } ``` -------------------------------- ### resumePhysics Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Resumes the physics simulation. ```APIDOC ## resumePhysics ### Description Resume physics simulation. ``` -------------------------------- ### ARSessionConfig Constructors Source: https://pub.dev/documentation/augen/latest/augen/ARSessionConfig-class.html Provides information on how to create instances of the ARSessionConfig class. ```APIDOC ## Constructors ### ARSessionConfig Creates a new ARSessionConfig with specified settings. **Parameters** * **planeDetection** (bool) - Optional - Defaults to `true`. Enables plane detection. * **lightEstimation** (bool) - Optional - Defaults to `true`. Enables light estimation. * **depthData** (bool) - Optional - Defaults to `false`. Enables depth data collection. * **autoFocus** (bool) - Optional - Defaults to `true`. Enables auto-focus. * **markerTracking** (bool) - Optional - Defaults to `false`. Enables marker tracking. * **markerDetectionOptions** (ARMarkerDetectionOptions?) - Optional - Configuration options for marker detection. ### ARSessionConfig.fromMap Creates an ARSessionConfig from a Map. **Parameters** * **map** (Map) - The map to create the configuration from. ``` -------------------------------- ### Get Environmental Probes Capabilities Source: https://pub.dev/documentation/augen/latest/augen/AugenController-class.html Retrieves the capabilities of the environmental probe system. This indicates what features and settings are supported. ```APIDOC ## GET Environmental Probes Capabilities ### Description Retrieves the capabilities of the environmental probe system. This indicates what features and settings are supported. ### Method GET ### Endpoint /environmentalProbesCapabilities ### Response #### Success Response (200) - **capabilities** (Map) - A map detailing the supported capabilities. #### Response Example { "capabilities": { "supportedProbeTypes": ["reflection", "lighting"], "maxProbes": 10 } } ``` -------------------------------- ### AnimationStateMachine Constructors Source: https://pub.dev/documentation/augen/latest/augen/AnimationStateMachine-class.html Provides documentation for the constructors of the AnimationStateMachine class. ```APIDOC ## Constructors ### AnimationStateMachine ```dart AnimationStateMachine({required String id, required String name, required List states, Map parameters = const {}, List anyStateTransitions = const [], String? entryStateId, bool autoStart = true, int layer = 0}) ``` ### AnimationStateMachine.fromMap ```dart const AnimationStateMachine.fromMap(Map map) ``` ```