This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! Renders a lot of `Text2dBundle`s and adds `Aabb`s so they get automatically culled when out of view. | |
use bevy::{ | |
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}, | |
math::Vec3A, | |
prelude::*, | |
render::primitives::Aabb, | |
text::TextLayoutInfo, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def filter(cond): map(select(cond)); | |
.[] | [ | |
.number, | |
(.reviews | filter(.state=="APPROVED") | unique_by(.author.login) | length), | |
(.labels | any(.name == "S-Ready-For-Final-Review" or .name == "S-Blocked" or .name == "S-Needs-Benchmarking" or .name == "S-Needs-Design" or .name == "S-Adopt-Me" or .name == "S-Needs-RFC" ) | not) | |
] | select((.[1] >= 2) and .[2]) | ("<a href=\"https://github.com/bevyengine/bevy/pull/" + (.[0] | tostring) + "\">" + (.[0] | tostring) + "</a><br/>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! This example demonstrates the built-in 3d shapes in Bevy. | |
//! The scene includes a patterned texture and a rotation for visualizing the normals and UVs. | |
use std::f32::consts::PI; | |
use bevy::{ | |
input::common_conditions::input_just_pressed, | |
pbr::wireframe::{Wireframe, WireframePlugin}, | |
prelude::*, | |
render::{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bevy::{ | |
prelude::*, | |
render::{ | |
mesh::VertexAttributeValues, | |
texture::{ImageAddressMode, ImageLoaderSettings, ImageSampler, ImageSamplerDescriptor}, | |
}, | |
sprite::MaterialMesh2dBundle, | |
}; | |
fn main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This sort of thing will be built into Bevy in version 0.14 by meshing the new `Annulus` primitive. | |
pub fn hollow_circle(inner_radius: f32, thickness: f32, sides: usize) -> Mesh { | |
let outer_radius = inner_radius + thickness; | |
debug_assert!(sides > 2, "hollow_circle requires at least 3 sides."); | |
let vertices = sides * 2; | |
let mut positions = Vec::with_capacity(vertices); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bevy::{ | |
color::palettes::basic, | |
prelude::*, | |
scene::{SceneInstance, SceneInstanceReady}, | |
}; | |
/// A marker component that we will add to the particular fox that we want to be red. | |
#[derive(Component)] | |
struct RedFox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs | |
index 8c79494de..7bd737744 100644 | |
--- a/crates/bevy_winit/src/lib.rs | |
+++ b/crates/bevy_winit/src/lib.rs | |
@@ -47,6 +47,9 @@ use bevy_window::{ | |
#[cfg(target_os = "android")] | |
pub use winit::platform::android::activity::AndroidApp; | |
+#[cfg(target_os = "macos")] | |
+use winit::platform::macos::EventLoopBuilderExtMacOS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/render/shaders/tilemap_fragment.wgsl b/src/render/shaders/tilemap_fragment.wgsl | |
index be535aa..e515117 100644 | |
--- a/src/render/shaders/tilemap_fragment.wgsl | |
+++ b/src/render/shaders/tilemap_fragment.wgsl | |
@@ -1,15 +1,9 @@ | |
+#import bevy_ecs_tilemap::vertex_output MeshVertexOutput | |
+#import bevy_ecs_tilemap::common tilemap_data | |
#import bevy_ecs_tilemap::common sprite_texture, sprite_sampler | |
-struct VertexOutput { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/cyberpunk.rs b/examples/cyberpunk.rs | |
index 1d27172..45ff7eb 100644 | |
--- a/examples/cyberpunk.rs | |
+++ b/examples/cyberpunk.rs | |
@@ -1,9 +1,11 @@ | |
use bevy::prelude::*; | |
use bevy_parallax::{ | |
- LayerData, LayerSpeed, ParallaxCameraComponent, ParallaxMoveEvent, ParallaxPlugin, | |
- ParallaxResource, | |
+ LayerComponent, LayerData, LayerSpeed, ParallaxCameraComponent, ParallaxMoveEvent, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mashup of | |
// https://github.com/mvlabat/bevy_egui/blob/v0.19.0/examples/simple.rs | |
// https://github.com/bevyengine/bevy/blob/v0.9.1/examples/3d/3d_scene.rs | |
// In cargo.toml: | |
// [dependencies] | |
// bevy = "0.9" | |
// bevy_egui = "0.19" | |
use bevy::prelude::*; |
NewerOlder