{"id":20410892,"url":"https://github.com/mintlu8/bevy_spawn_fn","last_synced_at":"2025-04-12T16:04:14.479Z","repository":{"id":243370828,"uuid":"812230587","full_name":"mintlu8/bevy_spawn_fn","owner":"mintlu8","description":"Hyper optimized spawning experience for bevy.","archived":false,"fork":false,"pushed_at":"2024-07-30T20:02:20.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-10T04:53:54.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mintlu8.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-06-08T09:58:47.000Z","updated_at":"2024-07-30T20:02:23.000Z","dependencies_parsed_at":"2024-07-30T22:26:49.918Z","dependency_job_id":"df4ec8de-3584-4d3d-b4f7-20f50640a4eb","html_url":"https://github.com/mintlu8/bevy_spawn_fn","commit_stats":null,"previous_names":["mintlu8/bevy_spawn_fn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mintlu8%2Fbevy_spawn_fn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mintlu8%2Fbevy_spawn_fn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mintlu8%2Fbevy_spawn_fn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mintlu8%2Fbevy_spawn_fn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mintlu8","download_url":"https://codeload.github.com/mintlu8/bevy_spawn_fn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224737131,"owners_count":17361345,"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":[],"created_at":"2024-11-15T05:48:59.497Z","updated_at":"2024-11-15T05:49:00.182Z","avatar_url":"https://github.com/mintlu8.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bevy_spawn_fn\n\nAwesome spawning experience for bevy.\n\n## Getting Started\n\nAnnotate your system with `#[spawner_system]`, then use the `spawn!` macro.\n\n```rust\n#[spawner_system]\npub fn particle_emitter(emitter: Res\u003cParticleEmitter\u003e) {\n    if emitter.should_spawn() {\n        spawn! {\n            ParticleBundle {\n                color: Color::Green,\n                size: 10.0,\n                texture: @load \"images/my_image.png\"\n            }\n        }\n    }\n}\n```\n\nIf the function not a system, use the `#[spawner_fn]` macro,\nwhich takes less liberty in rewriting the function.\n\n## The `spawn!` macro\n\n`spawn!` spawns a `IntoSpawnable` and return an `Entity`.\n\nThe macro uses the `infer_construct!` macro from\nthe [`default_constructor`](https://docs.rs/default-constructor) crate under the hood,\nwhich uses the `InferInto` trait for conversion.\n\nAdditionally effect `@load` can be used to load `Handle\u003cT\u003e` from\na string path and `@asset` can be used to convert `impl Into\u003cT\u003e` to `Handle\u003cT\u003e`\nvia `AssetServer`.\n\n## The `Spawnable` Trait\n\n`Spawnable` is a superset of `Bundle` that can be implemented to spawn\nheterogenous bundles and children.\n\n`IntoSpawnable` is free ergonomics on top of `Spawnable`!\n\n## Versions\n\n| bevy | bevy_spawn_fn      |\n|------|--------------------|\n| 0.13 | latest             |\n\n## License\n\nLicense under either of\n\nApache License, Version 2.0 (LICENSE-APACHE or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\nMIT license (LICENSE-MIT or \u003chttp://opensource.org/licenses/MIT\u003e)\nat your option.\n\n## Contribution\n\nContributions are welcome!\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmintlu8%2Fbevy_spawn_fn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmintlu8%2Fbevy_spawn_fn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmintlu8%2Fbevy_spawn_fn/lists"}