Commit Graph

70 Commits

Author SHA1 Message Date
Danny McGee dd5bcdb66c Tune fade-out thresholds 2023-10-13 19:48:06 -04:00
Danny McGee 57bb26a182 Fix fade-out math for translation crossbars 2023-10-13 19:03:49 -04:00
Danny McGee f9a3031085 Move curve_sin to interpolation module 2023-10-13 18:04:39 -04:00
Danny McGee 2c4dfec839 Cleanup, conditional compilation flags 2023-10-13 17:54:57 -04:00
Danny McGee f11b89fb48 Fixes, cleanup
* Fix z-ordering issues with the gizmo elements
* Restore the translucent far-side rotator ring arcs
* Restore the translation arrow fading
* Remove dead and/or commented-out code
2023-10-13 17:15:09 -04:00
Danny McGee afb1d309af Fix a CSS bug 2023-10-13 02:15:17 -04:00
Danny McGee 0bee54a3d0 WIP refactor 2023-10-12 23:40:09 -04:00
Danny McGee 6cdeda6a7b Expand gizmos module 2023-10-12 16:05:28 -04:00
Danny McGee 53f7edeec8 Comments, cleanup 2023-10-12 15:45:10 -04:00
Danny McGee e0db5083f8 Fix TODO comment 2023-10-11 20:58:31 -04:00
Danny McGee 518f08345e Add TODO comment 2023-10-11 20:53:18 -04:00
Danny McGee 7d121af4a1 Plane-constrained translation handles 2023-10-11 20:48:21 -04:00
Danny McGee fef5840343 Code consistency 2023-10-11 17:44:05 -04:00
Danny McGee 78112be187 More gizmo refinements 2023-10-11 17:32:00 -04:00
Danny McGee 0a6b4401f5 Refined rotator gizmo 2023-10-11 16:07:35 -04:00
Danny McGee ac6773b117 Add math module 2023-10-11 12:58:57 -04:00
Danny McGee cd0ccc94ad Use design system colors in gizmos 2023-10-11 11:33:17 -04:00
Danny McGee 6167d1d54a Switch to "Regular" icons; Fix blurriness 2023-10-11 10:44:34 -04:00
Danny McGee 617306a8a2 _Actually_ memoize static SVG rendering 2023-10-11 10:36:10 -04:00
Danny McGee a34f31751f Move spread directive to framework library 2023-10-11 10:28:05 -04:00
Danny McGee db9f377f2c Memoize static SVG rendering 2023-10-11 09:59:49 -04:00
Danny McGee 86a948ef09 Cowboy prototyping 2023-10-10 19:46:40 -04:00
Danny McGee c84fd31387 UI infrastructure and simple "Help" dialog (#3)
Sets up some WIP infrastructure for building out the UI, and adds a simple popup
to show the navigation controls for the app.
2023-10-09 22:19:58 -04:00
Danny McGee 57d64f08f0 Touchpad-friendly controls (#2)
Adds `Shift` as an alternate modifier for FPS-style camera rotation, and binds
wheel events to camera zoom/dolly.

An attempt was made to translate 2D scroll events on a touchpad to camera
panning (this is what Blender does, and it's smooth as butter), but Bevy and/or
`winit` and/or the browser is doing some weird preprocessing of those events
before we're able to read them, which makes that unfeasible for now. That issue
has been documented with a `FIXME` comment.
2023-10-06 16:36:38 -04:00
Danny McGee 699c1baa4b Add WASD camera controls (#1)
This PR adds FPS-style controls to the camera in addition to the existing DCC-style pan/orbit/dolly controls. Additionally, some architectural changes have been made to facilitate this and pave the way toward making all of the app controls configurable in the future. Namely, a new `input` module has been added, loosely inspired by Unreal Engine's "Enhanced Input" system (and as I understand it, conceptually similar to Unity's "new" input system as well).

The basic idea is that raw device inputs (coming from `bevy::input`) are mapped to named, app-specific "input actions" before being consumed by other parts of the application. For example, in the camera motion system, instead of checking for mouse motion while the middle mouse button is pressed, we now check for a `CameraMotion::Pan` input action event.

Input actions carry information about their lifecycle phase (`Start`, `Ongoing`, and `Stop` — a stand-in for Bevy's `just_pressed`, `pressed`, and `just_released` methods) and some type of magnitude (`f32`, `Vec2`, or `Vec3` depending on the action).

At present, we've simply moved the hard-coded device input checks from the `orbit_cam` module to the new `input` module, but theoretically, this could eventually be refactored to read the mappings between device inputs and input actions from some kind of user configuration.
2023-10-05 22:29:01 -04:00
Danny McGee 05644b55bd Update page title 2023-10-04 19:24:48 -04:00
Danny McGee 37b24d489c Adjust Netlify build pipeline 2023-10-04 17:57:37 -04:00
Brandon Thomas 07fd600e4d mark executable 2023-10-04 17:45:55 -04:00
Danny McGee 28f034c670 Add Netlify build script 2023-10-04 17:38:10 -04:00
Danny McGee 5d8d9fe620 Split UI module 2023-10-04 16:05:34 -04:00
Danny McGee 90e504501d Load test model from glTF 2023-10-03 18:07:42 -04:00
Danny McGee 82157bd54a Document skybox generation process 2023-10-03 17:08:21 -04:00
Danny McGee ccf4d5945e Fix studio-frontend:preview configuration 2023-10-02 22:08:05 -04:00
Danny McGee bc0e81e2a0 Switch default skybox 2023-10-02 21:52:07 -04:00
Danny McGee 2273514fa6 Fix skybox for web 2023-10-02 21:51:45 -04:00
Danny McGee e97c14c5da Upgrade bevy to 0.11.3; Switch to WebGL backend 2023-10-02 21:51:05 -04:00
Danny McGee d396a45509 HDRI Skyboxes / Image-Based Lighting 2023-10-02 20:07:16 -04:00
Danny McGee 64133de881 Workflow fixes 2023-10-02 20:05:42 -04:00
Danny McGee 82e3d791bc Update @nxrs/cargo 2023-10-02 20:04:17 -04:00
Danny McGee f152706c29 Basic README 2023-09-30 00:17:20 -04:00
Danny McGee b11155c649 UX tuning + mini-refactor 2023-09-29 23:58:36 -04:00
Danny McGee 2e3979b336 Sync Bevy canvas size with browser viewport size 2023-09-29 22:15:18 -04:00
Danny McGee c1f92cc2d6 Spawn Bevy canvas at full viewport size 2023-09-29 20:36:23 -04:00
Danny McGee bed97cff47 Rename projects 2023-09-29 18:33:00 -04:00
Danny McGee 32057039b0 Fix cargo warning (duplicate target names) 2023-09-29 18:20:15 -04:00
Danny McGee ab380bc3da Restore procedural grid shader 2023-09-29 18:19:38 -04:00
Danny McGee fc66d2e1b3 Share assets between Bevy app and web frontend 2023-09-29 18:19:22 -04:00
Danny McGee 7cc20fa500 Fix issues with procedural grid shader 2023-09-29 18:15:53 -04:00
Danny McGee c05f341770 Add hello-world:build:web dependency to hello-web targets 2023-09-28 23:42:53 -04:00
Danny McGee bc8994a780 Get wasm build running in browser 2023-09-28 23:33:08 -04:00