changes
This commit is contained in:
parent
5c38fe514f
commit
22070b93d7
@ -24,7 +24,6 @@ meval = { git = "https://github.com/Titaniumtown/meval-rs.git" }
|
|||||||
eframe = { git = "https://github.com/Titaniumtown/egui", default-features = false, features = ["egui_glow"] }
|
eframe = { git = "https://github.com/Titaniumtown/egui", default-features = false, features = ["egui_glow"] }
|
||||||
git-version = "0.3.5"
|
git-version = "0.3.5"
|
||||||
include-flate = { git = "https://github.com/Titaniumtown/include-flate.git" }
|
include-flate = { git = "https://github.com/Titaniumtown/include-flate.git" }
|
||||||
web-sys = "0.3.56"
|
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
instant = { version = "0.1.12" }
|
instant = { version = "0.1.12" }
|
||||||
|
|||||||
@ -37,11 +37,6 @@ pub fn start(canvas_id: &str) -> Result<(), wasm_bindgen::JsValue> {
|
|||||||
// Used in order to hook into `panic!()` to log in the browser's console
|
// Used in order to hook into `panic!()` to log in the browser's console
|
||||||
log_helper("Initializing panic hooks...");
|
log_helper("Initializing panic hooks...");
|
||||||
std::panic::set_hook(Box::new(|panic_info| {
|
std::panic::set_hook(Box::new(|panic_info| {
|
||||||
web_sys::window()
|
|
||||||
.and_then(|window| window.document())
|
|
||||||
.and_then(|document| document.body())
|
|
||||||
.and_then(|element| element.set_attribute("data-panicked", "true").ok());
|
|
||||||
|
|
||||||
console_error_panic_hook::hook(panic_info);
|
console_error_panic_hook::hook(panic_info);
|
||||||
}));
|
}));
|
||||||
log_helper("Initialized panic hooks!");
|
log_helper("Initialized panic hooks!");
|
||||||
|
|||||||
@ -12,11 +12,6 @@
|
|||||||
<noscript>Please enable Javascript, this page uses both WebAssembly and Javascript to run.</noscript>
|
<noscript>Please enable Javascript, this page uses both WebAssembly and Javascript to run.</noscript>
|
||||||
|
|
||||||
<canvas id="canvas"></canvas>
|
<canvas id="canvas"></canvas>
|
||||||
<div id="panic">
|
|
||||||
<h1>application encountered a panic!</h1>
|
|
||||||
<div>the application will no longer respond to user inputs</div>
|
|
||||||
<div>check the console for more information</div>
|
|
||||||
</div>
|
|
||||||
<div class="centered" id="loading">
|
<div class="centered" id="loading">
|
||||||
<p style="font-size:16px">
|
<p style="font-size:16px">
|
||||||
Loading…
|
Loading…
|
||||||
|
|||||||
@ -79,36 +79,3 @@ canvas {
|
|||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body[data-panicked = true] {
|
|
||||||
background-color: #ce2828;
|
|
||||||
|
|
||||||
#panic {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#panic {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
|
|
||||||
background-color: #ce2828;
|
|
||||||
color: #000;
|
|
||||||
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
padding: 1em 2em;
|
|
||||||
border-radius: 2em;
|
|
||||||
|
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
z-index: 1000000;
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user