Skip to content

Commit

Permalink
always dark
Browse files Browse the repository at this point in the history
  • Loading branch information
jembishop committed Jul 14, 2023
1 parent e60f02d commit d8997c3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<title>Laser Simulator</title>

<!-- config for our rust wasm binary. go to https://trunkrs.dev/assets/#rust for more customization -->
<script type="module">import init from '/laser-simulator/laser-simulator-446c3816ce720645.js';init('/laser-simulator/laser-simulator-446c3816ce720645_bg.wasm');</script>
<script type="module">import init from '/laser-simulator/laser-simulator-d645806237deb38f.js';init('/laser-simulator/laser-simulator-d645806237deb38f_bg.wasm');</script>
<!-- this is the base url relative to which other urls will be constructed. trunk will insert this from the public-url option -->
<base href="/laser-simulator/">

Expand Down Expand Up @@ -110,8 +110,8 @@

</style>

<link rel="preload" href="/laser-simulator/laser-simulator-446c3816ce720645_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/laser-simulator/laser-simulator-446c3816ce720645.js"></head>
<link rel="preload" href="/laser-simulator/laser-simulator-d645806237deb38f_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/laser-simulator/laser-simulator-d645806237deb38f.js"></head>

<body>
<!-- The WASM code will resize the canvas dynamically -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ async function __wbg_init(input) {
if (wasm !== undefined) return wasm;

if (typeof input === 'undefined') {
input = new URL('laser-simulator-446c3816ce720645_bg.wasm', import.meta.url);
input = new URL('laser-simulator-d645806237deb38f_bg.wasm', import.meta.url);
}
const imports = __wbg_get_imports();

Expand Down
Binary file not shown.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::collections::VecDeque;
use std::f32::consts::PI;

use egui::plot::{Line, Plot, PlotPoints};
use egui::{Align2, Color32, FontId, Pos2, Rect, RichText, Stroke};
use egui::{Align2, Color32, FontId, Pos2, Rect, RichText, Stroke, Visuals};

use glam::Vec2;
use rand::Rng;
Expand Down Expand Up @@ -456,6 +456,7 @@ impl App {
impl eframe::App for App {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
ctx.request_repaint();
ctx.set_visuals(Visuals::dark());
let dt = self.dt;
egui::CentralPanel::default().show(&ctx, |ui| {
ui.visuals_mut().override_text_color = Some(Color32::WHITE.linear_multiply(0.5));
Expand Down

0 comments on commit d8997c3

Please sign in to comment.