Skip to content

Bevy React App #710

Description

@nuzzles

What problem does this solve or what need does it fill?

I want to turn a bevy app canvas into an npm package and use it as a typed React component, e.g.

npm install @nuzzles/my-game@ae3b1d31d699e62249cead029b0e10f37a9ed9ac

Usage:

import { useBevyApp } from '@nuzzles/my-game@ae3b1d31d699e62249cead029b0e10f37a9ed9ac';

const [wasmHandle, wasmBindings, loading, error] = useBevyApp();

# Examples:
# - Do something on load finish (callback)
# - Use multiple game canvases on a single page
# - Use any binding output via wasm_bindgen

What solution would you like?

I would like to build a complete npm package that includes lexically-scoped typed bindings and handling of the bevy app load. This way, updating my game is as simple as updating my npm package.

There are a few problems that make this very complex:

What alternative(s) have you considered?

There really is none.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-FeatureMake something new possible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions