Commit: 24bcc07

Dog in window

Mårten Åsberg committed on 2026-04-14 at 09:24
.gitignore +1 -0
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ea8c4bf
@@ -0,0 +1 @@
/target
Cargo.lock +6053 -0
Large diff (6053 lines changed) - not displayed
Cargo.toml +13 -0
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..221019a
@@ -0,0 +1,13 @@
[package]
name = "bunny-herding"
version = "0.1.0"
edition = "2024"
[dependencies]
bevy = "0.18.1"
[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3
README.md +3 -0
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..01d0419
@@ -0,0 +1,3 @@
# Bunny Herding
![Screenshot of game](./docs/screenshot.png)
assets/models/License.txt +28 -0
diff --git a/assets/models/License.txt b/assets/models/License.txt
new file mode 100644
index 0000000..aa0e669
@@ -0,0 +1,28 @@
Cube Pets (2.0)
Created/distributed by Kenney (www.kenney.nl)
Creation date: 26-03-2026 11:16
------------------------------
License: (Creative Commons Zero, CC0)
http://creativecommons.org/publicdomain/zero/1.0/
You can use this content for personal, educational, and commercial purposes.
Support by crediting 'Kenney' or 'www.kenney.nl' (this is not a requirement)
------------------------------
• Website : www.kenney.nl
• Donate : www.kenney.nl/donate
• Patreon : patreon.com/kenney
Follow on social media for updates:
• Twitter: twitter.com/KenneyNL
• BlueSky: kenney.bsky.social
• Instagram: instagram.com/kenney_nl
\ No newline at end of file
assets/models/Textures/colormap.png +0 -0
diff --git a/assets/models/Textures/colormap.png b/assets/models/Textures/colormap.png
new file mode 100644
index 0000000..cb9f831
Binary files /dev/null and b/assets/models/Textures/colormap.png differ
assets/models/animal-dog.glb +0 -0
diff --git a/assets/models/animal-dog.glb b/assets/models/animal-dog.glb
new file mode 100644
index 0000000..61d4728
Binary files /dev/null and b/assets/models/animal-dog.glb differ
docs/screenshot.png +0 -0
diff --git a/docs/screenshot.png b/docs/screenshot.png
new file mode 100644
index 0000000..10b4eb4
Binary files /dev/null and b/docs/screenshot.png differ
src/main.rs +45 -0
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..f919b8d
@@ -0,0 +1,45 @@
use bevy::{
DefaultPlugins,
app::{App, Startup},
asset::AssetServer,
camera::{Camera3d, OrthographicProjection, Projection, ScalingMode},
ecs::system::{Commands, Res},
gltf::GltfAssetLabel,
light::DirectionalLight,
math::Vec3,
scene::SceneRoot,
transform::components::Transform,
};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn((
Camera3d::default(),
Projection::from(OrthographicProjection {
scaling_mode: ScalingMode::FixedVertical {
viewport_height: 10.0,
},
..OrthographicProjection::default_3d()
}),
Transform::from_xyz(0.0, 10.0, 0.0).looking_to(Vec3::NEG_Y, Vec3::Z),
));
commands.spawn((
SceneRoot(asset_server.load(GltfAssetLabel::Scene(0).from_asset("models/animal-dog.glb"))),
Transform::from_xyz(0.0, 0.0, 0.0),
));
commands.spawn((
DirectionalLight {
illuminance: 15000.0,
..Default::default()
},
Transform::from_xyz(0.0, 0.0, 0.0).looking_to(Vec3::NEG_Y, Vec3::Z),
));
}