sdk
Packages
Primary entry point for the Maverick2 SDK. The Evs singleton exposes all runtime services and manages SDK initialization and teardown. Applications access glasses functionality exclusively through Evs.*Service accessors after the platform-specific init() call completes.
Public contracts that define the SDK's drawing, resource, and sensing abstractions. Key interfaces include IM2FillSpec for fill specification markers, and IM2BoundingBox / IM2WorldBoundingBox for spatial bounds in 2-D and 3-D space.
Asset and resource models representing uploadable content destined for the glasses hardware cache. Covers fonts, raster images, sprite sheets, textures, and binary blobs. Resources follow an upload-then-activate lifecycle managed by M2ResourcesService, with the M2Resource base class defining shared identity and tagging semantics.
Core runtime services that manage every aspect of glasses interaction. Each service extends the sealed M2Service base and follows a start/stop lifecycle. Covers connectivity (M2GlassesService), HUD rendering (M2ScreenService), asset caching (M2ResourcesService), camera and microphone capture, IMU/GPS sensors, display brightness, OTA firmware updates, developer diagnostics, logging, preferences, authentication, and eye tracking.
Shared data models consumed by multiple services. Contains the ConnectionStatus state machine, BLE device discovery via M2BLEScanner, orientation math via M2Quaternion, and runtime platform identification via Platform.
Geospatial primitives and the platform location interface. M2GeoCoords and M2LatLong model coordinates, while IM2LocationManager exposes location updates behind a common KMP interface backed by platform-specific providers (Android FusedLocation / iOS CLLocationManager).
Animator core types and lifecycle management. M2Animator represents a single hardware-synchronized animation channel (position, size, color, matrix, etc.) that is lazily created in firmware when started. M2AnimationsChain enables sequencing and parallel composition of multiple animators.
Augmented-reality drawable types rendered in world space. M2ArGeometry is the base for 3-D geometry nodes, with concrete types for textured meshes, polylines, point clouds, billboarded panels, and directional lighting.
Foundation classes for the drawable scene graph. M2Drawable is the abstract root of all HUD elements, managing position, size, color, visibility, transforms, and hardware object lifecycle. M2Panel provides a rectangular container with child layout, and M2Group aggregates children without its own geometry.
Screen containers that manage drawable lifecycles and input routing on the glasses. M2Screen is the base with touch/gesture handling, M2FullScreen covers the entire display, and M2ArScreen adds world-space AR rendering with IMU-driven camera updates.
General-purpose SDK utility classes for color manipulation (M2Color), frame-rate measurement (M2FpsCalculator), thread-safe listener management, diagnostic log buffering, firmware version parsing, and camera frame conversion.
Matrix and linear-algebra helpers for geometry transforms and LOS projection. M2TransformMatrix is the sealed base, with M2TransformMatrix3x3 for 2-D affine transforms and M2TransformMatrix4x4 for full 3-D transforms.
Shared observable ViewModels for SDK and glasses state. M2GlassesViewModel exposes reactive state flows for battery, connection, and device info, while M2ViewModel provides a base class for applications with SDK-aware lifecycle management.