Skip to content

Commit

Permalink
use wgpu example as base
Browse files Browse the repository at this point in the history
  • Loading branch information
cart committed Dec 1, 2019
1 parent 515be6c commit cd60778
Show file tree
Hide file tree
Showing 15 changed files with 1,093 additions and 130 deletions.
12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ authors = ["Carter Anderson <[email protected]>"]
edition = "2018"

[dependencies]
# legion = { git = "https://github.com/TomGillen/legion.git" }
legion = { git = "https://github.com/jaynus/legion.git" }
legion = { git = "https://github.com/TomGillen/legion.git" }
nalgebra = "0.18"
wgpu = "0.4.0"
winit = "0.20.0-alpha4"
wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "44fa1bc2fa208fa92f80944253e0da56cb7ac1fe"}
winit = "0.20.0-alpha4"
glsl-to-spirv = "0.1"
cgmath = "0.17"
zerocopy = "0.2"
log = "0.4"
env_logger = "0.7"
19 changes: 11 additions & 8 deletions examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
use legion::prelude::*;
use bevy::{Application, Transform};

use legion::prelude::*;

struct SimpleApp;

impl Application for SimpleApp {
fn update(&self) {}
}

fn main() {
let app = SimpleApp {};
Application::run();
// Create a world to store our entities
let universe = Universe::new();
let mut world = universe.create_world();
world.insert((), vec![(Transform::new(),)]);
app.start();

// Create a query which finds all `Position` and `Velocity` components
let mut query = Read::<Transform>::query();


// // Iterate through all entities that match the query in the world
for mut trans in query.iter(&mut world) {
// println!("{} hi", trans.global);
}
}
Loading

0 comments on commit cd60778

Please sign in to comment.