1.0.6 • Published 4 years ago

phaser-animate v1.0.6

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

phaser-animate

animate.css for Phaser, Automatic conversion based on animate.css

ps:the core is Exhausting all the css rules animate.css used.so if animate.css use some rules that never used before, some animation might be wrong.

DEMO

Demo

Usage

import { animate, list } from 'animate4phaser'
// supported animationList
console.log(list)

const boy = new Phaser.GameObjects.Image(this.scene, 0, 0, src);

animate({
    targets: boy,
    name: 'bounce',
}).then((e)=>{
    // e => boy
    console.log(e)
})

Options

optionnecessarytypedesc
targetsyesPhaser.GameObject-
nameyesStringsupported animation name
timenoNumberanimate duration
modenoString'backwards' or 'forwards', default 'backwards'
tweenScalenoNumberRange of motion, default 1

Develop

// install dependencies
yarn

// run dev mode
yarn start

// get lastest animate.css code and transform
yarn tran

// build
yarn build