nannou-web-template's Introduction
nannou-web-template's People
nannou-web-template's Issues
Works on desktop browsers but not mobile browsers
EPILEPSY WARNING!!! There is a link to the site that is experiencing the issue in the repo posted below. It is a generative art project and it is hundreds of squares changing colors constantly. It is VERY hectic.
I have an issue with a generative art project I'm working on that is deployed as a wasm app. https://github.com/steezeburger/siqnastee-nannou-web
It works fine on desktop browsers, but I cannot get it to work on mobile browsers.
It doesn't work on phones, but it does work on my iPad and on the iPhone simulator on my laptop. Maybe the simulator uses a different rendering engine?
I have usb-debugged my phone and I get a Uncaught (in promise) RuntimeError: unreachable error.
I have also tried all three Limit
s. Only the downlevel_webgl2_defaults
works for the desktop browser, but none of them work for mobile browsers.
Does anyone know what could possibly be the issue? Or does anyone have any tips for how I could further debug this issue?
project does not compile with nannou_egui
Hi folks, and thank you for setting up that template ❤️.
I managed to get our nannou-app working on the browser. But things got a little complicated when I tried to add nannou_egui
as a dependency to the project.
I only added nannou as a dependency on this commit and the project failed to compile for the web as you can see on the error message bellow 👇 .
warning: /Users/elhmn/personal/qautomata/ui/Cargo.toml: Found `debug_assertions` in `target.'cfg(...)'.dependencies`. This value is not supported for selecting dependencies and will not work as expected. To learn more visit https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies
Compiling winit v0.25.0
error: Please select a feature to build for web: `web-sys`, `stdweb`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/mod.rs:38:1
|
38 | compile_error!("Please select a feature to build for web: `web-sys`, `stdweb`");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand: Full error dump after running `npm start`
> [email protected] start
> rimraf dist pkg && webpack-dev-server --open
🧐 Checking for wasm-pack...
✅ wasm-pack is installed at /Users/elhmn/.cargo/bin/wasm-pack.
ℹ️ Compiling your crate in release mode...
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.178.82:8080/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/elhmn/personal/qautomata/ui/dist' directory
<i> [webpack-dev-middleware] wait until bundle finished: /
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /Users/elhmn/personal/qautomata/core/Cargo.toml
workspace: /Users/elhmn/personal/qautomata/Cargo.toml
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /Users/elhmn/personal/qautomata/ui/Cargo.toml
workspace: /Users/elhmn/personal/qautomata/Cargo.toml
warning: /Users/elhmn/personal/qautomata/ui/Cargo.toml: Found `debug_assertions` in `target.'cfg(...)'.dependencies`. This value is not supported for selecting dependencies and will not work as expected. To learn more visit https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies
Compiling winit v0.25.0
error: Please select a feature to build for web: `web-sys`, `stdweb`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/mod.rs:38:1
|
38 | compile_error!("Please select a feature to build for web: `web-sys`, `stdweb`");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0432]: unresolved import `super::backend`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/event_loop/runner.rs:1:37
|
1 | use super::{super::ScaleChangeArgs, backend, state::State};
| ^^^^^^^ no `backend` in `platform_impl::platform::event_loop`
error[E0432]: unresolved import `super::backend`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/event_loop/state.rs:1:5
|
1 | use super::backend;
| ^^^^^^^^^^^^^^ no `backend` in `platform_impl::platform::event_loop`
error[E0432]: unresolved import `super::backend`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/event_loop/window_target.rs:1:29
|
1 | use super::{super::monitor, backend, device, proxy::Proxy, runner, window};
| ^^^^^^^ no `backend` in `platform_impl::platform::event_loop`
error[E0432]: unresolved import `super::backend`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/event_loop/mod.rs:9:13
|
9 | use super::{backend, device, window};
| ^^^^^^^ no `backend` in `platform_impl::platform`
error[E0432]: unresolved import `super::backend`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/window.rs:12:13
|
12 | use super::{backend, monitor, EventLoopWindowTarget};
| ^^^^^^^ no `backend` in `platform_impl::platform`
error[E0433]: failed to resolve: could not find `backend` in `super`
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/window.rs:156:16
|
156 | super::backend::scale_factor()
| ^^^^^^^ could not find `backend` in `super`
error[E0283]: type annotations needed
--> /Users/elhmn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/web/window.rs:349:5
|
347 | #[derive(Default, Clone)]
| ------- in this derive macro expansion
348 | pub struct PlatformSpecificBuilderAttributes {
349 | pub(crate) canvas: Option<backend::RawCanvasType>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
|
= note: cannot satisfy `_: Default`
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
Some errors have detailed explanations: E0283, E0432, E0433.
For more information about an error, try `rustc --explain E0283`.
error: could not compile `winit` due to 8 previous errors
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
full command: cd "/Users/elhmn/personal/qautomata/ui" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
asset index.js 117 KiB [emitted] [minimized] (name: index) 1 related asset
asset index.html 293 bytes [emitted] [from: static/index.html] [copied]
asset 235.js 111 bytes [emitted] [minimized]
runtime modules 31.6 KiB 15 modules
orphan modules 18.8 KiB [orphan] 8 modules
cacheable modules 160 KiB
modules by path ./node_modules/ 160 KiB
modules by path ./node_modules/webpack-dev-server/client/ 55.8 KiB 4 modules
modules by path ./node_modules/webpack/hot/*.js 4.59 KiB
./node_modules/webpack/hot/dev-server.js 1.88 KiB [built] [code generated]
+ 3 modules
modules by path ./node_modules/html-entities/lib/*.js 81.3 KiB
./node_modules/html-entities/lib/index.js 7.74 KiB [built] [code generated]
+ 3 modules
./node_modules/ansi-html-community/index.js 4.16 KiB [built] [code generated]
./node_modules/events/events.js 14.5 KiB [built] [code generated]
./js/index.js 146 bytes [built] [code generated]
./pkg/index.js 1 bytes [built] [code generated]
webpack 5.78.0 compiled successfully in 1514 ms
I spent some time digging but I am very new to rust and to computer graphics, so I thought it would be great to ask for help here.
Maybe nannou_egui
is not yet compatible with the experimental wasm
branch of nannou
and require some tunning/fixing ?
/cc @Git-Math
Fix for `ERR_OSSL_EVP_UNSUPPORTED` after `npm start`
Hey! Thanks a lot for this starter template.
Had this problem running npm start
, macOS 12.5, M1 chip, Node 18.
The gist of the error is:
ERR_OSSL_EVP_UNSUPPORTED
node:internal/crypto/hash:71
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
Here is the fix:
export NODE_OPTIONS=--openssl-legacy-provider
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.