Skip to content

sbfkcel/pixi-spine-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pixi-spine-debug

As an extension of pixi-spine, it has the same complete drawDebug as the official spine-runtimes of EsotericSoftware.

Thanks @ivanpopelyshev for the help

use

Introduce pixi.js, pixi-spine.js, pixi-spine-debug.js in order on the page (note the order of dependencies)

const app = new PIXI.Application();
PIXI.loader.add('demo','spine-pro.json').load((loader,res)=>{
    let demo = new PIXI.spine.Spine(res.demo.spineData);
    demo.state.setAnimation(0,'animatename',true);
    demo.x = demo.y = 200;

    // Enable drawdebug,Default is false
    demo.drawDebug = true;
    demo.drawBones = true;
    demo.drawRegionAttachments = true;
    demo.drawClipping = true;
    demo.drawMeshHull = true;
    demo.drawMeshTriangles = true;
    demo.drawPaths = true;
    demo.drawBoundingBoxes = true;

    app.stage.addChild(demo);
});

document.body.appendChild(app.view);

Demo

pixi-spine-debug demo

License

MIT

Releases

No releases published

Packages

No packages published