depthlift library
DepthLift — Convert any 2D image into a live 3D parallax scene.
This library provides on-device depth estimation powered by Depth Anything v2 and real-time GPU rendering via OpenGL ES (Android) and Metal (iOS).
Quick start
import 'package:depthlift/depthlift.dart';
DepthLiftView(
image: const AssetImage('assets/photo.jpg'),
options: const DepthLiftOptions(
effect: DepthEffect.parallax,
parallaxFactor: 0.45,
),
);
Classes
- DepthLiftController
- Controls the DepthLift 3D scene.
- DepthLiftOptions
- Immutable configuration for a DepthLiftView.
- DepthLiftView
- A widget that displays any 2D image as a live, interactive 3D parallax scene using on-device depth estimation.
Enums
- DepthEffect
- Visual effects available for the DepthLift 3D scene.
- DepthLiftState
- Lifecycle states emitted by DepthLiftController.stateStream.
- DepthModel
- Depth estimation backends supported by DepthLift.
Exceptions / Errors
- DepthLiftModelException
- Exception thrown when a required ML model asset is missing.