I want to catch the best scene of my life. The browser wants to, too.

Overview

Scroll Cat

I want to catch the best scene of my life. The browser wants to, too.

version ci api license

There are too many good works in the world that are a hundred times better than my work, both in terms of performance and stability, so make sure you use them first.

If you are really ready to waste time on this crappy work, please run:

npm install scrollcat

Or if you use Deno, don't worry, first choose one of your favorite CDNs (e.g. unpkg). All the compiled files are placed in dist/, and you only need to care about mod.js and mod.d.ts in them. If you don't know yet how Deno specifies its type declaration files when importing JS modules, please check this documentation.

Usage

import { Scroller } from "scrollcat";

const life = new Scroller(document.body);
catchScene(document.querySelector("#a"));
catchScene(document.querySelector("#b"));

async function catchScene(el) {
  const scene = life.addSceneWithDefault(el);

  for await (const [type, event] of scene.emitter) {
    const { progress, target } = event;
    if (type !== "update") {
      console.log(type, event);
    }
    target.textContent = `${(progress * 100).toFixed(2)}%`;
  }
}
You might also like...

A plugin for creating hierarchical navigation in Astro projects. Supports breadcrumbs too!

astro-navigation A plugin for creating hierarchical navigation in Astro projects. Supports breadcrumbs too! Full docs coming soon! Basic usage This pa

Dec 19, 2022

lifeRestart 游戏魔改之码农搬砖https://juejin.cn/game/coding-life?utm_source=github

Forked from https://github.com/VickScarlet/lifeRestart lifeRestart English | 简体中文 Introduction Game Life Restart Usage Web Version Clone project code.

Nov 20, 2022

This is an application that entered the market with a mobile application in real life. We wrote the backend side with node.js and the mobile side with flutter.

HAUSE TAXI API Get Started Must be installed on your computer Git Node Firebase Database Config You should read this easy documentation Firebase-Fires

Nov 4, 2021

BASIC is a web application contains basic applications related to studies, love, health, weather, productivity. This project aim to simply the user's life in anyway.

BASIC is a web application contains basic applications related to studies, love, health, weather, productivity. This project aim to simply the user's life in anyway.

BASIC is a web application contains basic applications related to studies, love, health, weather, productivity. This project aim to simply the user's life in anyway. Supported by all operating system, need an internet connection for working properly.

Dec 19, 2021

Chrome Extensions are something which we use very frequently in our day-to-day life for example Grammarly

Chrome-Extension Chrome Extensions are something which we use very frequently in our day-to-day life for example Grammarly, In this project similarly,

Dec 14, 2022

A Chrome extension that shows your life in weeks, inspired by the WaitWhatArticle

A Chrome extension that shows your life in weeks, inspired by the WaitWhatArticle

A Chrome extension that shows your life in weeks, inspired by the WaitWhatArticle

Feb 8, 2022

For this workshop, we're going to learn more about cloud computing by exploring how to use Pulumi to build, configure, and deploy a real-life, modern application using Docker

For this workshop, we're going to learn more about cloud computing by exploring how to use Pulumi to build, configure, and deploy a real-life, modern application using Docker. We will create a frontend, a backend, and a database to deploy the Pulumipus Boba Tea Shop. Along the way, we'll learn more about how Pulumi works.

Dec 29, 2022

🤝 A set of Persian Helpers for NodeJS to make your life easier

Persian Helpers Persian Helpers is a minimal NodeJS package with a set of helpers/tools specifically for the Persian/Farsi language. If you like the p

Dec 22, 2022

📦 Custom eslint rules for a better life.

Eslint Plugin Rimac Architecture When creating a new rule put it in the src/rules folder Name the file the same as the rule itself For example rimac/i

Nov 22, 2022
Owner
木杉
Hi, this is Mu Shan(木杉), a full stack engineer interested in WebAssembly and compilers.
木杉
An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

Nathanael Garza 2 Jan 21, 2022
Grayce Muthui 8 Jun 16, 2022
A basic USDZ file (Pixar Universal Scene Description) loader for ThreeJS

Three USDZ Loader A basic USDZ (binary Universal Scene Description) reader for Three.js The plugins supports animation as well as loading multiple USD

Pierre-Olivier NAHOUM 37 Dec 13, 2022
Customizable masonry Flatlist. it just behave like Flatlist but using ScrollView behind the scene

Would you like to support me? react-native-masonry-grid Customizable masonry Flatlist. it just behave like Flatlist but using ScrollView behind the sc

Numan 5 Sep 7, 2022
JSPro is nothing but JavaScript Prototypes! The publisher is too lazy to write full name that's why it's just JSPro.

JSPro is nothing but JavaScript Prototypes! The publisher is too lazy to write full name that's why it's just JSPro. Whatever, it's a library of hundreds of awesome JavaScript Prototypes (you may know it as dot function) for lazy programmers. Just install the package with a little effort and leave the blames for the publisher.

Jafran Hasan 2 Mar 10, 2022
A custom select dropdown. This is something that is not too difficult to make.

Custom-Dropdown-JS A custom select dropdown using basic JS fucntionality. This is something that is not too difficult to make. But it shows that you h

Devanshu Vashishtha 2 Mar 26, 2022
Is your site too light? Make it heavy with a single script!

heavy.js Is your site too light? Need more pizzaz? Make it heavy with a single, zero dependency script. How to? Just add this snippet to your HTML: <s

Akshit Garg 59 Dec 18, 2022
A mini figure Doctor Strange platformer game with doctor strange variants to fight monsters. Give a star and fork too.

Doctor Strange : The Game This is a Doctor Strange variants based platformer game made in GDevelop. This game have 5 levels where you fight monsters a

Chandula Janith 6 Nov 5, 2022
A good looking help command made with discord.js with select menus. Works with prefix and slash commands too!

fancy-help-command A good looking help command made with discord.js with select menus. Works with prefix and slash commands too! Dependencies: Select

LunarCodes 11 Dec 12, 2022
This site compares your GitHub Profile to your friends, and analyses and tells your GitHub profile score too.

GitHub ⚔️ Duel Deployed at ?? : https://githubduel.vercel.app/ Compare your GitHub profiles with your friends It gives score to GitHub profile based o

Anshuman swain 17 Nov 21, 2022