Git Product home page Git Product logo

playcanvas-spine's Introduction

# playcanvas-spine

Spine plugin for PlayCanvas Engine

Usage

Editor

Add the library script lib/playcanvas-spine.min.js to your project and add it the to your Script Priorty list. Add the library script lib/patch.js to your project and add it to your Script Priority list.

Create an Entity with a Script Component and add the spine entity script src/script/spline.js to your Entity. Upload your exported spine resources (atlas, skeleton json file, textures) and attach them to the spine script on your Entity.

### Engine-only

Include the library script lib/playcanvas-spine.min.js and lib/patch.js. Either use the script src/script/spine.js in script components or directly add spine components to your Entities.

var entity = new pc.Entity();
entity.addComponent("spine", {
    atlasAsset: atlas, // atlas text asset
    textureAssets: textures,  // texture assets
    skeletonAsset: skeleton // skeleton json asset
});

Building

If you don't already have it installed, install Grunt.

npm -g install grunt

Install package dependencies

npm install

Run grunt to build

grunt

Notes

This is currently using the legacy script format for PlayCanvas. Contact us on the forum if you want to see a "Scripts 2.0" version.

The version of the spine-js runtime in the this library is modified from the version on Esoteric's github page. Mainly to fix a couple of bugs in the mesh animation rendering.

playcanvas-spine's People

Contributors

daredevildave avatar vkalpias avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.