{"id":15137896,"url":"https://github.com/dekirisu/bevy_gltf_trait","last_synced_at":"2025-10-23T13:30:55.193Z","repository":{"id":247396876,"uuid":"825414862","full_name":"dekirisu/bevy_gltf_trait","owner":"dekirisu","description":"Customizable Bevy Engine GLTF loading through a trait","archived":false,"fork":false,"pushed_at":"2024-12-10T14:18:32.000Z","size":557,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T18:48:22.647Z","etag":null,"topics":["bevy","bevy-plugin","gltf","gltf-loader","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dekirisu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2024-07-07T17:48:38.000Z","updated_at":"2024-12-20T21:15:44.000Z","dependencies_parsed_at":"2024-07-08T15:11:47.280Z","dependency_job_id":null,"html_url":"https://github.com/dekirisu/bevy_gltf_trait","commit_stats":null,"previous_names":["dekirisu/bevy_gltf_trait"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fbevy_gltf_trait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fbevy_gltf_trait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fbevy_gltf_trait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fbevy_gltf_trait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dekirisu","download_url":"https://codeload.github.com/dekirisu/bevy_gltf_trait/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237834652,"owners_count":19373764,"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":["bevy","bevy-plugin","gltf","gltf-loader","rust","rust-lang"],"created_at":"2024-09-26T07:03:25.540Z","updated_at":"2025-10-23T13:30:54.811Z","avatar_url":"https://github.com/dekirisu.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eBevy glTF Trait\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dekirisu/bevy_gltf_trait\" style=\"position:relative\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/github-dekirisu-ee6677\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/bevy_gltf_trait\" style=\"position:relative\"\u003e\n        \u003cimg src=\"https://img.shields.io/crates/v/bevy_gltf_trait\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nThis is a fork of [bevy](https://github.com/bevyengine/bevy) `/crates/bevy_gltf`, that doesn't change any functionalities, but provides several possibilities to `customize` the conversion between gltf and bevy interns `on load` using the trait `GltfTrait`. \n\n# Trait Features\n- set the extensions `default: \u0026[\"gltf\", \"glb\"]`\n- Material:\n    - change the `Material` used\n    - or just edit the `StandardMaterial`s\n- Meshes:\n    - edit any `Mesh`\n    - edit their `EntityWorldMut` (similar to `EntityCommands`)\n    - edit the `Transform` and `EntityWorldMut` of their parent\n- Lights:\n    - edit their `SpotLight`, `PointLight` or `DirectionalLight` components\n    - edit their `EntityWorldMut` \n    - edit the `Transform` and `EntityWorldMut` of their parent\n- edit the `App`\n\n# Notes\n- If you want to insert components through the trait and they are foreign to bevy_gltf: \n    - Make sure to use `on_app` to `.register_type()` them\n- the provided gltf structs make it possible to react to custom gltf properties\n\n# Versions\n| Bevy | This |\n| ---- | ---- |\n| 0.15 | 0.2  |\n| 0.14 | 0.1  |\n\n# Example\nThe original way of adding the plugin changes to:\n```rust\nfn main(){\n    let mut app = App::new();\n    app.add_plugins((\n        MinimalPlugins,\n        GltfPlugin::\u003c()\u003e::default(),\n        // ...\n    ));\n    app.run();\n}\n```\n..and can be modified with the trait to either **replace** or **extend** (using different extensions) scene imports.\n```rust \n#[derive(Reflect,Clone,Default)]\nstruct WhiteGltf;\nimpl GltfTrait for WhiteGltf {\n    const EXTENSIONS: \u0026'static [\u0026'static str] = \u0026[\"myglb\"];\n    type Material = StandardMaterial;        \n    fn convert_material (mut convert:GltfTraitMaterial) -\u003e Self::Material {\n        convert.material.base_color = Color::WHITE;\n        convert.material.base_color_texture = None;\n        convert.material\n    }\n}\n\nfn main(){\n    let mut app = App::new();\n    app.add_plugins((\n        DefaultPlugins,\n        GltfPlugin::\u003cWhiteGltf\u003e::default()\n    ));\n    app.run();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdekirisu%2Fbevy_gltf_trait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdekirisu%2Fbevy_gltf_trait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdekirisu%2Fbevy_gltf_trait/lists"}