Commit Graph

174 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 fbeb09734b Update studio/src/anim/timeline_animation.rs
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:35:46 -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 056a4ca46f Update studio-frontend/src/app/anim-editor.element.scss
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:18:24 -04:00
Lee-Orr 4cbe17b998 Update studio/src/anim/timeline_animation.rs
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:13:40 -04:00
Lee-Orr 3a0b9a96ce Update studio/src/anim/timeline_animation.rs
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:13:13 -04:00
Lee-Orr 2e0664594b Update studio/src/anim/timeline_animation.rs
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 18:11:25 -04:00
Brandon Thomas 1320dd82b1 fix typo 2024-03-20 00:49:58 -04:00
Danny McGee b087f78a15 Check for correct wasm-bindgen-cli version (#92)
Two people pushing to the same branch is fraught. Three people pushing
to the same branch is a circus. 😂 This should fix the build errors
in #88!
2024-03-19 23:40:42 -04:00
Brandon Thomas 4d5173446e bump wasm-bindgen-cli 2024-03-19 21:08:48 -04:00
Lee-Orr e50179259a clippy, fmt, remove dead code 2024-03-18 16:53:03 -04:00
Lee-Orr f3632b059d update animations when transform or time changes 2024-03-18 16:50:40 -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 15b65f114b fmt + clippy 2024-03-15 15:27:27 -04:00
Lee-Orr e816e9ba0f animation works 2024-03-15 15:26:16 -04:00
Lee-Orr e0b5d01d31 Merge branch 'main' of https://github.com/storytold/storyteller-bevy into animation-clips-setup 2024-03-15 14:42:54 -04:00
Danny McGee 03f87b2544 "Add to Scene" menu and Media Library dialog (#78)
This PR adds a new "Add to Scene" dropdown menu for adding elements to
the current scene, and a new Media Library dialog for importing and/or
adding Storyteller Engine assets (characters, scenes, animations, etc.)
associated with the user's Storyteller.ai account.

The scope of this PR is limited to the UI &mdash; actual asset importing
behavior, and adding elements other than primitive shapes to the current
scene, will be implemented in follow-up PRs.

### Technical Details

In order to facilitate these changes, a new "overlay" abstraction has
been added to `@storyteller/studio-ui` (loosely modeled after
[`@angular/cdk/overlay`](https://material.angular.io/cdk/overlay/overview))
for managing DOM elements which should render in a self-contained
stacking context "above" the rest of the application.

Two new base UI components &mdash; `<sts-menu>` and `<sts-dialog>`
&mdash; have also been added to make use of this overlay system, but
it's worth noting that these new components have not yet been
exhaustively tested or thoroughly fleshed out, so they may require
significant changes in order to accommodate future use cases or address
unforeseen bugs.

### Testing

The Media Library makes some API calls which will run into CORS errors
in a normal browser. This can be bypassed by running Chrome with the
following command-line flags:
```
--disable-web-security --ignore-certificate-errors --user-data-dir=path/to/some/temporary/directory
```
Verify all of the following:

* The "Add to Scene" menu opens and closes as expected
* The primitive-shape menu items (Cube, Sphere, etc.) add the
  corresponding elements to the scene
* The "Media Library..." menu item correctly opens the Media Library
  dialog
* The Media Library's search bar and category filters work as expected
* A single asset can be selected by clicking on it
* Multiple assets can be selected by holding the "Ctrl" or "Cmd" key
* The selection can be cleared by clicking in an empty space in the
  results grid
* An "Add to Scene" button appears if (and only if) one or more assets
  are selected
* The Media Library dialog can be closed by:
  - Clicking the "X" in the upper right-hand corner
  - Pressing the "Esc" key
  - Clicking anywhere outside of the dialog boundaries

Additionally, ensure that the Media Library dialog handles all of the
following situations gracefully:
* User is not logged in to fakeyou.com
* User is logged in but does not have any engine-compatible assets
  uploaded (this can be tested by selecting any of the categories from the
  sidebar, since the database has not yet been migrated to use the new
  `media_file_class` field, so all of those categories should currently
  yield an empty list)
* User is logged in and there are engine-compatible assets to list (this
  can be tested by pressing the "Save" button in the main application
  toolbar to save the current scene to your account, and selecting the
  "Home" entry from the Media Library sidebar)
2024-03-15 13:30:06 -04:00
Lee-Orr 54a3563249 Merge branch 'main' of https://github.com/storytold/storyteller-bevy into animation-clips-setup 2024-03-15 13:21:02 -04:00
Brooks Palin 17b0e14dc8 fixed some issues, included a quick hack
The first three-ish frames of rendering are gray. We fixed this by not recording the first 3 frames and then adding 3 frames to the render.
2024-03-14 21:02:57 -06:00
Brooks Palin b9abf1d82f Composite Mode Camera Motions (#86)
This PR adds the camera motions to the composite mode. There are
currently 4 camera motion modes: `Orbit`, `Static`, `Pan`, `Zoom`. They
are accessed by using the `--camera-motion [motion]` argument. For
example, if I want to render a scene with an orbiting motion, I would do
the following:

`studio-headless scene --camera-motion orbit scene.ron `

Some things to note:
- The argument `--orbit` no longer is there. It has been deprecated!
- Currently the speed is hard coded. This can be set as a command arg
later.
- This only works with scenes, as this is intended for the `sample-room`
scene. May not work great for other scenes

Let me know if there is anything that I can fix!
2024-03-14 21:57:20 -04:00
Lee-Orr 7c7435d2cc move & update keyframes 2024-03-14 18:48:03 -04:00
Lee-Orr baa9431c39 detect light and other scene elements 2024-03-12 14:20:03 -04:00
Lee-Orr 64e8128307 scaling subdivision zoom 2024-03-12 14:05:35 -04:00
Lee-Orr 70039c5154 basic pan & zoom 2024-03-12 13:59:40 -04:00
Lee-Orr 23aafc174c tracks move correctly 2024-03-12 13:36:58 -04:00
Lee-Orr fc3ed85192 add hmr 2024-03-11 16:12:11 -04:00
Lee-Orr 959a43d181 Merge branch 'main' of https://github.com/storytold/storyteller-bevy into animation-clips-setup 2024-03-11 13:18:27 -04:00
Brandon Thomas 7d5c490874 CORS - add allowed frame ancestors for development 2024-03-10 05:13:48 -04:00
Brandon Thomas 9837363783 cleanup removal of iframe origin checks 2024-03-09 13:26:08 -05:00
Brandon Thomas a958cc8283 remove origin checks - these might be the final CORS blockers 2024-03-09 13:10:08 -05:00
Brandon Thomas b36ee00d73 frame-ancestors 2024-03-09 04:14:32 -05:00
Brandon Thomas 241c5cc25c toml cors attempt 2 (#85) 2024-03-09 03:36:04 -05:00
Brandon Thomas 676b9f86a8 add netlify toml for CORS (#84) 2024-03-09 03:06:09 -05:00
Brandon Thomas 005b4fdba3 debug cors with logging (#83) 2024-03-09 02:45:48 -05:00
Brandon Thomas 26bbec58ec cargo target documentation 2024-03-09 02:34:55 -05:00
Danny McGee 9dfbcae134 Hotfix: Replace calls to crypto.randomUUID (#82)
`crypto.randomUUID` is only available in secure contexts (HTTPS), which
throws an error when trying to run in certain situations/browsers.
2024-03-08 19:56:19 -05:00
Brandon Thomas 33250e4627 fix CORS for certain hostnames (#81) 2024-03-08 18:34:33 -05:00
Lee-Orr 2e8a0fd798 WIP timeline element adjust to seconds from ms 2024-03-08 13:46:28 -05:00
Lee-Orr 2419f82e09 play/pause, update timeline 2024-03-08 13:46:09 -05:00
Danny McGee 30979fec96 Fix issues with framework decorators (#79)
This PR fixes issues with several of the decorator implementations in
`framework` and adds unit tests to specify and validate their
functionality.
2024-03-07 21:44:55 -05:00