Skip to content

Commit

Permalink
Fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
tychedelia committed Jul 8, 2024
1 parent f821270 commit f23aec7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/draw/draw.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::any::Any;
use nannou::prelude::*;
use std::any::Any;

fn main() {
nannou::sketch(view).run()
Expand Down
3 changes: 1 addition & 2 deletions examples/video/simple_video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ fn view(app: &App, model: &Model) {
};

let draw = app.draw();
draw.rect()
.w_h(640.0, 400.0).texture(&video.texture);
draw.rect().w_h(640.0, 400.0).texture(&video.texture);
}
18 changes: 7 additions & 11 deletions examples/video/video_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,9 @@ fn model(app: &App) -> Model {
.view(view)
.build();

let video = app.asset_server().load_with_settings(
"video/file_example_MP4_640_3MG.mp4",
|settings: &mut VideoLoaderSettings| {
settings
.options
.insert("hwaccel".to_string(), "sasfd".to_string());
},
);
let video = app
.asset_server()
.load("video/file_example_MP4_640_3MG.mp4");
Model {
window,
camera,
Expand All @@ -62,8 +57,9 @@ fn view(app: &App, model: &Model) {
let draw = app
.draw()
// Initialize our draw instance with our custom material
.material(VideoMaterial { texture: video.texture.clone() });
.material(VideoMaterial {
texture: video.texture.clone(),
});

draw.rect()
.w_h(640.0, 400.0);
draw.rect().w_h(640.0, 400.0);
}

0 comments on commit f23aec7

Please sign in to comment.