New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

phaser-dragonbones

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phaser-dragonbones

Phaser plugin for DragonBones animator

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Phaser + DragonBones

Capture.png

Phaser

DragonBones Animator

original repo

Installing

Make clone

Clone without submodules

> git clone https://github.com/raksa/phaser-dragonbones.git

Clone with submodules (will make big size of transfer git repo)

> git clone --recurse-submodules https://github.com/raksa/phaser-dragonbones.git

Make compiling

> cd phaser-dragonbones

> npm install

> npm run compile

Make running

> npm run start

test example in  "example" folder

Usage

Current test version:

  • Phaser: 2.6.2

  • DragonBones API: 4.5

  • DragonBones Data Format: 4.5

include:

Via bower

> bower install phaser-dragonbones
<script src="example/lib/dragonBones.js"></script>
<script src="built/dragonBonesPhaser.min.js"></script>
{

    init: function() {

        this.dragonBonesPlugin = this.game.plugins.add(Rift.DragonBonesPlugin);

    },

    preload: function () {

        this.dragonBonesPlugin.addResourceByNames("key",
            "path/to/skeleton.json", "path/to/texture.json", "path/to/texture.png");

        this.dragonBonesPlugin.loadResources();
    },

    create: function () {

        var x = this.world.width / 2;

        var y = 3 * this.world.height / 4;

        var sprite = this.dragonBonesPlugin.getArmature("key");

        sprite.position.setTo(x, y);

        sprite.scale.setTo(0.6);

        this.world.add(sprite);

        var names = sprite.animation._animationNames;

        sprite.animation.play(names[0]);
    }

}

Keywords

Phaser

FAQs

Package last updated on 18 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts