pub struct VoxelCorePlugin<V: VoxelType = DefaultVoxel> { /* private fields */ }Expand description
Convenience bundle for the historical core voxel runtime.
VoxelCorePlugin<V> wires up the legacy core bundle — world streaming,
chunk lifecycle, meshing, PBR rendering, neighbor-solid occlusion, mining,
placement, and loading state — without the bundled presentation defaults
from VoxelPlugin.
In the plugin catalog taxonomy this type is a plugin_category::ConveniencePlugin:
it composes stricter Engine and Gameplay plugins for compatibility and quick
starts. New architecture should describe those individual plugins by their
primary categories rather than treating this bundle as the whole model.
The generic parameter V selects the voxel type used by the rendering,
meshing, and occlusion systems. Defaults to DefaultVoxel for backwards
compatibility: VoxelCorePlugin::default() and
VoxelCorePlugin::<DefaultVoxel>::new() are equivalent.
§Included systems
| Plugin | Responsibility |
|---|---|
WorldPlugin | world::ChunkManager, world::systems::ViewerPosition, chunk lifecycle events, and streaming |
WorldConfigPlugin | Inserts the world::WorldConfig resource |
RenderPlugin<V> | Shared chunk PBR material and entity spawn |
MeshPlugin<V> | Greedy mesh generation and chunk despawn |
OcclusionPlugin<V> | Neighbor-solid chunk occlusion |
world::mining::MiningPlugin | Gameplay primitive for voxel removal |
world::placement::PlacementPlugin | Gameplay primitive for voxel placement |
world::loading::LoadingPlugin | World loading state machine |
§Not included (opt-in)
generator::GeneratorPlugin— requires the caller to supply agenerator::GeneratorResource.FragmentPlugin,SkyboxPlugin,SfxPlugin,HotbarPlugin, andUiPlugin— presentation/gameplay defaults included byVoxelPlugin.
§Example
use bevy::prelude::*;
use voxel_framework::{VoxelCorePlugin, generator::{GeneratorPlugin, GeneratorResource}};
use voxel_framework::generator::asteroid::{AsteroidConfig, AsteroidGenerator};
use voxel_framework::voxel::DefaultVoxel;
use std::sync::Arc;
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(VoxelCorePlugin::<DefaultVoxel>::new())
.add_plugins(GeneratorPlugin::<DefaultVoxel>::new())
.insert_resource(GeneratorResource::<DefaultVoxel> {
generator: Arc::new(AsteroidGenerator::new(AsteroidConfig::default())),
})
.run();§See also
VoxelPlugin— broader quick-start convenience bundle.
Implementations§
Source§impl<V: VoxelType> VoxelCorePlugin<V>
impl<V: VoxelType> VoxelCorePlugin<V>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new VoxelCorePlugin for voxel type V.
Trait Implementations§
impl<V: VoxelType> ConveniencePlugin for VoxelCorePlugin<V>
Source§impl<V: VoxelType> Default for VoxelCorePlugin<V>
impl<V: VoxelType> Default for VoxelCorePlugin<V>
Source§impl<V: VoxelType> Plugin for VoxelCorePlugin<V>
impl<V: VoxelType> Plugin for VoxelCorePlugin<V>
Source§fn ready(&self, _app: &App) -> bool
fn ready(&self, _app: &App) -> bool
finish should be called.Source§fn finish(&self, _app: &mut App)
fn finish(&self, _app: &mut App)
App, once all plugins registered are ready. This can
be useful for plugins that depends on another plugin asynchronous setup, like the renderer.Source§fn cleanup(&self, _app: &mut App)
fn cleanup(&self, _app: &mut App)
impl<V: VoxelType> VoxelFrameworkPlugin for VoxelCorePlugin<V>
Auto Trait Implementations§
impl<V> Forget for VoxelCorePlugin<V>
impl<V> Freeze for VoxelCorePlugin<V>where
PhantomData<V>: Freeze,
impl<V> Move for VoxelCorePlugin<V>
impl<V> RefUnwindSafe for VoxelCorePlugin<V>where
PhantomData<V>: RefUnwindSafe,
impl<V> Send for VoxelCorePlugin<V>where
PhantomData<V>: Send,
impl<V> Sync for VoxelCorePlugin<V>where
PhantomData<V>: Sync,
impl<V> Unpin for VoxelCorePlugin<V>where
PhantomData<V>: Unpin,
impl<V> UnsafeUnpin for VoxelCorePlugin<V>where
PhantomData<V>: UnsafeUnpin,
impl<V> UnwindSafe for VoxelCorePlugin<V>where
PhantomData<V>: UnwindSafe,
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more