An HTML implementation of refrigerator magnets, with an extra Twitter feed. #complete http://www.elfsternberg.com/2012/03/27/project-fridgemagnets-poetry/
Go to file
Elf M. Sternberg 141a7c0461 Updated movement code for performance and accuracy.
This was a learning experience.

The transform controls `rotate`, `scale`, and `translate` have independent CSS names now, so I don't
have to memorize the transformation pattern needed to make them go as expected. On the other hand,
`transition` is still how you describe the speed and easing.  And even though they're not
officially transformations, `transitionend` is how you detect when one has completed.

All of the various different techniques for figuring out where something is on the page with respect
to another element can be terribly confusing. Ultimately, I went with offsets-from-viewport, as that
seems to be the most common way of doing the calculations.

Separating `pointermove` from the animation frames used to update the page is a very nifty technique
that I learned from the Svelte guys. `pointermove` only updates an (x,y) coordinate pair that you
keep in memory; as long as you're "tracking a drag," you just update on every available animation
frame, using the last (x,y) pair that it saved.  This gives you much smoother animations.
2025-01-20 16:03:18 -08:00
.husky Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
.storybook Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
.wireit Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
assets Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
media Initial check-in after being scrubbed of sensitive data. 2012-03-27 16:18:55 -07:00
src Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
stories Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
test Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
.editorconfig Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
.gitignore Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
LICENSE.md Working on the lit evolution. 2024-11-16 20:07:16 -08:00
README.md Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
index.html Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
mute.png Initial check-in after being scrubbed of sensitive data. 2012-03-27 16:18:55 -07:00
package-lock.json Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
package.json Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
pingbg.png Initial check-in after being scrubbed of sensitive data. 2012-03-27 16:18:55 -07:00
rollup.config.js Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
tsconfig.json Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
tweetthis.png Initial check-in after being scrubbed of sensitive data. 2012-03-27 16:18:55 -07:00
unmute.png Initial check-in after being scrubbed of sensitive data. 2012-03-27 16:18:55 -07:00
web-dev-server.config.js Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00
web-test-runner.config.js Updated movement code for performance and accuracy. 2025-01-20 16:03:18 -08:00

README.md

Open-wc Starter App

Built with open-wc recommendations

Quickstart

To get started:

npm init @open-wc
# requires node 10 & npm 6 or higher

Scripts

  • start runs your app for development, reloading on file changes
  • start:build runs your app after it has been built using the build command
  • build builds your app and outputs it in your dist directory
  • test runs your test suite with Web Test Runner
  • lint runs the linter for your project

Tooling configs

For most of the tools, the configuration is in the package.json to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.