{"id":23876602,"url":"https://github.com/hamed-rezaee/flutter_3d_rendering","last_synced_at":"2025-07-14T12:39:10.778Z","repository":{"id":196304008,"uuid":"686188697","full_name":"hamed-rezaee/flutter_3d_rendering","owner":"hamed-rezaee","description":"A sample Flutter project to demonstrate 3D rendering.","archived":false,"fork":false,"pushed_at":"2023-09-24T01:07:51.000Z","size":15307,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-11-04T02:29:14.951Z","etag":null,"topics":["3d-cube","3d-donut","3d-rendering","custom-painter","flutter"],"latest_commit_sha":null,"homepage":"","language":"C++","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/hamed-rezaee.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-09-02T01:22:50.000Z","updated_at":"2023-09-25T19:02:00.000Z","dependencies_parsed_at":"2023-09-24T08:42:41.947Z","dependency_job_id":null,"html_url":"https://github.com/hamed-rezaee/flutter_3d_rendering","commit_stats":null,"previous_names":["hamed-deriv/flutter_3d_rendering","hamed-rezaee/flutter_3d_rendering"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamed-rezaee%2Fflutter_3d_rendering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamed-rezaee%2Fflutter_3d_rendering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamed-rezaee%2Fflutter_3d_rendering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamed-rezaee%2Fflutter_3d_rendering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamed-rezaee","download_url":"https://codeload.github.com/hamed-rezaee/flutter_3d_rendering/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232384238,"owners_count":18515090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-cube","3d-donut","3d-rendering","custom-painter","flutter"],"created_at":"2025-01-03T19:28:02.339Z","updated_at":"2025-01-03T19:28:03.174Z","avatar_url":"https://github.com/hamed-rezaee.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter 3D Rendering\n\n![Cube Renderer](cube_renderer_line.gif)\n\n![Donut Line Renderer](donut_renderer_line.gif)\n\n![Donut Point Renderer](donut_renderer_point.gif)\n\n![Render Painter](renderer.gif)\n\nThis Flutter application provides a simple example of 3D rendering using custom painting. It renders a rotating 3D object on the screen.\n\nInspired by Coding Train's [Coding Challenge #112: 3D Rendering with Rotation and Projection](https://www.youtube.com/watch?v=p4Iz0XJY-Qk) by Daniel Shiffman.\n\n## Usage\n\nImport the package in your Dart code:\n\n```dart\nimport 'package:flutter_3d_rendering/donut_renderer.dart';\nimport 'package:flutter_3d_rendering/render_painter.dart';\n```\n\nCreate a `BaseRenderer` with an angleX, angleY, angleZ to control rotation:\n\n```dart\nfinal renderer = DonutRenderer(\n  angleX: angleX,\n  angleY: angleY,\n  angleZ: angleZ,\n);\n```\n\nIn your widget's `build` method, use the `CustomPaint` widget to display the object:\n\n```dart\nCustomPaint(\n  size: const Size(400, 400),\n  painter: RenderPainter(renderer),\n)\n```\n\nTo continuously rotate the object, you can use a timer or any other mechanism to update the angle over time. Here's an example using a timer:\n\n```dart\nTimer.periodic(const Duration(milliseconds: 16), (timer) {\n  setState(() {\n    angleX += 0.01;\n    angleY += 0.01;\n    angleZ += 0.01;\n  });\n});\n```\n\n## Matrix Helper and Vector\n\nThe package includes a `matrix_helper`.dart file that provides matrix manipulation functions for 3D transformations. Additionally, it includes a `vector.dart` file for working with 3D vectors.\n\n## License\n\nThis package is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamed-rezaee%2Fflutter_3d_rendering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamed-rezaee%2Fflutter_3d_rendering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamed-rezaee%2Fflutter_3d_rendering/lists"}