Skip to content

A NodeGui plugin that adds native animation capabilities to NodeGui widgets and objects. Based on QAnimation

Notifications You must be signed in to change notification settings

nodegui/nodegui-plugin-animation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 23, 2020
d289e79 · May 23, 2020

History

49 Commits
Nov 9, 2019
May 23, 2020
Nov 9, 2019
Nov 9, 2019
Nov 9, 2019
Nov 9, 2019
May 23, 2020
May 23, 2020
Nov 9, 2019
May 23, 2020
May 23, 2020
Nov 9, 2019

Repository files navigation

NodeGui plugin animation

npm version

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

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;