bevy_voxel_plot 4.0.0

An efficient voxel plot with support for transparency for bevy.
Documentation
use bevy::prelude::*;
use bevy_panorbit_camera::{PanOrbitCamera, PanOrbitCameraPlugin};
use bevy_voxel_plot::{InstanceData, InstanceMaterialData, VoxelMaterialPlugin};

fn setup(mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>) {
    // Two cubes: one red (alpha 1.0), one blue (alpha 0.5)
    let instances = vec![
        InstanceData {
            position: [0.0, 0.0, 0.0],
            scale: 1.0,
            color: LinearRgba::from(Color::srgba(1.0, 0.0, 0.0, 0.5)).to_f32_array(),
        },
        InstanceData {
            position: [0.3, 0.0, 0.0],
            scale: 1.0,
            color: LinearRgba::from(Color::srgba(0.0, 1.0, 0.0, 0.5)).to_f32_array(),
        },
        InstanceData {
            position: [0.6, 0.0, 0.0],
            scale: 1.0,
            color: LinearRgba::from(Color::srgba(0.0, 0.0, 1.0, 0.5)).to_f32_array(),
        },
    ];

    let cube_mesh = meshes.add(Cuboid::new(0.2, 0.2, 0.2));

    commands.spawn((Mesh3d(cube_mesh), InstanceMaterialData { instances }));

    commands.spawn(AmbientLight {
        color: Color::WHITE,
        brightness: 1.5,
        affects_lightmapped_meshes: false,
    });

    // Camera
    commands.spawn((
        Transform::from_xyz(1.5, 1.0, 1.5).looking_at(Vec3::ZERO, Vec3::Y),
        PanOrbitCamera::default(),
    ));
}

fn main() {
    App::new()
        .add_plugins((DefaultPlugins, VoxelMaterialPlugin, PanOrbitCameraPlugin))
        .add_systems(Startup, setup)
        .run();
}