Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

core: swipe and fade animation 60fps with requestAnimationFrame #889

Open
@peterpeterparker

Description

@peterpeterparker

Affected part of DeckDeckGo

  • Web Components

Feature Description

Our core components takes care of displaying the slides. The transition happening when switching slides can happens either instantly or with an animation.

This animation can either be swipe or fade.

In both cases, CSS variables are set though Javascript to apply the effects but none of these are implement with requestAnimationFrame which would enhance the quality and the smoothness of the animation to achieve 60 fps.

Use Case

I would be smoother

Getting started

git clone https://github.com/deckgo/deckdeckgo
cd deckdeckgo/core
npm i
npm run start

The animation can be set with a related attribute / property on the deckgo-deck element.

To try it out, you can modify your local deckdeckgo/core/src/index.html such as

<deckgo-deck animation="swipe">

or

<deckgo-deck animation="fade">

Code

The swipe effect finds place in the core

The fade effect happens with a Functional component so to be honest, there I am not sure how to achieve this goal. Looking forward to your inputs.

Get Started

If you need help to get started with this feature, I'll be happy to help.

Ping me: @peterpeterparker | twitter | email | slack

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions