mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 12:13:25 +00:00
remove tiny town
This commit is contained in:
parent
03c1ec3405
commit
6bdf0a5e14
3 changed files with 0 additions and 61 deletions
|
@ -1,10 +0,0 @@
|
|||
[package]
|
||||
name = "tiny-town"
|
||||
version = "0.1.0"
|
||||
authors = ["Carter Anderson <mcanders1@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bevy = { path = "../" }
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
|
||||
```bash
|
||||
# run using one of these commands
|
||||
# lld linker makes compiles faster
|
||||
# rust backtrace gives you a nice backtrace on panics
|
||||
# -Zshare-generics=y makes generics slightly faster for some reason
|
||||
env RUSTFLAGS="-C link-arg=-fuse-ld=lld" cargo run --release
|
||||
env RUSTFLAGS="-C link-arg=-fuse-ld=lld -Zshare-generics=y" RUST_BACKTRACE=1 cargo run --release
|
||||
```
|
|
@ -1,41 +0,0 @@
|
|||
use bevy::*;
|
||||
use bevy::{render::mesh::{Mesh, MeshType}, asset::{Asset, AssetStorage}, temp::*, math};
|
||||
use std::clone::Clone;
|
||||
|
||||
fn main() {
|
||||
let universe = Universe::new();
|
||||
let mut world = universe.create_world();
|
||||
// Create a query which finds all `Position` and `Velocity` components
|
||||
// let mut query = Read::<Transform>::query();
|
||||
let cube = Mesh::load(MeshType::Cube);
|
||||
let plane = Mesh::load(MeshType::Plane{ size: 10 });
|
||||
let mut mesh_storage = AssetStorage::<Mesh, MeshType>::new();
|
||||
|
||||
// this currently breaks because Arcs cant be modified after they are cloned :(
|
||||
let mesh_handle = mesh_storage.add(cube);
|
||||
let plane_handle = mesh_storage.add(plane);
|
||||
world.resources.insert(mesh_storage);
|
||||
|
||||
world.insert((), vec![
|
||||
(
|
||||
Material { color: math::vec4(0.0, 1.0, 0.0, 1.0), bind_group: None, uniform_buf: None },
|
||||
plane_handle.clone(),
|
||||
LocalToWorld(math::translation(&math::vec3(0.0, 0.0, 0.0))),
|
||||
Translation::new(0.0, 0.0, 0.0)
|
||||
),
|
||||
(
|
||||
Material { color: math::vec4(0.0, 1.0, 0.0, 1.0), bind_group: None, uniform_buf: None },
|
||||
mesh_handle.clone(),
|
||||
LocalToWorld(math::translation(&math::vec3(3.0, 0.0, 0.0))),
|
||||
Translation::new(0.0, 0.0, 0.0)
|
||||
),
|
||||
(
|
||||
Material { color: math::vec4(1.0, 0.0, 0.0, 1.0), bind_group: None, uniform_buf: None },
|
||||
mesh_handle,
|
||||
LocalToWorld::identity(),
|
||||
Translation::new(0.0, 0.0, 0.0)
|
||||
),
|
||||
]);
|
||||
|
||||
Application::run(universe, world);
|
||||
}
|
Loading…
Reference in a new issue