{"id":32301141,"url":"https://github.com/babakcode/o3d","last_synced_at":"2026-02-21T08:36:31.830Z","repository":{"id":198102383,"uuid":"700084382","full_name":"babakcode/o3d","owner":"babakcode","description":"The Flutter 3D objects easy controller ( glb format )","archived":false,"fork":false,"pushed_at":"2024-12-17T14:44:07.000Z","size":43236,"stargazers_count":51,"open_issues_count":14,"forks_count":19,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T05:42:33.273Z","etag":null,"topics":["3d","ar","flutter","flutter3d","model","model3d","models3d"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/o3d","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babakcode.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}},"created_at":"2023-10-03T23:06:53.000Z","updated_at":"2025-09-01T21:01:52.000Z","dependencies_parsed_at":"2024-06-23T13:54:06.216Z","dependency_job_id":null,"html_url":"https://github.com/babakcode/o3d","commit_stats":null,"previous_names":["babakcode/o3d"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/babakcode/o3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babakcode%2Fo3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babakcode%2Fo3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babakcode%2Fo3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babakcode%2Fo3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babakcode","download_url":"https://codeload.github.com/babakcode/o3d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babakcode%2Fo3d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29677603,"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","ar","flutter","flutter3d","model","model3d","models3d"],"created_at":"2025-10-23T05:36:53.517Z","updated_at":"2026-02-21T08:36:31.817Z","avatar_url":"https://github.com/babakcode.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# O3D - Model Viewer for Flutter\n\nThis is a [Flutter](https://flutter.dev) widget for rendering interactive\n3D models in the [glTF](https://www.khronos.org/gltf/) and [GLB](https://wiki.fileformat.com/3d/glb/) formats.\nThe widget embeds Google's [`\u003cmodel-viewer\u003e`](https://modelviewer.dev)\nweb component in a [WebView](https://pub.dev/packages/webview_flutter).\n\n\u003cimg src=\"https://github.com/babakcode/o3d/assets/31356659/ff89d844-d57b-4f41-a0b4-2e0f66c795bc\" width=\"100%\" alt=\"Flutter 3D model viewer with O3D\" loading=\"lazy\"/\u003e\n\n## Screenshot\n\nonline demo 1: [https://babakcode.github.io/ui_3d_test/](https://babakcode.github.io/ui_3d_test/) / [source code](https://github.com/babakcode/o3d/tree/master/example) \n\nonline demo 2: [https://babakcode.github.io/ui_3d_flutter/](https://babakcode.github.io/ui_3d_flutter/) / [source code](https://github.com/babakcode/ui_3d_flutter)\n\n\u003cimg src=\"https://assets.babakcode.com/flutter/projects/ui_3d_flutter/shoe.gif\" alt=\"Flutter 3d model\" width=\"45%\" loading=\"lazy\"/\u003e \u003cimg src=\"https://assets.babakcode.com/flutter/projects/ui_3d_flutter/zombie.gif\" alt=\"Flutter 3d model\" width=\"45%\" loading=\"lazy\"/\u003e\n\n## Features\n\n1. `O3DController controller = O3DController();`\n2. cameraTarget: use **controller.cameraTarget(20, 20, 5)** `x, y, z`\n3. cameraOrbit: use **controller.cameraOrbit(1.2, 1, 4)** `(theta)deg, (phi)deg, (radius)m`\n4. availableAnimations: use **controller.availableAnimations().then((animations) =\u003e log(\"Available animations: $animations\"));**\n5. play: use **controller.play()** `[optional] repetitions` =\u003e `play(repetitions: 2)`\n6. pause: use **controller.pause()**\n7. Renders glTF and GLB models. (Also, [USDZ] models on iOS 12+.)\n8. Supports animated models, with a configurable auto-play setting.\n9. Optionally supports launching the model into an [AR] viewer.\n10. Optionally auto-rotates the model, with a configurable delay.\n11. Supports a configurable background color for the widget.\n\n[USDZ]: https://graphics.pixar.com/usd/docs/Usdz-File-Format-Specification.html\n\n[AR]:   https://en.wikipedia.org/wiki/Augmented_reality\n\n\n\n## Installation\n\nin `pubspec.yaml`\n\n```yaml\ndependencies:\n  o3d: ^3.1.0\n```\n\n### `AndroidManifest.xml` (Android 9+ only)\n\n**Test on `real device`** and to use this widget on Android 9+ devices, your app must be permitted to make an HTTP connection\nto `http://localhost:XXXXX`.\nAndroid 9 (API level 28) changed the default for [`android:usesCleartextTraffic`] from `true`\nto `false`,\nso you will need to configure 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\"\n+       android:usesCleartextTraffic=\"true\"\u003e\n        \u003cactivity\n            android:name=\".MainActivity\"\n```\n\nThis does not affect Android 8 and earlier.\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 widget 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\n\u003ckey\u003eio.flutter.embedded_views_preview\u003c/key\u003e\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/o3d/assets/model-viewer.min.js\" defer\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\n## Examples\n\n### Importing the library\n\n```dart\nimport 'package:o3d/o3d.dart';\n```\n\n### Creating a `O3D` widget\n\n```dart\nclass _MyHomePageState extends State\u003cMyHomePage\u003e {\n  \n  // to control the animation\n  O3DController controller = O3DController();\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        backgroundColor: Theme.of(context).colorScheme.inversePrimary,\n        title: Text(widget.title),\n        actions: [\n          IconButton(\n              onPressed: () =\u003e \n                  controller.cameraOrbit(20, 20, 5),\n              icon: const Icon(Icons.change_circle)),\n          IconButton(\n              onPressed: () =\u003e\n                  controller.cameraTarget(1.2, 1, 4), \n              icon: const Icon(Icons.change_circle_outlined)),\n        ],\n      ),\n      body: O3D.asset(\n         src: 'assets/glb/jeff_johansen_idle.glb', \n         controller: controller,\n      ),\n    );\n  }\n}\n```\n\n### Loading a bundled Flutter asset\n\n```\nO3D.asset(\n  src: 'assets/MyModel.glb',\n  // ...\n),\n```\n\n### Loading a model from the web\n\n```\nbody: O3D.network(\n   src:'https://modelviewer.dev/shared-assets/models/Astronaut.glb',\n   // ...\n),\n```\n\n### Loading a model from the file system\n\nThis is not available on Web.\n\n```dart\nclass HomePage extends StatelessWidget {\n   const HomePage({super.key});\n   \n   @override\n   Widget build(BuildContext context) {\n      return O3D(src: 'file:///path/to/MyModel.glb',\n      // ...\n      );\n   }\n}\n```\n\n## projects\n\n\u003cdiv style=\"overflow-x: scroll\"\u003e\n\n| babak code                                                                                                                                                       | Tassio Gustavo                                                                                                                                                                                                                                                                                       | Vaibhav Chandolia                                                                                                                                                                                          |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| \u003ca href=\"https://youtu.be/-W45PQ__SAk\" target=\"_blank\"\u003e\u003cimg src=\"https://img.youtube.com/vi/-W45PQ__SAk/0.jpg\" alt=\"BabakCode\" width=\"100%\" loading=\"lazy\"/\u003e\u003c/a\u003e | \u003ca href=\"https://www.linkedin.com/posts/tassiogustavo_flutter-dart-ugcPost-7131042089257103361-0LY_?utm_source=share\u0026utm_medium=member_desktop\" target=\"_blank\"\u003e\u003cimg src=\"https://assets.babakcode.com/flutter/projects/ui_3d_flutter/scared.gif\" alt=\"BabakCode\" width=\"100%\"  loading=\"lazy\"/\u003e\u003c/a\u003e | \u003ca href=\"https://youtu.be/DTenaCTOSzE?si=ChoTTGnx9smY70ds\" target=\"_blank\"\u003e\u003cimg src=\"https://img.youtube.com/vi/DTenaCTOSzE/0.jpg\" alt=\"Vaibhav Chandolia youtube video\" width=\"100%\" loading=\"lazy\"/\u003e\u003c/a\u003e |\n| \u003ca href=\"https://youtu.be/-W45PQ__SAk\" target=\"_blank\"\u003eyoutube video link\u003c/a\u003e                                                                                    | \u003ca href=\"https://www.linkedin.com/posts/tassiogustavo_flutter-dart-ugcPost-7131042089257103361-0LY_?utm_source=share\u0026utm_medium=member_desktop\" target=\"_blank\"\u003elinkedin post link\u003c/a\u003e                                                                                                               | \u003ca href=\"https://youtu.be/DTenaCTOSzE?si=ChoTTGnx9smY70ds\" target=\"_blank\"\u003eYoutube channel\u003c/a\u003e                                                                                                             |\n\n\u003c/div\u003e\n\n## Compatibility\n\n- Android\n- iOS (AR View may not available on iOS 16+)\n- Web, with [a recent system browser version](https://modelviewer.dev/#section-browser-support).\n\n\n## Notes\n\nWe use\nthe [Google APP](https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox)\n, `com.google.android.googlequicksearchbox` to display interactive 3D models on Android.\nThe model displays in 'ar_preferred' mode by default, Scene Viewer launches in AR native mode as the\nentry mode.\nIf [Google Play Services for AR (ARCore, `com.google.ar.core`)](https://play.google.com/store/apps/details?id=com.google.ar.core)\nisn't present, Scene Viewer gracefully falls back to 3D mode as the entry mode.\n\n\n\nNote that due to browsers' [CORS] security restrictions, the model file\n*must* be served with a `Access-Control-Allow-Origin: *` HTTP header.\n\n## Frequently Asked Questions\n\n### Q: Why doesn't my 3D model load and/or render?\n\n**A:** There are several reasons why your model URL could fail to load and\nrender:\n\n1. It might not be possible to parse the provided glTF or GLB file.\n   Some tools can produce invalid files when exporting glTF. Always\n   run your model files through the [glTF Validator] to check for this.\n\n[CORS]:                     https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\n\n[glTF Validator]:           https://github.khronos.org/glTF-Validator/\n\n[`android:usesCleartextTraffic`]: https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabakcode%2Fo3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabakcode%2Fo3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabakcode%2Fo3d/lists"}