cargo fmt
This commit is contained in:
parent
1d5388c4f0
commit
b5d78477cf
@ -1,8 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
stage,
|
|
||||||
plugin::{load_plugin, AppPlugin},
|
plugin::{load_plugin, AppPlugin},
|
||||||
schedule_plan::SchedulePlan,
|
schedule_plan::SchedulePlan,
|
||||||
App, Events,
|
stage, App, Events,
|
||||||
};
|
};
|
||||||
|
|
||||||
use legion::prelude::{Resources, Runnable, Schedulable, Universe, World};
|
use legion::prelude::{Resources, Runnable, Schedulable, Universe, World};
|
||||||
@ -188,10 +187,7 @@ impl AppBuilder {
|
|||||||
T: Send + Sync + 'static,
|
T: Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
self.add_resource(Events::<T>::default())
|
self.add_resource(Events::<T>::default())
|
||||||
.add_system_to_stage(
|
.add_system_to_stage(stage::EVENT_UPDATE, Events::<T>::build_update_system())
|
||||||
stage::EVENT_UPDATE,
|
|
||||||
Events::<T>::build_update_system(),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_resource<T>(&mut self, resource: T) -> &mut Self
|
pub fn add_resource<T>(&mut self, resource: T) -> &mut Self
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use legion::prelude::{Schedulable, SystemBuilder, Resources};
|
use legion::prelude::{Resources, Schedulable, SystemBuilder};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
struct EventInstance<T> {
|
struct EventInstance<T> {
|
||||||
|
@ -45,4 +45,3 @@ pub fn stop_timer_system() -> Box<dyn Schedulable> {
|
|||||||
time.stop();
|
time.stop();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,8 @@ impl Default for ModuleAttributeArgs {
|
|||||||
static MODULE_ATTRIBUTE_NAME: &'static str = "module";
|
static MODULE_ATTRIBUTE_NAME: &'static str = "module";
|
||||||
|
|
||||||
fn get_modules(ast: &DeriveInput) -> Modules {
|
fn get_modules(ast: &DeriveInput) -> Modules {
|
||||||
let module_attribute_args = ast.attrs
|
let module_attribute_args = ast
|
||||||
|
.attrs
|
||||||
.iter()
|
.iter()
|
||||||
.find(|a| a.path.get_ident().as_ref().unwrap().to_string() == MODULE_ATTRIBUTE_NAME)
|
.find(|a| a.path.get_ident().as_ref().unwrap().to_string() == MODULE_ATTRIBUTE_NAME)
|
||||||
.map(|a| {
|
.map(|a| {
|
||||||
|
@ -2,9 +2,9 @@ mod diagnostic;
|
|||||||
pub mod diagnostics;
|
pub mod diagnostics;
|
||||||
pub use diagnostic::*;
|
pub use diagnostic::*;
|
||||||
|
|
||||||
use bevy_app::{AppPlugin, AppBuilder};
|
use bevy_app::{AppBuilder, AppPlugin};
|
||||||
|
use diagnostics::{frame_time_diagnostic_system, print_diagnostics_system};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use diagnostics::{print_diagnostics_system, frame_time_diagnostic_system};
|
|
||||||
|
|
||||||
pub struct DiagnosticsPlugin {
|
pub struct DiagnosticsPlugin {
|
||||||
pub print_wait_duration: Duration,
|
pub print_wait_duration: Duration,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
//! Atomic runtime borrow checking module.
|
//! Atomic runtime borrow checking module.
|
||||||
//! These types implement something akin to `RefCell`, but are atomically handled allowing them to
|
//! These types implement something akin to `RefCell`, but are atomically handled allowing them to
|
||||||
//! cross thread boundaries.
|
//! cross thread boundaries.
|
||||||
|
use std::any::{type_name, Any};
|
||||||
use std::cell::UnsafeCell;
|
use std::cell::UnsafeCell;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::any::{Any, type_name};
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
use std::sync::atomic::AtomicIsize;
|
use std::sync::atomic::AtomicIsize;
|
||||||
@ -17,9 +17,7 @@ pub trait DowncastTypename {
|
|||||||
fn is_typename<T: Any>(&self) -> bool;
|
fn is_typename<T: Any>(&self) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str {
|
pub fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str { type_name::<T>() }
|
||||||
type_name::<T>()
|
|
||||||
}
|
|
||||||
/// A `RefCell` implementation which is thread safe. This type performs all the standard runtime
|
/// A `RefCell` implementation which is thread safe. This type performs all the standard runtime
|
||||||
/// borrow checking which would be familiar from using `RefCell`.
|
/// borrow checking which would be familiar from using `RefCell`.
|
||||||
///
|
///
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use legion_core::borrow::DowncastTypename;
|
|
||||||
use downcast_rs::{impl_downcast, Downcast};
|
use downcast_rs::{impl_downcast, Downcast};
|
||||||
use fxhash::FxHashMap;
|
use fxhash::FxHashMap;
|
||||||
|
use legion_core::borrow::DowncastTypename;
|
||||||
use legion_core::borrow::{AtomicRefCell, Ref, RefMut};
|
use legion_core::borrow::{AtomicRefCell, Ref, RefMut};
|
||||||
use legion_core::query::{Read, ReadOnly, Write};
|
use legion_core::query::{Read, ReadOnly, Write};
|
||||||
use std::{
|
use std::{
|
||||||
any::{Any, type_name},
|
any::{type_name, Any},
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
ops::{Deref, DerefMut},
|
ops::{Deref, DerefMut},
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
use bevy_derive::EntityArchetype;
|
use crate::{
|
||||||
|
mesh::Mesh, shader::uniforms::StandardMaterial, ActiveCamera, ActiveCamera2d, Camera,
|
||||||
|
CameraType, Light, Renderable,
|
||||||
|
};
|
||||||
use bevy_asset::Handle;
|
use bevy_asset::Handle;
|
||||||
use crate::{shader::uniforms::StandardMaterial, mesh::Mesh, Renderable, Light, Camera, ActiveCamera, ActiveCamera2d, CameraType};
|
use bevy_derive::EntityArchetype;
|
||||||
use bevy_transform::components::{Translation, LocalToWorld, Rotation, Scale};
|
use bevy_transform::components::{LocalToWorld, Rotation, Scale, Translation};
|
||||||
|
|
||||||
#[derive(EntityArchetype, Default)]
|
#[derive(EntityArchetype, Default)]
|
||||||
#[module(meta = false)]
|
#[module(meta = false)]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
mod camera;
|
mod camera;
|
||||||
|
pub mod entity;
|
||||||
pub mod mesh;
|
pub mod mesh;
|
||||||
pub mod render_graph;
|
pub mod render_graph;
|
||||||
pub mod shader;
|
pub mod shader;
|
||||||
pub mod entity;
|
|
||||||
|
|
||||||
mod color;
|
mod color;
|
||||||
mod light;
|
mod light;
|
||||||
@ -30,14 +30,12 @@ use self::{
|
|||||||
draw_target::draw_targets::{
|
draw_target::draw_targets::{
|
||||||
AssignedBatchesDrawTarget, AssignedMeshesDrawTarget, MeshesDrawTarget, UiDrawTarget,
|
AssignedBatchesDrawTarget, AssignedMeshesDrawTarget, MeshesDrawTarget, UiDrawTarget,
|
||||||
},
|
},
|
||||||
|
mesh::Mesh,
|
||||||
pass::passes::ForwardPassBuilder,
|
pass::passes::ForwardPassBuilder,
|
||||||
pipeline::{
|
pipeline::{
|
||||||
pipelines::ForwardPipelineBuilder, PipelineCompiler, ShaderPipelineAssignments,
|
pipelines::ForwardPipelineBuilder, PipelineCompiler, PipelineDescriptor,
|
||||||
VertexBufferDescriptors, PipelineDescriptor
|
ShaderPipelineAssignments, VertexBufferDescriptors,
|
||||||
},
|
},
|
||||||
shader::{Shader, uniforms::StandardMaterial},
|
|
||||||
texture::Texture,
|
|
||||||
mesh::Mesh,
|
|
||||||
render_graph::RenderGraph,
|
render_graph::RenderGraph,
|
||||||
render_resource::{
|
render_resource::{
|
||||||
build_entity_render_resource_assignments_system,
|
build_entity_render_resource_assignments_system,
|
||||||
@ -47,11 +45,13 @@ use self::{
|
|||||||
},
|
},
|
||||||
AssetBatchers, EntityRenderResourceAssignments, RenderResourceAssignments,
|
AssetBatchers, EntityRenderResourceAssignments, RenderResourceAssignments,
|
||||||
},
|
},
|
||||||
|
shader::{uniforms::StandardMaterial, Shader},
|
||||||
|
texture::Texture,
|
||||||
};
|
};
|
||||||
|
|
||||||
use bevy_app::{AppBuilder, AppPlugin, GetEventReader, stage};
|
use bevy_app::{stage, AppBuilder, AppPlugin, GetEventReader};
|
||||||
use bevy_transform::prelude::LocalToWorld;
|
|
||||||
use bevy_asset::AssetStorage;
|
use bevy_asset::AssetStorage;
|
||||||
|
use bevy_transform::prelude::LocalToWorld;
|
||||||
use bevy_window::WindowResized;
|
use bevy_window::WindowResized;
|
||||||
|
|
||||||
pub static RENDER_STAGE: &str = "render";
|
pub static RENDER_STAGE: &str = "render";
|
||||||
@ -95,8 +95,7 @@ impl AppPlugin for RenderPlugin {
|
|||||||
fn build(&self, app: &mut AppBuilder) {
|
fn build(&self, app: &mut AppBuilder) {
|
||||||
let mut asset_batchers = AssetBatchers::default();
|
let mut asset_batchers = AssetBatchers::default();
|
||||||
asset_batchers.batch_types2::<Mesh, StandardMaterial>();
|
asset_batchers.batch_types2::<Mesh, StandardMaterial>();
|
||||||
app
|
app.add_system(build_entity_render_resource_assignments_system())
|
||||||
.add_system(build_entity_render_resource_assignments_system())
|
|
||||||
.add_stage_after(stage::UPDATE, RENDER_STAGE)
|
.add_stage_after(stage::UPDATE, RENDER_STAGE)
|
||||||
.add_resource(RenderGraph::default())
|
.add_resource(RenderGraph::default())
|
||||||
.add_resource(AssetStorage::<Mesh>::new())
|
.add_resource(AssetStorage::<Mesh>::new())
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use super::{Color, PerspectiveCamera};
|
use super::{Color, PerspectiveCamera};
|
||||||
|
use bevy_transform::components::Translation;
|
||||||
|
use glam::Mat4;
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
use zerocopy::{AsBytes, FromBytes};
|
use zerocopy::{AsBytes, FromBytes};
|
||||||
use glam::Mat4;
|
|
||||||
use bevy_transform::components::Translation;
|
|
||||||
|
|
||||||
pub struct Light {
|
pub struct Light {
|
||||||
pub color: Color,
|
pub color: Color,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::{Vertex};
|
use crate::Vertex;
|
||||||
use bevy_asset::Asset;
|
use bevy_asset::Asset;
|
||||||
use glam::*;
|
use glam::*;
|
||||||
|
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
use super::{BindType, PipelineDescriptor, PipelineLayout, PipelineLayoutType, VertexBufferDescriptors};
|
use super::{
|
||||||
use bevy_asset::{AssetStorage, Handle};
|
BindType, PipelineDescriptor, PipelineLayout, PipelineLayoutType, VertexBufferDescriptors,
|
||||||
|
};
|
||||||
use crate::{
|
use crate::{
|
||||||
render_resource::{
|
render_resource::{
|
||||||
BufferInfo, RenderResourceAssignments, RenderResourceAssignmentsId, ResourceInfo,
|
BufferInfo, RenderResourceAssignments, RenderResourceAssignmentsId, ResourceInfo,
|
||||||
},
|
},
|
||||||
renderer::Renderer,
|
renderer::Renderer,
|
||||||
Renderable,
|
|
||||||
shader::{Shader, ShaderSource},
|
shader::{Shader, ShaderSource},
|
||||||
|
Renderable,
|
||||||
};
|
};
|
||||||
|
use bevy_asset::{AssetStorage, Handle};
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
use legion::prelude::*;
|
use legion::prelude::*;
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
use super::RenderGraphBuilder;
|
use super::RenderGraphBuilder;
|
||||||
use crate::{
|
use crate::{
|
||||||
{
|
|
||||||
draw_target::DrawTarget,
|
draw_target::DrawTarget,
|
||||||
pass::PassDescriptor,
|
pass::PassDescriptor,
|
||||||
pipeline::{PipelineCompiler, PipelineDescriptor},
|
pipeline::{PipelineCompiler, PipelineDescriptor},
|
||||||
render_resource::ResourceProvider,
|
render_resource::ResourceProvider,
|
||||||
renderer::Renderer,
|
renderer::Renderer,
|
||||||
texture::TextureDescriptor,
|
|
||||||
shader::Shader,
|
shader::Shader,
|
||||||
},
|
texture::TextureDescriptor,
|
||||||
};
|
};
|
||||||
use bevy_asset::{AssetStorage, Handle};
|
use bevy_asset::{AssetStorage, Handle};
|
||||||
use legion::prelude::*;
|
use legion::prelude::*;
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
use super::RenderGraph;
|
use super::RenderGraph;
|
||||||
use crate::{
|
use crate::{
|
||||||
{
|
|
||||||
draw_target::DrawTarget,
|
draw_target::DrawTarget,
|
||||||
pass::PassDescriptor,
|
pass::PassDescriptor,
|
||||||
pipeline::{PipelineBuilder, PipelineDescriptor},
|
pipeline::{PipelineBuilder, PipelineDescriptor},
|
||||||
render_resource::ResourceProvider,
|
render_resource::ResourceProvider,
|
||||||
texture::TextureDescriptor,
|
|
||||||
shader::Shader,
|
shader::Shader,
|
||||||
},
|
texture::TextureDescriptor,
|
||||||
};
|
};
|
||||||
|
|
||||||
use bevy_asset::AssetStorage;
|
use bevy_asset::AssetStorage;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use bevy_asset::{Handle, HandleUntyped};
|
|
||||||
use crate::render_resource::RenderResourceAssignments;
|
use crate::render_resource::RenderResourceAssignments;
|
||||||
|
use bevy_asset::{Handle, HandleUntyped};
|
||||||
use legion::prelude::Entity;
|
use legion::prelude::Entity;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use bevy_asset::Handle;
|
|
||||||
use crate::{mesh::Mesh, texture::Texture};
|
use crate::{mesh::Mesh, texture::Texture};
|
||||||
|
use bevy_asset::Handle;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Hash, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Hash, Debug, Eq, PartialEq)]
|
||||||
|
@ -9,9 +9,9 @@ use crate::{
|
|||||||
ActiveCamera, Camera,
|
ActiveCamera, Camera,
|
||||||
};
|
};
|
||||||
|
|
||||||
use bevy_app::{Events, EventReader};
|
use bevy_app::{EventReader, Events};
|
||||||
use legion::prelude::*;
|
|
||||||
use bevy_transform::prelude::*;
|
use bevy_transform::prelude::*;
|
||||||
|
use legion::prelude::*;
|
||||||
use zerocopy::AsBytes;
|
use zerocopy::AsBytes;
|
||||||
|
|
||||||
pub struct CameraResourceProvider {
|
pub struct CameraResourceProvider {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use bevy_window::Windows;
|
|
||||||
use crate::{
|
use crate::{
|
||||||
render_resource::{RenderResourceAssignments, ResourceProvider},
|
render_resource::{RenderResourceAssignments, ResourceProvider},
|
||||||
renderer::Renderer,
|
renderer::Renderer,
|
||||||
texture::TextureDescriptor,
|
texture::TextureDescriptor,
|
||||||
};
|
};
|
||||||
|
use bevy_window::Windows;
|
||||||
use legion::prelude::*;
|
use legion::prelude::*;
|
||||||
|
|
||||||
pub struct FrameTextureResourceProvider {
|
pub struct FrameTextureResourceProvider {
|
||||||
|
@ -6,8 +6,7 @@ use crate::{
|
|||||||
},
|
},
|
||||||
renderer::Renderer,
|
renderer::Renderer,
|
||||||
shader::AsUniforms,
|
shader::AsUniforms,
|
||||||
Renderable,
|
Renderable, Vertex,
|
||||||
Vertex,
|
|
||||||
};
|
};
|
||||||
use bevy_asset::{AssetStorage, Handle};
|
use bevy_asset::{AssetStorage, Handle};
|
||||||
use legion::{filter::*, prelude::*};
|
use legion::{filter::*, prelude::*};
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use bevy_asset::{AssetStorage, Handle};
|
|
||||||
use legion::prelude::*;
|
|
||||||
use crate::{
|
use crate::{
|
||||||
pipeline::PipelineDescriptor,
|
pipeline::PipelineDescriptor,
|
||||||
render_resource::{
|
render_resource::{
|
||||||
@ -8,6 +6,8 @@ use crate::{
|
|||||||
shader::Shader,
|
shader::Shader,
|
||||||
texture::{SamplerDescriptor, TextureDescriptor},
|
texture::{SamplerDescriptor, TextureDescriptor},
|
||||||
};
|
};
|
||||||
|
use bevy_asset::{AssetStorage, Handle};
|
||||||
|
use legion::prelude::*;
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
|
|
||||||
pub trait Renderer {
|
pub trait Renderer {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
use crate::shader::ShaderDefSuffixProvider;
|
||||||
use bevy_asset::{Asset, Handle};
|
use bevy_asset::{Asset, Handle};
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use crate::shader::ShaderDefSuffixProvider;
|
|
||||||
|
|
||||||
pub enum TextureType {
|
pub enum TextureType {
|
||||||
Data(Vec<u8>, usize, usize),
|
Data(Vec<u8>, usize, usize),
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use std::convert::From;
|
use std::convert::From;
|
||||||
use zerocopy::{AsBytes, FromBytes};
|
use zerocopy::{AsBytes, FromBytes};
|
||||||
|
|
||||||
use bevy_derive::Uniforms;
|
|
||||||
use bevy_core;
|
|
||||||
use bevy_asset;
|
use bevy_asset;
|
||||||
|
use bevy_core;
|
||||||
|
use bevy_derive::Uniforms;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Clone, Copy, AsBytes, FromBytes, Uniforms)]
|
#[derive(Clone, Copy, AsBytes, FromBytes, Uniforms)]
|
||||||
|
@ -33,10 +33,6 @@ impl From<&mut Vec3> for NonUniformScale {
|
|||||||
impl fmt::Display for NonUniformScale {
|
impl fmt::Display for NonUniformScale {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
let (x, y, z) = self.0.into();
|
let (x, y, z) = self.0.into();
|
||||||
write!(
|
write!(f, "NonUniformScale({}, {}, {})", x, y, z)
|
||||||
f,
|
|
||||||
"NonUniformScale({}, {}, {})",
|
|
||||||
x, y, z
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,7 @@ use std::collections::HashMap;
|
|||||||
pub fn build(_: &mut World) -> Vec<Box<dyn Schedulable>> {
|
pub fn build(_: &mut World) -> Vec<Box<dyn Schedulable>> {
|
||||||
let missing_previous_parent_system = SystemBuilder::<()>::new("MissingPreviousParentSystem")
|
let missing_previous_parent_system = SystemBuilder::<()>::new("MissingPreviousParentSystem")
|
||||||
// Entities with missing `PreviousParent`
|
// Entities with missing `PreviousParent`
|
||||||
.with_query(<Read<Parent>>::query().filter(
|
.with_query(<Read<Parent>>::query().filter(!component::<PreviousParent>()))
|
||||||
!component::<PreviousParent>(),
|
|
||||||
))
|
|
||||||
.build(move |commands, world, _resource, query| {
|
.build(move |commands, world, _resource, query| {
|
||||||
// Add missing `PreviousParent` components
|
// Add missing `PreviousParent` components
|
||||||
for (entity, _parent) in query.iter_entities(world) {
|
for (entity, _parent) in query.iter_entities(world) {
|
||||||
@ -21,9 +19,7 @@ pub fn build(_: &mut World) -> Vec<Box<dyn Schedulable>> {
|
|||||||
// Entities with a removed `Parent`
|
// Entities with a removed `Parent`
|
||||||
.with_query(<Read<PreviousParent>>::query().filter(!component::<Parent>()))
|
.with_query(<Read<PreviousParent>>::query().filter(!component::<Parent>()))
|
||||||
// Entities with a changed `Parent`
|
// Entities with a changed `Parent`
|
||||||
.with_query(<(Read<Parent>, Write<PreviousParent>)>::query().filter(
|
.with_query(<(Read<Parent>, Write<PreviousParent>)>::query().filter(changed::<Parent>()))
|
||||||
changed::<Parent>(),
|
|
||||||
))
|
|
||||||
// Deleted Parents (ie Entities with `Children` and without a `LocalToWorld`).
|
// Deleted Parents (ie Entities with `Children` and without a `LocalToWorld`).
|
||||||
.write_component::<Children>()
|
.write_component::<Children>()
|
||||||
.build(move |commands, world, _resource, queries| {
|
.build(move |commands, world, _resource, queries| {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
pub use legion as ecs;
|
|
||||||
pub use glam as math;
|
pub use glam as math;
|
||||||
|
pub use legion as ecs;
|
||||||
|
|
||||||
pub mod components;
|
pub mod components;
|
||||||
pub mod hierarchy_maintenance_system;
|
pub mod hierarchy_maintenance_system;
|
||||||
@ -9,10 +9,8 @@ pub mod local_to_world_system;
|
|||||||
pub mod transform_system_bundle;
|
pub mod transform_system_bundle;
|
||||||
|
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use crate::components::*;
|
pub use crate::{
|
||||||
pub use crate::hierarchy_maintenance_system;
|
components::*, hierarchy_maintenance_system, local_to_parent_system,
|
||||||
pub use crate::local_to_parent_system;
|
local_to_world_propagate_system, local_to_world_system, transform_system_bundle,
|
||||||
pub use crate::local_to_world_propagate_system;
|
};
|
||||||
pub use crate::local_to_world_system;
|
|
||||||
pub use crate::transform_system_bundle;
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
use crate::{components::*, ecs::prelude::*, math::{Mat4, Vec3, Quat}};
|
use crate::{
|
||||||
|
components::*,
|
||||||
|
ecs::prelude::*,
|
||||||
|
math::{Mat4, Quat, Vec3},
|
||||||
|
};
|
||||||
|
|
||||||
pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
||||||
SystemBuilder::<()>::new("LocalToParentUpdateSystem")
|
SystemBuilder::<()>::new("LocalToParentUpdateSystem")
|
||||||
@ -126,7 +130,8 @@ pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
|||||||
s.spawn(|_| unsafe {
|
s.spawn(|_| unsafe {
|
||||||
// Scale
|
// Scale
|
||||||
c.for_each_unchecked(world, |(mut ltw, scale)| {
|
c.for_each_unchecked(world, |(mut ltw, scale)| {
|
||||||
*ltw = LocalToParent(Mat4::from_scale(Vec3::new(scale.0, scale.0, scale.0)));
|
*ltw =
|
||||||
|
LocalToParent(Mat4::from_scale(Vec3::new(scale.0, scale.0, scale.0)));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
s.spawn(|_| unsafe {
|
s.spawn(|_| unsafe {
|
||||||
@ -137,9 +142,10 @@ pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
|||||||
|
|
||||||
// Translation + Rotation
|
// Translation + Rotation
|
||||||
e.for_each_unchecked(world, |(mut ltw, translation, rotation)| {
|
e.for_each_unchecked(world, |(mut ltw, translation, rotation)| {
|
||||||
*ltw = LocalToParent(
|
*ltw = LocalToParent(Mat4::from_rotation_translation(
|
||||||
Mat4::from_rotation_translation(rotation.0, translation.0)
|
rotation.0,
|
||||||
);
|
translation.0,
|
||||||
|
));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
s.spawn(|_| unsafe {
|
s.spawn(|_| unsafe {
|
||||||
@ -282,63 +288,42 @@ mod test {
|
|||||||
.get_component::<LocalToParent>(translation_and_scale)
|
.get_component::<LocalToParent>(translation_and_scale)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(Vec3::new(s.0, s.0, s.0), Quat::default(), t.0)
|
||||||
Vec3::new(s.0, s.0, s.0),
|
|
||||||
Quat::default(),
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToParent>(translation_and_nus)
|
.get_component::<LocalToParent>(translation_and_nus)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(nus.0, Quat::default(), t.0)
|
||||||
nus.0,
|
|
||||||
Quat::default(),
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToParent>(rotation_scale)
|
.get_component::<LocalToParent>(rotation_scale)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(Vec3::new(s.0, s.0, s.0), r.0, Vec3::default())
|
||||||
Vec3::new(s.0, s.0, s.0),
|
|
||||||
r.0,
|
|
||||||
Vec3::default()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world.get_component::<LocalToParent>(rotation_nus).unwrap().0,
|
world
|
||||||
Mat4::from_scale_rotation_translation(
|
.get_component::<LocalToParent>(rotation_nus)
|
||||||
nus.0,
|
.unwrap()
|
||||||
r.0,
|
.0,
|
||||||
Vec3::default()
|
Mat4::from_scale_rotation_translation(nus.0, r.0, Vec3::default())
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToParent>(translation_rotation_scale)
|
.get_component::<LocalToParent>(translation_rotation_scale)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(Vec3::new(s.0, s.0, s.0), r.0, t.0)
|
||||||
Vec3::new(s.0, s.0, s.0),
|
|
||||||
r.0,
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToParent>(translation_rotation_nus)
|
.get_component::<LocalToParent>(translation_rotation_nus)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(nus.0, r.0, t.0)
|
||||||
nus.0,
|
|
||||||
r.0,
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
use crate::{components::*, ecs::{prelude::*, systems::SubWorld}};
|
use crate::{
|
||||||
|
components::*,
|
||||||
|
ecs::{prelude::*, systems::SubWorld},
|
||||||
|
};
|
||||||
|
|
||||||
pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
||||||
SystemBuilder::<()>::new("LocalToWorldPropagateSystem")
|
SystemBuilder::<()>::new("LocalToWorldPropagateSystem")
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
use crate::{components::*, ecs::prelude::*, math::{Mat4, Vec3, Quat}};
|
use crate::{
|
||||||
|
components::*,
|
||||||
|
ecs::prelude::*,
|
||||||
|
math::{Mat4, Quat, Vec3},
|
||||||
|
};
|
||||||
|
|
||||||
pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
||||||
SystemBuilder::<()>::new("LocalToWorldUpdateSystem")
|
SystemBuilder::<()>::new("LocalToWorldUpdateSystem")
|
||||||
@ -152,9 +156,10 @@ pub fn build(_: &mut World) -> Box<dyn Schedulable> {
|
|||||||
s.spawn(|_| unsafe {
|
s.spawn(|_| unsafe {
|
||||||
// Translation + Rotation
|
// Translation + Rotation
|
||||||
e.for_each_unchecked(world, |(mut ltw, translation, rotation)| {
|
e.for_each_unchecked(world, |(mut ltw, translation, rotation)| {
|
||||||
*ltw = LocalToWorld(
|
*ltw = LocalToWorld(Mat4::from_rotation_translation(
|
||||||
Mat4::from_rotation_translation(rotation.0, translation.0)
|
rotation.0,
|
||||||
);
|
translation.0,
|
||||||
|
));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
s.spawn(|_| unsafe {
|
s.spawn(|_| unsafe {
|
||||||
@ -304,63 +309,39 @@ mod test {
|
|||||||
.get_component::<LocalToWorld>(translation_and_scale)
|
.get_component::<LocalToWorld>(translation_and_scale)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(Vec3::new(s.0, s.0, s.0), Quat::default(), t.0)
|
||||||
Vec3::new(s.0, s.0, s.0),
|
|
||||||
Quat::default(),
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToWorld>(translation_and_nus)
|
.get_component::<LocalToWorld>(translation_and_nus)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(nus.0, Quat::default(), t.0)
|
||||||
nus.0,
|
|
||||||
Quat::default(),
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToWorld>(rotation_scale)
|
.get_component::<LocalToWorld>(rotation_scale)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(Vec3::new(s.0, s.0, s.0), r.0, Vec3::default())
|
||||||
Vec3::new(s.0, s.0, s.0),
|
|
||||||
r.0,
|
|
||||||
Vec3::default()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world.get_component::<LocalToWorld>(rotation_nus).unwrap().0,
|
world.get_component::<LocalToWorld>(rotation_nus).unwrap().0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(nus.0, r.0, Vec3::default())
|
||||||
nus.0,
|
|
||||||
r.0,
|
|
||||||
Vec3::default()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToWorld>(translation_rotation_scale)
|
.get_component::<LocalToWorld>(translation_rotation_scale)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(Vec3::new(s.0, s.0, s.0), r.0, t.0)
|
||||||
Vec3::new(s.0, s.0, s.0),
|
|
||||||
r.0,
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
world
|
world
|
||||||
.get_component::<LocalToWorld>(translation_rotation_nus)
|
.get_component::<LocalToWorld>(translation_rotation_nus)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.0,
|
.0,
|
||||||
Mat4::from_scale_rotation_translation(
|
Mat4::from_scale_rotation_translation(nus.0, r.0, t.0)
|
||||||
nus.0,
|
|
||||||
r.0,
|
|
||||||
t.0
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use bevy_derive::EntityArchetype;
|
|
||||||
use super::Node;
|
use super::Node;
|
||||||
|
use bevy_derive::EntityArchetype;
|
||||||
|
|
||||||
#[derive(EntityArchetype)]
|
#[derive(EntityArchetype)]
|
||||||
#[module(meta = false)]
|
#[module(meta = false)]
|
||||||
|
@ -7,7 +7,7 @@ pub use wgpu_render_pass::*;
|
|||||||
pub use wgpu_renderer::*;
|
pub use wgpu_renderer::*;
|
||||||
pub use wgpu_resources::*;
|
pub use wgpu_resources::*;
|
||||||
|
|
||||||
use bevy_app::{AppPlugin, AppBuilder, Events};
|
use bevy_app::{AppBuilder, AppPlugin, Events};
|
||||||
use bevy_render::{renderer::Renderer, RENDER_STAGE};
|
use bevy_render::{renderer::Renderer, RENDER_STAGE};
|
||||||
use bevy_window::{WindowCreated, WindowResized};
|
use bevy_window::{WindowCreated, WindowResized};
|
||||||
use legion::prelude::*;
|
use legion::prelude::*;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
use super::{wgpu_type_converter::{OwnedWgpuVertexBufferDescriptor, WgpuInto}, WgpuRenderPass, WgpuResources};
|
use super::{
|
||||||
|
wgpu_type_converter::{OwnedWgpuVertexBufferDescriptor, WgpuInto},
|
||||||
|
WgpuRenderPass, WgpuResources,
|
||||||
|
};
|
||||||
use bevy_app::{EventReader, Events};
|
use bevy_app::{EventReader, Events};
|
||||||
use bevy_asset::{AssetStorage, Handle};
|
use bevy_asset::{AssetStorage, Handle};
|
||||||
use bevy_render::{
|
use bevy_render::{
|
||||||
@ -201,10 +204,18 @@ impl WgpuRenderer {
|
|||||||
attachment,
|
attachment,
|
||||||
clear_depth: depth_stencil_attachment_descriptor.clear_depth,
|
clear_depth: depth_stencil_attachment_descriptor.clear_depth,
|
||||||
clear_stencil: depth_stencil_attachment_descriptor.clear_stencil,
|
clear_stencil: depth_stencil_attachment_descriptor.clear_stencil,
|
||||||
depth_load_op: depth_stencil_attachment_descriptor.depth_load_op.wgpu_into(),
|
depth_load_op: depth_stencil_attachment_descriptor
|
||||||
depth_store_op: depth_stencil_attachment_descriptor.depth_store_op.wgpu_into(),
|
.depth_load_op
|
||||||
stencil_load_op: depth_stencil_attachment_descriptor.stencil_load_op.wgpu_into(),
|
.wgpu_into(),
|
||||||
stencil_store_op: depth_stencil_attachment_descriptor.stencil_store_op.wgpu_into(),
|
depth_store_op: depth_stencil_attachment_descriptor
|
||||||
|
.depth_store_op
|
||||||
|
.wgpu_into(),
|
||||||
|
stencil_load_op: depth_stencil_attachment_descriptor
|
||||||
|
.stencil_load_op
|
||||||
|
.wgpu_into(),
|
||||||
|
stencil_store_op: depth_stencil_attachment_descriptor
|
||||||
|
.stencil_store_op
|
||||||
|
.wgpu_into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,8 +198,10 @@ impl WgpuResources {
|
|||||||
let device_rc = renderer.device.clone();
|
let device_rc = renderer.device.clone();
|
||||||
let device = device_rc.borrow();
|
let device = device_rc.borrow();
|
||||||
|
|
||||||
let mut mapped =
|
let mut mapped = device.create_buffer_mapped(
|
||||||
device.create_buffer_mapped(buffer_info.size as usize, buffer_info.buffer_usage.wgpu_into());
|
buffer_info.size as usize,
|
||||||
|
buffer_info.buffer_usage.wgpu_into(),
|
||||||
|
);
|
||||||
setup_data(&mut mapped.data, renderer);
|
setup_data(&mut mapped.data, renderer);
|
||||||
mapped.finish()
|
mapped.finish()
|
||||||
}
|
}
|
||||||
|
@ -22,19 +22,19 @@ pub trait WgpuFrom<T> {
|
|||||||
fn from(val: T) -> Self;
|
fn from(val: T) -> Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait WgpuInto<U>
|
pub trait WgpuInto<U> {
|
||||||
{
|
|
||||||
fn wgpu_into(self) -> U;
|
fn wgpu_into(self) -> U;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T, U> WgpuInto<U> for T where U: WgpuFrom<T>
|
impl<T, U> WgpuInto<U> for T
|
||||||
|
where
|
||||||
|
U: WgpuFrom<T>,
|
||||||
{
|
{
|
||||||
fn wgpu_into(self) -> U {
|
fn wgpu_into(self) -> U {
|
||||||
U::from(self)
|
U::from(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
impl WgpuFrom<VertexFormat> for wgpu::VertexFormat {
|
impl WgpuFrom<VertexFormat> for wgpu::VertexFormat {
|
||||||
fn from(val: VertexFormat) -> Self {
|
fn from(val: VertexFormat) -> Self {
|
||||||
match val {
|
match val {
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
mod events;
|
mod events;
|
||||||
mod window;
|
mod window;
|
||||||
mod windows;
|
mod windows;
|
||||||
#[cfg(feature = "winit")]
|
|
||||||
pub mod winit;
|
|
||||||
|
|
||||||
pub use events::*;
|
pub use events::*;
|
||||||
pub use window::*;
|
pub use window::*;
|
||||||
pub use windows::*;
|
pub use windows::*;
|
||||||
|
|
||||||
use bevy_app::{AppPlugin, AppBuilder, Events};
|
use bevy_app::{AppBuilder, AppPlugin, Events};
|
||||||
|
|
||||||
pub struct WindowPlugin {
|
pub struct WindowPlugin {
|
||||||
pub primary_window: Option<WindowDescriptor>,
|
pub primary_window: Option<WindowDescriptor>,
|
||||||
@ -24,14 +22,14 @@ impl Default for WindowPlugin {
|
|||||||
|
|
||||||
impl AppPlugin for WindowPlugin {
|
impl AppPlugin for WindowPlugin {
|
||||||
fn build(&self, app: &mut AppBuilder) {
|
fn build(&self, app: &mut AppBuilder) {
|
||||||
app
|
app.add_event::<WindowResized>()
|
||||||
.add_event::<WindowResized>()
|
|
||||||
.add_event::<CreateWindow>()
|
.add_event::<CreateWindow>()
|
||||||
.add_event::<WindowCreated>()
|
.add_event::<WindowCreated>()
|
||||||
.add_resource(Windows::default());
|
.add_resource(Windows::default());
|
||||||
|
|
||||||
if let Some(ref primary_window_descriptor) = self.primary_window {
|
if let Some(ref primary_window_descriptor) = self.primary_window {
|
||||||
let mut create_window_event = app.resources().get_mut::<Events<CreateWindow>>().unwrap();
|
let mut create_window_event =
|
||||||
|
app.resources().get_mut::<Events<CreateWindow>>().unwrap();
|
||||||
create_window_event.send(CreateWindow {
|
create_window_event.send(CreateWindow {
|
||||||
descriptor: primary_window_descriptor.clone(),
|
descriptor: primary_window_descriptor.clone(),
|
||||||
});
|
});
|
||||||
|
@ -7,7 +7,9 @@ pub fn convert_keyboard_input(keyboard_input: &winit::event::KeyboardInput) -> K
|
|||||||
KeyboardInput {
|
KeyboardInput {
|
||||||
scan_code: keyboard_input.scancode,
|
scan_code: keyboard_input.scancode,
|
||||||
state: convert_element_state(keyboard_input.state),
|
state: convert_element_state(keyboard_input.state),
|
||||||
virtual_key_code: keyboard_input.virtual_keycode.map(|v| convert_virtual_key_code(v)),
|
virtual_key_code: keyboard_input
|
||||||
|
.virtual_keycode
|
||||||
|
.map(|v| convert_virtual_key_code(v)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
use bevy::{input::mouse::{MouseButtonInput, MouseMotion}, prelude::*};
|
use bevy::{
|
||||||
|
input::mouse::{MouseButtonInput, MouseMotion},
|
||||||
|
prelude::*,
|
||||||
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
App::build()
|
App::build()
|
||||||
@ -14,7 +17,10 @@ pub fn mouse_input_system(resources: &mut Resources) -> Box<dyn Schedulable> {
|
|||||||
.read_resource::<Events<MouseButtonInput>>()
|
.read_resource::<Events<MouseButtonInput>>()
|
||||||
.read_resource::<Events<MouseMotion>>()
|
.read_resource::<Events<MouseMotion>>()
|
||||||
.build(
|
.build(
|
||||||
move |_command_buffer, _world, (mouse_button_input_events, mouse_motion_events), _queries| {
|
move |_command_buffer,
|
||||||
|
_world,
|
||||||
|
(mouse_button_input_events, mouse_motion_events),
|
||||||
|
_queries| {
|
||||||
for event in mouse_button_input_events.iter(&mut mouse_button_input_event_reader) {
|
for event in mouse_button_input_events.iter(&mut mouse_button_input_event_reader) {
|
||||||
println!("{:?}", event);
|
println!("{:?}", event);
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,7 @@ pub trait AddDefaultPlugins {
|
|||||||
|
|
||||||
impl AddDefaultPlugins for AppBuilder {
|
impl AddDefaultPlugins for AppBuilder {
|
||||||
fn add_default_plugins(&mut self) -> &mut Self {
|
fn add_default_plugins(&mut self) -> &mut Self {
|
||||||
self
|
self.add_plugin(bevy_core::CorePlugin::default())
|
||||||
.add_plugin(bevy_core::CorePlugin::default())
|
|
||||||
.add_plugin(bevy_input::InputPlugin::default())
|
.add_plugin(bevy_input::InputPlugin::default())
|
||||||
.add_plugin(bevy_window::WindowPlugin::default())
|
.add_plugin(bevy_window::WindowPlugin::default())
|
||||||
.add_plugin(bevy_render::RenderPlugin::default())
|
.add_plugin(bevy_render::RenderPlugin::default())
|
||||||
@ -41,12 +40,9 @@ impl AddDefaultPlugins for AppBuilder {
|
|||||||
|
|
||||||
#[cfg(feature = "bevy_wgpu")]
|
#[cfg(feature = "bevy_wgpu")]
|
||||||
{
|
{
|
||||||
self.add_plugin(
|
self.add_plugin(bevy_wgpu::WgpuRendererPlugin::default());
|
||||||
bevy_wgpu::WgpuRendererPlugin::default(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user