Skip to content

Commit

Permalink
docs: update readme usage to latest api
Browse files Browse the repository at this point in the history
  • Loading branch information
mosure committed Sep 24, 2023
1 parent d005be3 commit 7b1bcc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ fn main() {
.run();
}

fn setup(
fn setup_gaussian_cloud(
mut commands: Commands,
asset_server: Res<AssetServer>,
) {
commands.spawn_bundle(GaussianSplattingBundle {
commands.spawn(GaussianSplattingBundle {
verticies: asset_server.load("scenes/test.ply"),
// TODO: add transform option
..Default::default()
});

// TODO: setup bevy camera
commands.spawn(Camera2dBundle::default());
}
```

Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use bevy::{

use bevy_gaussian_splatting::{
GaussianSplattingBundle,
GaussianSplattingPlugin,
utils::setup_hooks,
};

Expand Down Expand Up @@ -51,6 +52,8 @@ fn example_app() {
let config = GaussianSplattingViewer::default();
let mut app = App::new();

app.add_plugins(GaussianSplattingPlugin);

app.add_systems(Startup, setup_gaussian_cloud);

// setup for gaussian viewer app
Expand Down

0 comments on commit 7b1bcc4

Please sign in to comment.