WorldWideTelescope / wwt-web-client

The WorldWide Telescope web client lets you explore the universe in your browser.
https://worldwidetelescope.org/webclient/
MIT License
104 stars 35 forks source link

Fix color editing in the web UI #333

Closed pkgw closed 3 years ago

pkgw commented 3 years ago

Turns out to be a one-liner — setting the "name" caused the actual ARGB information to be lost in WWT's serializtion.

@astrodavid10 this should enable the creation of fades in web tours, with some limitations:

  1. Create tour and new slide
  2. Add a text overlay (e.g.) and save it
  3. Right-click on the overlay and select "Animate" to turn on animation
  4. Select "Show Start Camera Position" for the slide (probably not actually necessary)
  5. Right-click on the overlay, select Color, and set the color/opacity you want for the slide start
  6. Select "Show End Camera Position" for the slide
  7. Right-click on the overlay, select Color, and set the color/opacity you want for the slide end
  8. When playing the tour, the item's color/opacity will evolve from slide start to slide end
  9. Optionally select an "Animation Tween Type" to alter the "shape" of the evolution over the course of the slide

It's a bit limited because the fade has to span the entire slide duration. For a standard fade-in-fade-out effect you'll need to create three slides: the fade-in (with animation), the hold (no animation), and the fade-out (animation again). (The "EaseInOut" tween type won't work because that describes the speed of the animation, not its ultimate start and end points.)

If this is too tedious, I can probably devise a way to hack the tour XML to create these more complex effects from an easier-to-create base.