Skip to content

Commit

Permalink
Merge pull request #31 from thombruce/revert-30-feat/pixels
Browse files Browse the repository at this point in the history
Revert "Pixels"
  • Loading branch information
thombruce authored Oct 4, 2023
2 parents b595033 + bb72d32 commit d431de4
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 392 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Pixelation shader for retro effect

## [0.0.10] - 2023-10-04

### Added
Expand Down
27 changes: 0 additions & 27 deletions assets/shaders/chromatic_abberation.wgsl

This file was deleted.

29 changes: 0 additions & 29 deletions assets/shaders/pixelate.wgsl

This file was deleted.

17 changes: 3 additions & 14 deletions src/camera.rs
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
use bevy::prelude::*;

use crate::{
shader::{PixelateSettings, ShaderPlugin},
ship::Ship,
state::AppState,
};
use crate::{ship::Ship, state::AppState};

pub struct CameraPlugin;
impl Plugin for CameraPlugin {
fn build(&self, app: &mut App) {
app.add_plugins(ShaderPlugin);
app.add_systems(Startup, setup);
app.add_systems(Update, follow_player.run_if(in_state(AppState::Active)));
}
}

fn setup(mut commands: Commands) {
commands.spawn((
Camera2dBundle::default(),
PixelateSettings {
block_size: 3.25,
..default()
},
Name::new("Main Camera"),
));
// Spawns game camera
commands.spawn((Camera2dBundle::default(), Name::new("Main Camera")));
}

pub fn follow_player(
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ mod orbit;
mod pause;
mod planet;
mod planetary_system;
mod shader;
mod ship;
mod star;
mod state;
Expand Down
Loading

0 comments on commit d431de4

Please sign in to comment.