@cervisebas/nodegui-plugin-animation
v1.0.0
Published
[](https://www.npmjs.com/package/@cervisebas/nodegui-plugin-animation)
Downloads
7
Readme
NodeGui Plugin Animation
Plugin you can use to create native animations in NodeGui. This package is a fork of the repository "nodegui-plugin-animation"
Requirements
- Requires NodeGui v070.0 or up
- CMake: Download here
Installation
npm install @cervisebas/nodegui-plugin-animationDemo
import { QPropertyAnimation } from '@cervisebas/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(1.0);
animation.start();
Object.assign(global, {
button: button,
animation: animation,
});