Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nodegui/nodegui-plugin-animation
A NodeGui plugin that adds native animation capabilities to NodeGui widgets and objects. Based on QAnimation
https://github.com/nodegui/nodegui-plugin-animation
nodegui plugin
Last synced: 3 months ago
JSON representation
A NodeGui plugin that adds native animation capabilities to NodeGui widgets and objects. Based on QAnimation
- Host: GitHub
- URL: https://github.com/nodegui/nodegui-plugin-animation
- Owner: nodegui
- Created: 2019-11-09T22:06:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:16:15.000Z (almost 2 years ago)
- Last Synced: 2024-04-20T18:00:09.440Z (7 months ago)
- Topics: nodegui, plugin
- Language: C++
- Homepage:
- Size: 1.75 MB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nodegui - nodegui-plugin-animation - A NodeGui plugin that adds native animation capabilities to NodeGui widgets and objects. Based on QAnimation. (Plugins / Samples and Experiments)
README
# NodeGui plugin animation
[![npm version](https://img.shields.io/npm/v/@nodegui/plugin-animation.svg)](https://www.npmjs.com/package/@nodegui/plugin-animation)
Plugin you can use to create native animations in NodeGui
## Requirements
Requires NodeGui v0.19.0 and up
## Installation
```
npm install @nodegui/plugin-animation
```## Demo
```js
import { QPropertyAnimation } from '@nodegui/plugin-animation';
import { QPushButton } from '@nodegui/nodegui';const animation = new QPropertyAnimation();
const button = new QPushButton();
button.setText('Animated Button');
button.show();animation.setPropertyName('windowOpacity');
animation.setTargetObject(button);animation.setDuration(5000);
animation.setStartValue(0.4);
animation.setKeyValueAt(0.5, 1.0);
animation.setEndValue(0.4);animation.start();
(global as any).button = button;
(global as any).animation = animation;
```