{"id":25907911,"url":"https://github.com/erasin/bevy_vox","last_synced_at":"2025-04-05T11:06:57.815Z","repository":{"id":41889602,"uuid":"304825735","full_name":"erasin/bevy_vox","owner":"erasin","description":" Load MagicaVoxel Vox file for bevy engine.","archived":false,"fork":false,"pushed_at":"2024-11-30T08:36:31.000Z","size":55,"stargazers_count":45,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T10:05:05.972Z","etag":null,"topics":["bevy","bevy-plugin"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/erasin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-17T07:48:47.000Z","updated_at":"2024-12-02T06:19:28.000Z","dependencies_parsed_at":"2023-11-15T07:47:45.042Z","dependency_job_id":null,"html_url":"https://github.com/erasin/bevy_vox","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.1875,"last_synced_commit":"19047f8a021df3103c3f7e32d038bae9155a5d58"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasin%2Fbevy_vox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasin%2Fbevy_vox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasin%2Fbevy_vox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasin%2Fbevy_vox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erasin","download_url":"https://codeload.github.com/erasin/bevy_vox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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"],"created_at":"2025-03-03T07:15:39.992Z","updated_at":"2025-04-05T11:06:57.786Z","avatar_url":"https://github.com/erasin.png","language":"Rust","funding_links":[],"categories":["Plugins and Crates"],"sub_categories":["3D"],"readme":"Load MagicaVoxel Vox file for [bevy](https://github.com/bevyengine/bevy/) engine.\n\n| bevy_vox | bevy  |\n| -------- | ----- |\n| follow   | \u003e=0.15| \n| 0.10     | 0.14  |\n\n**Example**\n\n```rust\nuse bevy::prelude::*;\nuse bevy_vox::VoxPlugin;\n\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .add_plugins(VoxPlugin { swap_yz: true })\n        .insert_resource(AmbientLight {\n            color: Color::WHITE,\n            brightness: 0.5,\n        })\n        .add_systems(Startup, setup)\n        .add_systems(Update, rotate_model)\n        .run();\n}\n\n#[derive(Component)]\nstruct VoxModel;\n\nfn setup(mut commands: Commands, asset_server: Res\u003cAssetServer\u003e) {\n    // add entities to the world\n    commands.spawn((\n        SceneRoot(asset_server.load(\"2x2x2.vox\")),\n        Transform::from_xyz(-1.0, 0.0, 0.0),\n        VoxModel,\n    ));\n\n    // light\n    commands.spawn((\n        PointLight {\n            intensity: 3_000_000.0,\n            ..Default::default()\n        },\n        Transform::from_xyz(3.0, -3.5, 4.5),\n    ));\n\n    // camera\n    commands.spawn((\n        Camera3d::default(),\n        Transform::from_xyz(6.0, -6.0, 6.0).looking_at(Vec3::ZERO, Vec3::Y),\n    ));\n}\n\nfn rotate_model(mut query: Query\u003c\u0026mut Transform, With\u003cVoxModel\u003e\u003e, time: Res\u003cTime\u003e) {\n    for mut transform in query.iter_mut() {\n        transform.rotation = Quat::from_euler(EulerRot::XYZ, 0.0, time.elapsed_secs(), 0.0);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferasin%2Fbevy_vox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferasin%2Fbevy_vox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferasin%2Fbevy_vox/lists"}