Skip to content

Add a way to inject events into the stream. #650

@bwinton

Description

@bwinton

Describe the problem you want to solve
So, using stdweb, I have some controls outside of the canvas, and I would like my app to respond to them when they change. I started by trying to keep circular references between the desktop or web config objects and the main game object, but of course they can't both own each other, so that didn't work out so well. My next thought was to add event listeners in Rust, and try and send a keyboard event to the canvas which I could respond to in my app, but that also didn't work (it couldn't seem to make it all the way from webstd through winit through blinds through quicksilver to my function. I'm not sure why).

I ended up just checking the state of the controls every time through the loop, but that feels less elegant than reacting when they change.

Describe the solution you'd like
Some way to create and push events into the Input passed to the async function would have made this a little easier.

Are you interested in contributing?
I think I have a workaround, and I still don't have a ton of time, so I don't think I'll be able to fix this myself.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions