kraken_animation_player

Last updated:

0 purchases

kraken_animation_player Image
kraken_animation_player Images
Add to Cart

Description:

kraken animation player

kraken_animation_player #
A kraken plugin which provide <animation-player /> tags to play animation format files.
Support format:

Flare

Installation #
First, add kraken_animation_player as a dependency in your pubspec.yaml file.
Second, add the following code before calling runApp():
import 'package:kraken_animation_player/kraken_animation_player.dart';

void main() {
KrakenAnimationPlayer.initialize();
runApp(MyApp());
}
copied to clipboard
Example #
const ASSET = 'https://kraken.oss-cn-hangzhou.aliyuncs.com/data/Teddy.flr';
const animationPlayer = document.createElement('animation-player');
animationPlayer.setAttribute('type', 'flare');
animationPlayer.setAttribute('src', ASSET);
Object.assign(animationPlayer.style, {
width: '360px',
height: '640px',
objectFit: 'contain',
});

document.body.appendChild(animationPlayer);
document.body.onclick = () => animationPlayer.play('hands_up');
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.