Skip to content

Commit

Permalink
add new background
Browse files Browse the repository at this point in the history
  • Loading branch information
14ROVI committed Jul 21, 2024
1 parent a3c672c commit a9fa3a0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 4 deletions.
Binary file added assets/backgrounds/22.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/22.mp4
Binary file not shown.
Binary file added assets/backgrounds/22.webm
Binary file not shown.
5 changes: 2 additions & 3 deletions src/copland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl Component for Copland {
self.theme = theme;
let el = self.background_video.cast::<HtmlVideoElement>().unwrap();
el.load();
el.play().ok();
// el.onloadeddata().unwrap().
true
},
CoplandMsg::OpenWindow(window) => {
Expand Down Expand Up @@ -420,11 +420,10 @@ impl Component for Copland {
>
<source src={format!("assets/backgrounds/{}.webm", self.theme.background)} type="video/webm"/>
<source src={format!("assets/backgrounds/{}.mp4", self.theme.background)} type="video/mp4"/>
</video>
</video>
<div id="window-area"
class="window-area"
ref={self.window_area.clone()}
// style={format!("background-image: url(assets/backgrounds/{}.gif)", self.theme.background)}
>
{
self.windows.values().map(|window| {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use copland::{Copland, Theme};

use rand::Rng;

pub const MAX_BACKGROUND_INDEX: u32 = 22;
pub const MAX_BACKGROUND_INDEX: u32 = 23;

#[function_component(App)]
fn app() -> Html {
Expand Down

0 comments on commit a9fa3a0

Please sign in to comment.