Jakob Hellermann
Jakob Hellermann
Like an associated constant in rust
That alone can't make ```ts world.getResource(); ``` work, right? Because we have no instance of the type available. Maybe ```ts function getResource(ty: BevyType) {} interface Time { delta_seconds: number; }...
Update: typescripts inference is strong enough. This works: ```ts type BevyType = { typeName: string; }; type Time = { seconds: number, }; const Time: BevyType = { typeName: "bevy_core::time::Time"...
Exporting all types in a quick and hacky way is pretty easy: https://github.com/jakobhellermann/bevy_reflect_ts_type_export/blob/main/generated/types.ts And working with typed APIs is super nice: https://github.com/jakobhellermann/bevy_mod_js_scripting/blob/5b2df5e6db55eeb1fade17b56e05d303326d5e9e/assets/scripts/breakout.ts#L12-L23
TS can just overload two method signatures, and the deno op can deal with either. https://github.com/jakobhellermann/bevy_mod_js_scripting/blob/5b2df5e6db55eeb1fade17b56e05d303326d5e9e/src/runtime/js/index.d.ts#L53-L54
My thoughts on that for this project were basically "it should be possible to use the browsers native engine using wasm_bindgen somehow, but I haven't given it much further thought"...
Makes sense . Can you name the method `set_default_editor_panels` and run cargo fmt? Have you tried what happens when the type used as a panel isn't valid? Does the app...
The inspector somehow needs to know how to display these types. For the world inspector, there are two options: 1. Derive `Reflect` for the `Player` and `Direction` types, and call...
> @jakobhellermann is there an example of implementing an enum so that it shows up in the world inspector? I suppose similar to how the `depth_calculation` field on the Camera...
Another reason for providing this is that you can't know where the target folder is without not just reading the `CARGO_TARGET_DIR`, but also parsing the possible `.cargo/config.toml` that may set...