bevyengine / bevyengine/bevy

`low_power` example does not work on WASM

Open
#14,214 4 comments 0 reactions 0 assignees View on GitHub
A-Windowing C-Bug I-Regression S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.14

## What you did

1. Run the web example: https://bevyengine.org/examples/window/low-power/
2. Press space until you get to the third mode, with `RequestRedraw` being sent

## What went wrong

The event loop should run continuously as long as the event is being sent. However, it does not.

## Additional information

`let _ = event_loop_proxy.send_event(WakeUp);` was added to the example, but the docs all refer to `RequestRedraw`. Replacing the event loop proxy wakeup with `RequestRedraw` appears to fix the behavior.

The event loop proxy is useful when waking from another thread, but it appears it is not a direct replacement for the bevy event on all platforms.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.