{"id":32304298,"url":"https://github.com/m-r-davari/flutter_3d_controller","last_synced_at":"2026-02-21T08:36:38.848Z","repository":{"id":207928547,"uuid":"720439163","full_name":"m-r-davari/flutter_3d_controller","owner":"m-r-davari","description":"The most complete Flutter package for rendering interactive 3D models in various formats (GLB, GLTF, OBJ, FBX), with the ability to control animations, textures, camera, and more.","archived":false,"fork":false,"pushed_at":"2025-09-13T15:01:46.000Z","size":43267,"stargazers_count":168,"open_issues_count":18,"forks_count":38,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-02-20T07:17:49.504Z","etag":null,"topics":["3d","3d-animation","3d-controller","3d-models","3d-objects","dart","fbx","flutter","flutter-3d","flutter-3d-animations","flutter-model-viewer","glb","gltf","model-viewer","models-3d","models3d","obj","objects-3d","viewer-3d"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_3d_controller","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-r-davari.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-18T13:47:03.000Z","updated_at":"2026-02-15T13:49:06.000Z","dependencies_parsed_at":"2023-12-28T12:41:45.261Z","dependency_job_id":"ee685124-fe52-408c-8363-b200f656880c","html_url":"https://github.com/m-r-davari/flutter_3d_controller","commit_stats":null,"previous_names":["m-r-davari/flutter_3d_controller"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/m-r-davari/flutter_3d_controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-r-davari%2Fflutter_3d_controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-r-davari%2Fflutter_3d_controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-r-davari%2Fflutter_3d_controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-r-davari%2Fflutter_3d_controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-r-davari","download_url":"https://codeload.github.com/m-r-davari/flutter_3d_controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-r-davari%2Fflutter_3d_controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29677610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-animation","3d-controller","3d-models","3d-objects","dart","fbx","flutter","flutter-3d","flutter-3d-animations","flutter-model-viewer","glb","gltf","model-viewer","models-3d","models3d","obj","objects-3d","viewer-3d"],"created_at":"2025-10-23T06:24:02.091Z","updated_at":"2026-02-21T08:36:38.843Z","avatar_url":"https://github.com/m-r-davari.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter 3D Controller\n\nThe most complete Flutter package for rendering interactive 3D models in various formats (**GLB**, **GLTF**, **OBJ**, **FBX**), with the ability to control animations, textures, camera, and more.\n\n# Why Flutter 3D Controller?\n\nThe ***Flutter 3D Controller*** package is the most comprehensive solution for rendering various 3D model formats, offering extensive functionality to give users optimal control over 3D models.\n\nIt leads in implementing new features, while **some other packages have just copied Flutter 3D Controller's features and code** without proper credit or adherence to licensing.\n\nNotably, when testing **other available packages**, users may experience **gesture malfunctions** on iOS and certain Android devices. However, **Flutter 3D Controller** is the first and only package to **resolve this issue** with its **gesture interceptor feature**, introduced in **version 2.0.0**, released on **October 5, 2024**.\n\n## Features\n\n- Mobile and Web **stable** version (fully support **glb**, **gltf** and **obj** format)\n- macOS **beta** version\n- Load 3D model from assets\n- Load 3D model from URL\n- Change 3D models by setState\n- Gesture interceptor (Prevents gesture recognizers from malfunctioning)\n- Controller model loading value listener\n- Model loading states callbacks, **onProgress**, **onLoad** and **onError**\n- Load **obj** 3D models with textures and **mtl** files\n- Scale and camera properties for obj 3D models\n- Play animation\n- Play animation with loop count\n- Switch between animations\n- Pause animation\n- Reset animation\n- Stop animation\n- Get available animations list\n- Start rotation \u0026 set speed 🆕\n- Pause rotation 🆕\n- Stop rotation 🆕\n- Switch between textures\n- Get available textures list\n- Set camera target\n- Reset camera target\n- Set camera orbit\n- Reset camera orbit\n- Default loading progressbar color\n- Enable/disable touch control\n\n\u003c!--\n## Todo (Next Versions)\n- Support fbx format\n--\u003e\n\n## Compatibility\n\n- Android\n- iOS\n- Web\n- macOS (Beta)\n- Windows (Coming Soon)\n\n## Mobile \u0026 Web Samples\n\n\u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/male_scr.gif\" alt=\"Model1\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/lambo_scr.gif\" alt=\"Model2\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/dog_scr.gif\" alt=\"Model3\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/chair_scr.gif\" alt=\"Model3\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/dash_scr.gif\" alt=\"Model3\" width=\"19%\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/female_scr.gif\" alt=\"Model1\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/bird_scr.gif\" alt=\"Model2\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/male2_scr.gif\" alt=\"Model3\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/donut_scr.gif\" alt=\"Model3\" width=\"19%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/scrs_gifs_v2/multi_scr.gif\" alt=\"Model3\" width=\"19%\"/\u003e\n\n## Desktop(macOS) Samples\n\n\u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/macos_model_sc.png\" alt=\"macOS_Model1\" width=\"48.25%\"/\u003e \u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/macos_model_sc2.png\" alt=\"macOS_Model2\" width=\"48.25%\"/\u003e \n\n\n## Notes\n\n- For now this package supports **GLB**, **glTF** and **OBJ** format, other 3D formats coming soon.\n- Visit the full example to see how to use this package.\n\n## Brief Examples\n\n## How to use controller\n```dart\n//Create controller object to control 3D model.\nFlutter3DController controller = Flutter3DController();\n\n//Listen to model loading state via controller\ncontroller.onModelLoaded.addListener(() {\n  debugPrint('model is loaded : ${controller.onModelLoaded.value}');\n});\n\n//It will play 3D model animation, you can use it to play or switch between animations.\ncontroller.playAnimation();\n\n//If you pass specific animation name it will play that specific animation.\n//If you pass null and your model has at least 1 animation it will play first animation.\ncontroller.playAnimation(animationName: chosenAnimation);\n\n//If you pass loopCount \u003e 0, the animation will repeat for the specified number of times.\n//To play the animation only once, set loopCount to 1.\ncontroller.playAnimation(loopCount: 1);\n\n//The loopCount argument can also be used with a specific animation.\ncontroller.playAnimation(loopCount: 2, animationName: chosenAnimation);\n\n//It will pause the animation at current frame.\ncontroller.pauseAnimation();\n\n//It will reset and play animation from first frame (from beginning).\ncontroller.resetAnimation();\n\n//It will stop the animation.\ncontroller.stopAnimation();\n\n//It will return available animation list of 3D model.\nawait controller.getAvailableAnimations();\n\n//It will Starts the rotation of the 3D model with default speed value (10deg/second).\ncontroller.startRotation();\n\n//It will Starts the rotation of the 3D model with desire speed value deg/s.\ncontroller.startRotation(rotationSpeed: 30);\n\n//It will Pauses the ongoing rotation, keeping the 3D model at its current orientation.\ncontroller.pauseRotation();\n\n//It will Stops the rotation completely and resets the rotation state to the initial position.\ncontroller.stopRotation();\n\n//It will load desired texture of 3D model, you need to pass texture name.\ncontroller.setTexture(textureName: chosenTexture);\n\n//It will return available textures list of 3D model.\nawait controller.getAvailableTextures();\n\n//It will set your desired camera target.\ncontroller.setCameraTarget(0.3, 0.2, 0.4);\n\n//It will reset the camera target to default.\ncontroller.resetCameraTarget();\n\n//It will set your desired camera orbit.\ncontroller.setCameraOrbit(20, 20, 5);\n\n//It will reset the camera orbit to default.\ncontroller.resetCameraOrbit();\n```\n\n## How to load glb and gltf models\n```dart\n//The 3D viewer widget for glb and gltf format\nFlutter3DViewer(\n    //If you pass 'true' the flutter_3d_controller will add gesture interceptor layer\n    //to prevent gesture recognizers from malfunctioning on iOS and some Android devices.\n    //the default value is true\n    activeGestureInterceptor: true,\n    //If you don't pass progressBarColor, the color of defaultLoadingProgressBar will be grey.\n    //You can set your custom color or use [Colors.transparent] for hiding loadingProgressBar.\n    progressBarColor: Colors.orange,\n    //You can disable viewer touch response by setting 'enableTouch' to 'false'\n    enableTouch: true,\n    //This callBack will return the loading progress value between 0 and 1.0\n    onProgress: (double progressValue) {\n      debugPrint('model loading progress : $progressValue');\n    },\n    //This callBack will call after model loaded successfully and will return model address\n    onLoad: (String modelAddress) {\n      debugPrint('model loaded : $modelAddress');\n    },\n    //this callBack will call when model failed to load and will return failure error\n    onError: (String error) {\n      debugPrint('model failed to load : $error');\n    },\n    //You can have full control of 3d model animations, textures and camera\n    controller: controller,\n    src: 'assets/business_man.glb', //3D model with different animations\n    //src: 'assets/sheen_chair.glb', //3D model with different textures\n    //src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb', // 3D model from URL\n)\n```\n\n## How to load obj models\n```dart\n//The 3D viewer widget for obj format\nFlutter3DViewer.obj(\n    src: 'assets/flutter_dash.obj',\n    //src: 'https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/flutter_dash_model/flutter_dash.obj',\n    scale: 5,\n    // Initial scale of obj model\n    cameraX: 0,\n    // Initial cameraX position of obj model\n    cameraY: 0,\n    //Initial cameraY position of obj model\n    cameraZ: 10,\n    //Initial cameraZ position of obj model\n    //This callBack will return the loading progress value between 0 and 1.0\n    onProgress: (double progressValue) {\n      debugPrint('model loading progress : $progressValue');\n    },\n    //This callBack will call after model loaded successfully and will return model address\n    onLoad: (String modelAddress) {\n      debugPrint('model loaded : $modelAddress');\n    },\n    //this callBack will call when model failed to load and will return failure erro\n    onError: (String error) {\n      debugPrint('model failed to load : $error');\n    },\n)\n```\n\n## Installation\n\n### `pubspec.yaml`\n\n```yaml\ndependencies:\n  flutter_3d_controller: ^2.3.0\n```\n\n### `AndroidManifest.xml` (Android only)\n\nConfigure your app's `android/app/src/main/AndroidManifest.xml` as follows:\n\n```diff\n\n+   \u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\n\n     \u003capplication\n        android:name=\"${applicationName}\"\n        android:icon=\"@mipmap/ic_launcher\"\n-       android:label=\"example\"\u003e\n+       android:label=\"example\"\n+       android:usesCleartextTraffic=\"true\"\u003e\n        \u003cactivity\n            android:name=\".MainActivity\"\n```\n\n### `app/build.gradle` (Android only)\n\nChange minSdkVersion to 21.\n\n    defaultConfig {\n        ...\n        minSdkVersion 21\n        ...\n    }\n\n### `Info.plist` (iOS only)\n\nTo use this package on iOS, you need to opt-in to the embedded views preview\nby adding a boolean property to your app's `ios/Runner/Info.plist` file, with\nthe key `io.flutter.embedded_views_preview` and the value `YES`:\n\n```xml\n  \u003ckey\u003eio.flutter.embedded_views_preview\u003c/key\u003e\n  \u003ctrue/\u003e\n```\n\n### `web/index.html` (Web only)\n\nModify the `\u003chead\u003e` tag of your `web/index.html` to load the JavaScript, like so:\n\n```html\n\u003chead\u003e\n  \u003c!-- Other stuff --\u003e\n    \u003cscript type=\"module\" src=\"./assets/packages/flutter_3d_controller/assets/model_viewer.min.js\" defer\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\n### `Outgoing Connections(Client)` (macOS only)\n\nFor loading 3D models in *macOS* you need to configure the macOS App Sandbox by *enabling* the `Outgoing Connections (Client)` option in your `MacOS` XCode Project, under `Runner \u003e Signing \u0026 Capabilities`.\n\n\u003cimg src=\"https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/macos_runner_config_sc.png\" alt=\"macOS_runner_sc\" width=\"60%\"/\u003e\n\n### `AppDelegate.html` (macOS only)\n\nAdd the following codes to your macOS `AppDelegate` file to support transparent background for *flutter_3d_controller*\n\n```swift\nimport flutter_inappwebview_macos\n\nextension InAppWebView {\n    @objc public override func viewDidMoveToWindow() {\n        super.viewDidMoveToWindow()\n        \n        if window != nil {\n            print(\"InAppWebView moved to window, enforcing transparency\")\n            self.setValue(false, forKey: \"opaque\")\n            self.setValue(false, forKey: \"drawsBackground\")\n            self.layer?.backgroundColor = NSColor.clear.cgColor\n        }\n    }\n}\n```\n\n## Frequently Asked Questions\n- **Desktop(macOS) rare issues** : You may experience unexpected issues in desktop(macOS) beta version.\n- **The 3D model could not load** : First check the example, if models in examples loads, may be there is problem with your model or your model path.\n- **The animation list could not be retrieved** : Check if there are any special characters in the animation names that might cause a JSON encoding error.\n- **The 3D model could not load from url** : It might be due to [CORS] security restrictions. The server hosting the model file *must* send appropriate CORS response headers for viewer to be able to load the file. See [google/model-viewer#1015](https://github.com/google/model-viewer/issues/1015)\n\n\n## More Info\nThis package uses Google's [model-viewer](https://modelviewer.dev) to render 3D models and it may have some issue in rendering some models/textures, the core of package (Model Viewer) will change in future to support all type of 3D models.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-r-davari%2Fflutter_3d_controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-r-davari%2Fflutter_3d_controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-r-davari%2Fflutter_3d_controller/lists"}