FlutterWebXrWeb class
A web implementation of the FlutterWebXrPlatform of the FlutterWebXr plugin.
- Inheritance
-
- Object
- PlatformInterface
- FlutterWebXrPlatform
- FlutterWebXrWeb
Constructors
- FlutterWebXrWeb()
-
Constructor for
FlutterWebXrWeb
. Initializes XRController and other members.
Properties
- cameraController → CameraController
-
final
- canvas → CanvasElement
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- loaderController → LoaderController
-
final
- rendererController ↔ RendererController
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sceneController → SceneController
-
final
- xrController ↔ XRController
-
getter/setter pair
Methods
-
checkRequirements(
) → bool - Helper function to check browser compatibility and device requirements.
-
createCone(
{required double radius, required double height, List< MeshBasicMaterial> ? materials}) → Mesh -
Creates and returns a cone mesh.
override
-
createCube(
{required double sideLength, List< MeshBasicMaterial> ? materials}) → Mesh -
Creates and returns a cube mesh.
override
-
createHeart(
{required int color}) → Mesh -
Creates and returns a heart-shaped mesh.
override
-
createObject(
dynamic geometry, [List< MeshBasicMaterial> ? materials, Map<String, dynamic> ? options]) → Mesh -
Creates and returns a mesh object with the specified geometry and materials.
override
-
endSession(
) → Future< void> -
Ends a WebXR session.
override
-
getBatteryLevel(
) → Future< double> -
Retrieves the battery level of the device.
override
-
getPlatformVersion(
) → String? -
Returns the platform version.
override
-
isBrowserCompatible(
String userAgent) → bool - Determines if the current browser is compatible based on the user agent string.
-
isMobileDevice(
) → bool - Checks if the viewport is less than 768 pixels wide indicating a mobile device.
-
isWebXrAvailable(
) → bool -
Checks if WebXR is available and compatible on the current platform.
override
-
jsPrint(
dynamic message) → void -
Prints a message to the JavaScript console.
override
-
loadGLTFModel(
String path) → Future< void> -
Loads a GLTF model from the specified path and adds it to the scene.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openWindow(
String url) → void -
Opens a new browser window/tab with the specified URL.
override
-
startSession(
) → Future< void> -
Initiates a WebXR session.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
Registrar registrar) → void - Register this web platform implementation.