forked from StudioInfinity/dyna3
Prevent unused imports for engine debug output
In the process, switch from the `web-sys` crate's `console::log_1` function to Sycamore's more flexible `console_log` macro. The latter works both inside and outside the browser, so we can use it without checking whether we're compiling to WebAssembly.
This commit is contained in:
parent
03d6cf0687
commit
2bae8d3df9
1 changed files with 6 additions and 5 deletions
|
@ -1,7 +1,10 @@
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use nalgebra::{Const, DMatrix, DVector, DVectorView, Dyn, SymmetricEigen};
|
use nalgebra::{Const, DMatrix, DVector, DVectorView, Dyn, SymmetricEigen};
|
||||||
use std::fmt::{Display, Error, Formatter};
|
use std::fmt::{Display, Error, Formatter};
|
||||||
use web_sys::{console, wasm_bindgen::JsValue}; /* DEBUG */
|
|
||||||
|
/* DEBUG */
|
||||||
|
#[cfg(not(feature = "dev"))]
|
||||||
|
use sycamore::prelude::console_log;
|
||||||
|
|
||||||
// --- elements ---
|
// --- elements ---
|
||||||
|
|
||||||
|
@ -167,10 +170,8 @@ impl ConfigSubspace {
|
||||||
|
|
||||||
/* DEBUG */
|
/* DEBUG */
|
||||||
// print the eigenvalues
|
// print the eigenvalues
|
||||||
#[cfg(all(target_family = "wasm", target_os = "unknown"))]
|
#[cfg(not(feature = "dev"))]
|
||||||
console::log_1(&JsValue::from(
|
console_log!("Eigenvalues used to find kernel:{}", eig.eigenvalues);
|
||||||
format!("Eigenvalues used to find kernel:{}", eig.eigenvalues)
|
|
||||||
));
|
|
||||||
|
|
||||||
// express the basis in the standard coordinates
|
// express the basis in the standard coordinates
|
||||||
let basis_std = proj_to_std * &basis_proj;
|
let basis_std = proj_to_std * &basis_proj;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue