Comments (3)
Update: I got it to compile and run the main loop in the browser by using the mechanism for starting emscripten main loop from here , but all I see is black rectangle on the page :/
The functions:
self.canvas.copy(&texture, None, None).unwrap();
self.canvas.present();
are being called, but there's no output on the canvas.
I'd really appreciate if you had some info on the tried & true toolkit.
from raycaster-rust.
Update: This branch: https://github.com/elo-siema/hyperbolic-raycaster-rust/tree/web-build
Manages to render the first frame, and then panics:
thread panicked while processing panic. aborting. raycaster.js:2351:16
exception thrown: RuntimeError: unreachable executed,std::panicking::rust_panic_with_hook::h4771cee0d781dbd0@http://localhost:6931/raycaster.wasm:wasm-function[685]:0x217ca
I'm almost certain this has something to do with Emscripten mishandling references captured in the main loop lambda, losing them from iteration to iteration. Main loop function called like
loop{
...
}
works fine and tries to render frames (just doesn't show them due to blocking of thread).
Once during experiments I saw this piece of code (called from main_loop in emscripten)
let width =window.view.canvas.window().size().0;
let height = window.view.canvas.window().size().1;
println!("{}, {}", width, height);
output "0, 0" and panic on a next line trying to manipulate the canvas.
This looks to me like a severe regression bug in Emscripten.
from raycaster-rust.
Update: Managed to solve it on my fork. Definitely an issue with Emscripten main loop.
https://elo-siema.github.io/hyperbolic-raycaster-rust/
from raycaster-rust.
Related Issues (1)
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.
from raycaster-rust.