Repository navigation
Add an optional Christmas theme to the office - #114
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by T · project thread
What
The settings card gets a theme section:
none(the default) orchristmas. The choice is kept per viewer, like the drawing style.With Christmas on:
How
theme.tsholds the active theme, the waystyles/active.tsholds the style. Nothing reaches core.THEME_PIECESinroom.tsis each theme's dressing: pieces to stand, pieces to hang, and the everyday pieces that step aside. The renderer swaps them in and out indress().PLANTSspot, so routes already go round it and whoever comes to water the plant waters the tree.OfficeObject.lightslists an object's bulbs. The drawing shows them unlit; the renderer lays a tinted halo and bulb sprite over each and sets their alpha each frame fromlights.ts, a pure function of frame time. Every change is a fade, andprefers-reduced-motionholds them steady.sweater.ts), clipped to the torso, so the figures' outlines are unchanged and drawing styles apply as usual.Scale
Checked in
christmas.test.tsagainstAVATAR: the tree is a head taller than the avatar, a present is a box it could carry, a wreath is about as wide as its head, and the lights hang over its head.Testing
yarn lint,yarn typecheck,yarn testpass. Checked in a headless browser on the hero bundle: toggling from the settings card both ways, the room turned, night and day, and the neon style.