Commit Graph

19 Commits

Author SHA1 Message Date
Lee-Orr 47c848de5e use scene data icons 2024-03-20 18:53:33 -04:00
Lee-Orr b324350096 use predicate 2024-03-20 18:43:27 -04:00
Lee-Orr 8b7ffec9b9 cleanup from merge 2024-03-20 18:41:21 -04:00
Lee-Orr 699d3ad00e Merge branch 'animation-clips-setup' of https://github.com/storytold/storyteller-bevy into animation-clips-setup 2024-03-20 18:39:53 -04:00
Lee-Orr 8fc0c968c2 small changes 2024-03-20 18:38:26 -04:00
Lee-Orr 4df40708e3 Update studio-frontend/src/app/anim-editor.element.ts
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:37:06 -04:00
Lee-Orr 81cc85881a Update studio-frontend/src/app/anim-editor.element.ts
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:36:21 -04:00
Lee-Orr 2e8dd21071 Update studio-frontend/src/app/anim-editor.element.ts
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:19:21 -04:00
Lee-Orr 4952c0c613 add deletion of keyframes 2024-03-18 16:43:29 -04:00
Lee-Orr 09a09af240 navigate to start, end, and zero 2024-03-18 15:05:24 -04:00
Lee-Orr c145540a51 display clip start and end 2024-03-18 14:53:04 -04:00
Lee-Orr c9fef4425c cleaning up timeline navigation 2024-03-15 17:19:22 -04:00
Lee-Orr 53e91cf5a5 animating the timeline 2024-03-15 17:14:47 -04:00
Lee-Orr 7c7435d2cc move & update keyframes 2024-03-14 18:48:03 -04:00
Lee-Orr 23aafc174c tracks move correctly 2024-03-12 13:36:58 -04:00
Lee-Orr 2419f82e09 play/pause, update timeline 2024-03-08 13:46:09 -05:00
Danny McGee c9904a5293 Inspector frontend UI (#68)
This PR begins fleshing out the front-end UI for inspecting the selected
entity's components.

### Implemented
* Support for the `Name` component
* Placeholder/WIP support for the `Transform` component

### To-do
* Support for sending changes made in the inspector back to Bevy
* A slider/field combo widget for numeric values (can be adapted from
  [this StackBlitz](https://stackblitz.com/edit/angular-wfikuy?file=src%2Ffloat-input%2Ffloat-input.component.ts))
* Quat -> Euler angles conversion ([example math here](https://github.com/dannymcgee/3DGameMath/blob/5cb7a8ff9310565329e57751cd8b9c33e9bd4cb7/libs/Math/include/math/quat.inl.hpp#L56-L78),
  or use a 3rd-party math library)

### Known issues
* Selecting entities from the hierarchy doesn't always update the
  components list. I suspect this is the same issue as #39
2024-03-04 15:13:03 -05:00
Brooks Palin d51eec52c3 Bootstrap Image Generator application (#53)
This PR begins scaffolding the Stable Diffusion Turbo application (title
TBD), which is a separate frontend for Storyteller Engine which focuses
on image generation.

### Design Overview

* The application renders a "split-screen" view, with Storyteller Studio
  on the left, and the Stable Diffusion Turbo output on the right
* When changes are made in the Studio editor:
  - A screenshot is taken from the Bevy application
  - Screenshot is piped into Stable Diffusion Turbo model
  - Model output is rendered to the screen
* This all happens in as close to real-time as possible

### Work completed in this PR

* The `studio-frontend` project has been (somewhat crudely) refactored
  to split most of its components into reusable libraries
  - `studio-ui` is a use-case-agnostic design system library for core UI
    components. These are "dumb" components which are controlled
    via `@property` inputs and send `CustomEvent`s in response to user
    input.
  - `studio-frontend` is a collection of reusable Storyteller Studio
    widgets. These are "smart" components which depend on
    `@storyteller/studio` directly, manage their own state, and require very
    little configuration or styling. They are designed to be drop-in
    building blocks that can be reused between various frontends.
* The new application has been bootstrapped as `image-generator-demo`
  - Currently, this simply grabs screenshots from the Bevy application and
    renders those screenshots on the right side of the split-screen view. A
    future PR will wire up to the Storyteller.ai backend to pipe these
    screenshots through Stable Diffusion Turbo, and render that model's
    output instead.

### Testing

* Install dependencies as described in the repo's README
* Run `npx nx serve image-generator-demo`
* Open [localhost:4200](http://localhost:4200) in your browser
  - Use the camera controller in the left side of the view to manipulate
    the Bevy scene
  - Verify the right side of the view updates with a fresh screenshot at a
    rate of ~5 fps
* Toggle the "Realtime Capture" checkbox
  - Verify the right side view no longer updates while the user is
    actively manipulating the editor
  - This should allow the app to run smoother on lower-spec hardware

---------

Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-02-26 17:13:07 -05:00
Danny McGee bc975779d7 Animation Editor UI (#20)
This PR adds a WIP timeline UI for animating elements in the scene.

### Implemented Features

* The timeline can be panned with MMB and zoomed with Ctrl + Mouse Wheel
* The timeline can be "scrubbed" by dragging the red "play-head" with
  LMB
* The timeline sidebar (displaying the list of tracks) can be resized by
  dragging on the edge of the sidebar
* Keyframes can be added by pressing the "Add Keyframe" CTA in the UI
* Keyframes can be selected for editing by clicking the diamond-shaped
  markers in the timeline
* Selected entities (including but not limited to keyframes) can be
  deleted by pressing the "Delete" key
* Keyframes can be moved temporally by dragging the diamond-shaped
  markers in the timeline

### Known issues

* Zooming the timeline in too far results in a soft-lock
* When zooming the timeline, the "transform origin" is currently
  centered on the `00:00` timestamp. For ease of use, it should center on
  the mouse cursor position instead.
* The timeline track-list is currently hard-coded to list the Camera and
  Camera Target. Clicking on these entries currently serves no useful
  purpose and may result in a crash.
* Keyframe markers in the timeline are not currently associated with
  entries in the track-list and simply appear vertically centered in the
  timeline view.
* Added keyframes currently record the position and orientation of the
  scene camera when added, and are rendered in the world with debug
  visualizations, but serve no useful purpose. Some design work is needed
  (both user-experience and architectural) to decide on a workflow for
  actually animating scene elements.
* Entity deletion cannot currently be undone/redone
2024-02-22 14:21:02 -05:00