mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-16 05:44:21 +00:00
Update asset.rs
This commit is contained in:
@ -7,8 +7,8 @@ fn format_url(file_name: &str) -> reqwest::Url {
|
|||||||
let window = web_sys::window().unwrap();
|
let window = web_sys::window().unwrap();
|
||||||
let location = window.location();
|
let location = window.location();
|
||||||
let mut origin = location.origin().unwrap();
|
let mut origin = location.origin().unwrap();
|
||||||
if !origin.ends_with("learn-wgpu") {
|
if !origin.ends_with("assets") {
|
||||||
origin = format!("{}/learn-wgpu", origin);
|
origin = format!("{}/assets", origin);
|
||||||
}
|
}
|
||||||
let base = reqwest::Url::parse(&format!("{}/", origin,)).unwrap();
|
let base = reqwest::Url::parse(&format!("{}/", origin,)).unwrap();
|
||||||
base.join(file_name).unwrap()
|
base.join(file_name).unwrap()
|
||||||
|
Reference in New Issue
Block a user