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

Add animation-range support for ScrollTimeline #153

Merged
merged 20 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ jobs:
uses: actions/configure-pages@v3
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with microbundle
run: "npm run build"
- name: Checkout WPT
run: "npm run test-setup"
- name: WPT hosts
Expand Down
43 changes: 43 additions & 0 deletions demo/scroll-timeline-css/anonymous-scroll-timeline-with-range.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE HTML>
<title>Anonymous Scroll Progress Timeline</title>

<style>
@keyframes move {
to { transform: translateX(350px) translateY(600px); }
}

#box_one {
width: 100px;
height: 100px;
background-color: green;
animation: move linear both;
animation-timeline: scroll(y nearest);
animation-range: 100px 500px;
}

.spacer {
width: 100%;
height: 2000px;
}

#container {
width: 500px;
height: 500px;
background-color:beige;
overflow: auto;
}

body {
height: 3000px;
}
</style>

<body>

<div id="container">
<div id="box_one"></div>
<div class="spacer"></div>
</div>

<script src="../../dist/scroll-timeline.js"></script>
</body>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"build": "microbundle -f iife",
"dev": "run-all \"serve\" \" microbundle watch -f iife \"",
"deploy": "npm run build",
"test-setup": "node test/setup/checkout-wpt.mjs",
"test:wpt": "npm run test-setup && cd test && cd wpt && (python wpt run --headless -y --log-wptreport ../report/data.json --log-wptscreenshot=../report/screenshots.txt --log-html=../report/index.html --inject-script ../../dist/scroll-timeline.js firefox scroll-animations || true)",
"test:simple": "npm run test-setup && cd test && cd wpt && python wpt serve --inject-script ../../dist/scroll-timeline.js",
"test-setup": "node test/setup/checkout-wpt.mjs && npm run build",
bramus marked this conversation as resolved.
Show resolved Hide resolved
bramus marked this conversation as resolved.
Show resolved Hide resolved
"test:compare": "node test/summarize-json.mjs test/report/data.json > test/report/summary.txt && echo 'Comparing test results. If different and expected, patch the following diff to test/expected.txt:' && diff test/expected.txt test/report/summary.txt"
},
"repository": {
Expand Down
224 changes: 0 additions & 224 deletions src/intersection-based-offset.js

This file was deleted.

Loading
Loading