Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix color editing in the web UI #333

Merged
merged 3 commits into from
Dec 3, 2020
Merged

Conversation

pkgw
Copy link
Contributor

@pkgw pkgw commented Dec 3, 2020

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.

By setting a color "name", this would cause WWT color structs to
serialize only the name and not the (A)RGB values. If we leave the name
empty, the colors serialize correctly.
@pkgw pkgw merged commit 979ea89 into WorldWideTelescope:master Dec 3, 2020
@pkgw pkgw deleted the save-color branch December 3, 2020 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant